I have a distributed application where I need to get updated information from other clients, continuously.
The only solution I can think of is to make timestamp based keys, so that updates/puts to the DHT would be of the form:
[long millis, data]
So when a client starts up, they have a last_checked_timestamp
, and they scan all the data after that timestamp, and possibly rescan at given intervals.
But this would cause a whole host of problems with fetching, because now I don't know the specific keys I'm fetching for, only a range of keys. I've tried a key-range algorithm for fetching, where the keys are intervals, but it didn't work well, and I need to find a reference implementation for how this should work correctly.
My application needs to fetch updated data, or data within the range of (last_checked_time, current_time)
Thanks in advance.