From 459ea56c585060790eb43d04b29dc651f6afc90d Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sun, 8 Nov 2020 10:47:32 +0100 Subject: [PATCH] Experimental Analytics: Add more notes --- lib/analytics_exp.dart | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/analytics_exp.dart b/lib/analytics_exp.dart index 4fe7ec56..21f15ec1 100644 --- a/lib/analytics_exp.dart +++ b/lib/analytics_exp.dart @@ -68,6 +68,12 @@ class Device { // https://github.com/oschwald/geoip2-golang // -> Host it on the server, client side makes no sense +// TODO: +// 1. Create a postgres table for the geo +// 2. Write a migrator from the old event to the new format (what lang? dart?) +// 3. Create a simple endpoint which converts the IP +// into a location and gives that location an ID and returns it +// (Saves it in the DB) class Geo { String continent; String country; @@ -103,11 +109,8 @@ class AppInfo { // - Post them to an endpoint which collects them // - -// Convert the IP into the geolocation server side (along with an id) // Convert the device into an ID (deterministically) -> some hash // call an /registerDevice -// call an /ip2location -// // Optimization: Figure out a better way to serialize the info // start with json, and later move to protobufs