{"id":20239384,"url":"https://github.com/kevinmichaelchen/kronos","last_synced_at":"2026-05-07T21:43:19.644Z","repository":{"id":99754926,"uuid":"189660257","full_name":"kevinmichaelchen/kronos","owner":"kevinmichaelchen","description":"Analytics / Events stored in Google Cloud Bigtable","archived":false,"fork":false,"pushed_at":"2019-09-20T14:21:52.000Z","size":92,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-23T22:43:39.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevinmichaelchen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-05-31T21:24:19.000Z","updated_at":"2019-09-20T14:21:54.000Z","dependencies_parsed_at":"2023-07-31T21:16:37.201Z","dependency_job_id":null,"html_url":"https://github.com/kevinmichaelchen/kronos","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinmichaelchen%2Fkronos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinmichaelchen%2Fkronos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinmichaelchen%2Fkronos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevinmichaelchen%2Fkronos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevinmichaelchen","download_url":"https://codeload.github.com/kevinmichaelchen/kronos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241686834,"owners_count":20003112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T08:38:40.241Z","updated_at":"2026-05-07T21:43:19.601Z","avatar_url":"https://github.com/kevinmichaelchen.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kronos\nThis project provides a gRPC API for analytics.\n\n## FAQ\n\n### Where does the name come from?\nIts name is a cooler misspelling of the [Greek god of time](https://en.wikipedia.org/wiki/Chronos).  \n\n### Why might we use this?\n- Analytics are a big part of our workflow.\n  - We have a [JIRA ticket](https://irisvr.atlassian.net/browse/PROS-441) for implementing events on the Quest.\n- Segment is for customer data.\n- Bigtable is probably cheaper than a 3rd party offering.\n\n### Why Bigtable?\n- [Bigtable](https://en.wikipedia.org/wiki/Bigtable) is a sparsely populated table \nthat can scale to billions of rows, supports high read and write throughput at low latency, \nand is an ideal source for MapReduce operations.\n- Using [Cloud Bigtable](https://cloud.google.com/bigtable/docs/overview) means Google handles\nupgrades, restarts, durability, auto-scaling, and cross-regional replication for us. \n- Bigtable pairs well with Dataflow to form a [streaming analytics pipeline](https://cloud.google.com/solutions/big-data/stream-analytics/).\n\n### What queries have been tested so far?\n\n\n### Concerns\n- How do we stop malicious actors from sending fabricated events? We'd probably use an API key similar to what Segment does.\n- How do we migrate existing data from Segment into Cloud Bigtable?\n- How do we port old Prospect builds to forward analytics events to this service instead of Segment?\n\n## Running\n### Start the emulator\nWe use the [gcloud emulator](https://cloud.google.com/sdk/gcloud/reference/beta/emulators/bigtable/)\nto run locally.\n```\n# In one tab\ngcloud beta emulators bigtable start\n```\n\n### Run tests\n```\nmake testv\n```\n\n### Run the app\n```\nmake\n```\n\n### Hitting the gRPC API\n#### Sending a login event\n```\ngrpcurl -v -plaintext \\\n  -d '{\"userID\": \"f78002f4-873d-4e79-bf13-0453c4951312\", \"timeMs\": 1559520445749, \"properties\": {\"a\": \"b\"}}' \\\n  :8080 proto.EventService/SendLoginEvent\n\ngrpcurl -v -plaintext \\\n  -d '{\"userID\": \"f78002f4-873d-4e79-bf13-0453c4951312\", \"timeMs\": 1559520445750, \"properties\": {\"a\": \"b\"}}' \\\n  :8080 proto.EventService/SendLoginEvent\n```\n\n#### Counting logins for user\n```\ngrpcurl -v -plaintext \\\n  -d '{\"userID\": \"f78002f4-873d-4e79-bf13-0453c4951312\", \"start\": 1559520445749, \"end\": 1559520640198}' \\\n  :8080 proto.EventService/GetNumberOfLogins\n```\n\n#### Reading all events (debugging only)\n```\ngrpcurl -v -plaintext -d '{}' :8080 proto.EventService/ReadEvents\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinmichaelchen%2Fkronos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevinmichaelchen%2Fkronos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevinmichaelchen%2Fkronos/lists"}