rathnapandi / runners

An application to encourage activities like running, biking, swimming, walking etc.. within company
1 stars 0 forks source link

Webhook stream should continue feeding data - duplicates should be handled in Dashboard #18

Open cmanda opened 4 years ago

cmanda commented 4 years ago

https://github.com/rathnapandi/runners/blob/51bd6032e314151dc266d7a9be23fe9b378af16c/src/main/java/com/axway/runners/strava/CallbackController.java#L153

rathnapandi commented 4 years ago

Can you give an example? The duplicate check is done on the field activityId as activityId is unique. If given activityId is stored in Elastic search it wont get stored again.

cmanda commented 4 years ago

The feed from Strava comes with obj_type indicating the athlete/activity, and aspect_type=create/update/delete

For e.g.

Back to the enhancement, under the Event & NonEvent Activity Feed flow, you should consider the Activity + Aspect Type - ideal case, or, Activity + Aspect Type (POST for CREATE/UPDATE) and let Kibana count only the most recent POSTed event (workaround)

rathnapandi commented 4 years ago

Ok, if the user deletes / update, you want to delete/update the feed. I think we don't need sync up everything As feed is not a source of truth.

cmanda commented 4 years ago

Agreed on the source of truth - its about how we count activities under the leaderboard metrics.

rathnapandi commented 4 years ago

We are creating one record in feed irrespective of create/update activities. not sure what is missing here.