Realtime Data
We need a way to get realtime information sources into the viewer.
Mechanisms data could get into the viewer are:
- rereading an input file every few seconds or when it changes
- listening for messages on a network port (for example with ROS)
- using hardware events like RS-232-messages
The client would need to be informed that new data is available, which can work in one of several ways:
Option 1: Time-To-Live for source_info and geodata
Attaching a time-to-live to information sent by the server means that server, both caches and the client know when to discard a source. This could be combined with a discard-all-before status message, for example to use on restart.
Good:
- client requests new information using existing infrastructure when TTL expires automatically
- TTL is needed anywys for things like web sources
Bad:
- can probably only do >10s refresh rate (otherwise too many tiles need to be rerequested)
- probably needs recomputation of a lot of things internally in the sources on each refresh
Option 2: Live-Tag for source_info and geodata
A live-tag could be used on sources to indicate they support requests to only deliver data that is newer than a certain timestamp. The client would request the source_info once and then only update the source using this newer-than request. The source would never have to update the source_info, since clients could just request data newer than the end of the given timerange.
Good:
- Uses way less data and compute than Option 1
- only changed data gets transmitted
Bad:
- probably only works with point sources
- client needs to keep track of up to where in time it has already received data
- caching for the live-tagged-requests can be difficult, since they support varying timeranges (probably not as bad since live data probably small-ish)
Both options don't quite feel right. Maybe someone else has a good idea how to do this?