Giter Site home page Giter Site logo

stscoundrel / benediction Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 38 KB

Simple page view stats with Kotlin & Cassandra. POC.

License: MIT License

Kotlin 91.63% Dockerfile 3.14% Shell 5.23%
analytics cassandra events kotlin page-views spring-boot

benediction's Introduction

Benediction

Simple Kotlin / Spring / Cassandra API for storing & serving page view data without tracking the users.

Proof of concept for personal use. Mainly stores event data & allows queries by projects & time intervals. As far as "tracking" portion is concerned, the data model includes user_identifier which may or may not be used. Benediction trusts that the calling client either uses GDRP approved identifier (=hash that can't be turned back to personal data).

Development

mvn clean && mvn spring-boot:run

Build

Build App Docker image:

docker-compose build

Setup Cassandra DB:

sh scripts/setup-db.sh

Run app & DB:

docker-compose up

Generate test data for queries

Should you wish to automatically populate your DB with event data, see Benediction Ritual

Whats in the name

A benediction is a short invocation for divine help, blessing and guidance. Divine help is what one might need should they wish to do analytics without GDPR acceptances.

benediction's People

Contributors

dependabot[bot] avatar stscoundrel avatar

Watchers

 avatar  avatar

benediction's Issues

Add queries by project & time

Most use cases should be governed by queries of:

  • Which project
  • What time range

Add repo/service methods for those and expose via endpoint.

Running via docker-compose causes Cassandra connection issues

What works:

  • Running dockerized Cassandra DB
  • Running the Spring app separately via `mvn clean && mvn spring-boot:run

What doesn't work:

  • Running whole thing with docker-compose up
  • Trying to use API from localhost:8080/api

Judging by the partially cryptic error, its probably question of Cassandra credentials the app tries to use. As it is currently using localhost, it probably gets lost in docker-verse.

What could work:

  • Populate application.properties from env (as we'd anyway do eventually, they're hardcoded for local now)
  • Feed env via docker-compose
  • Use host.docker.internal etc instead of localhost for Cassandra connections.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.