Open youralien opened 3 years ago
This illustrates a new model, where the event-based onLocationUpdate
model is compatible with a more frequent polling-based onTimeElasped
model.
To implement this, I would do the following tasks
onTimeElasped
, perhaps on a 5 minute interval. Use functions like setInterval
. Perhaps, it could iterate through all users in db.Locations onLocationUpdate
and the onTimeElapsed
models (see https://github.com/NUDelta/ce-platform/blob/06b206ab15e28492c6b33f755ad930b43b4aeab3/imports/api/UserMonitor/locations/methods.js#L107)
The whole system currently runs on an event-based model, upon a user's location change.
However, there are cases where situations are changing despite a static location. For example, the weather can change to rainy, despite a user being in the same location. Or time continues to progress, despite a user being in the same location.