You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 6, 2019. It is now read-only.
Currently, we keep tabs on the user's location by frequently querying the browser's navigator utility in the main thread. You can find the current implementation in the entry point, app.js, of the app.
This is not a particularly resource-intensive process but should be abstracted just as the other pieces of configuration have. We could send this functionality over to the lib/ directory just as the Store and Socket listeners are configured or we could abstract it again and have a separate Web Worker polling and processing this information.
Because the process is frequently polling both device location and Google's DirectionsAPI, two external services, I think that moving this over to a Web Worker where it can run as a separate process would be the better solution. In addition, the information it provides could easily be viewed as an independent and external service so migrating that function away from our application reduces cohesion.