Risk is in choosing an appropriate solution for devices with intermittent connections such as mobile.
Polled solution isn't unreasonable for the following reasons:
- Viewing a page generally involves a trip to the server anyway. If a timestamp of the last state change is part of
the response, this can be checked for a difference and serve as a trigger to refresh the state. The Home Page makes a
good target for viewing updated state. The Team Leaders Status page is another.
Two Polling Intervals
1. The Outing State itself
2. GPS position when tethered
Outing State Interval
- 20-second or so automated pull
- Auto-pull can be turned off
- Can be manually requested by clicking/pressing "Home"
- Only turned on when a) Map is open, b) Riding state and c) tethered.
- short interval for Armchair tether.
- longer interval for field-based tether.
- Manually requested at any time ??
For the purposes of determining if a Seeker's session is active, two missed poll intervals will signify that the session is inactive, but not closed or necessarily expired.
The timing and refresh rate of a tethered location is different from the timing for pushing/pulling the game state.
Two different channels are setup, but it makes sense to expand the response to many REST calls to include both
a position timestamp as well as a game state timestamp.
- Pushing the updated position on an interval per team.
- Pull occurs on an interval, but only when the position matters to the display (a map).
When polling on a cycle, it makes sense to show an indication to the user so they know they're hitting up the server on some interval. Maybe an icon that briefly changes to a brighter color when the transmission occurs. Color can change to indicate if the polling has ceased or has been unable to complete a handshake within twice the polling interval (two or more missed polling intervals).