charmasaur / romper-stomper

1 stars 2 forks source link

Be more efficient about sending data back to the clients #6

Open charmasaur opened 8 years ago

charmasaur commented 8 years ago

At the moment the server sends wait times for every lift back to the client every time the client sends a location update. That's dumb, since most location updates will happen when the user is skiing. We should only send wait times to the client when they actually need them. Not sure about the best way to do this, since it'd also be nice if the data are just there when the user looks for them. But we can definitely do better than what we do at the moment.

Along with the send-data-too-often there's the send-too-much-data. We should be smart about the choice of lifts for which we send data. Maybe we send data for all lifts within n km, maybe the user selects lifts they care about and we only send data for those, maybe something else.

alex-page commented 8 years ago

Not sure what you are going for but an Observable might solve this for you.. I am new to Observables so I might be incorrect, this guy explains it pretty well: https://www.youtube.com/watch?v=R-GzJgEccEQ