I want to store events, generated over time, in CockroachDB. I want to expose these events via an API, where the consumer can get “all events that exist as of now”. I then want to give the consumer a token so that they can return at a future time and get “all events after token X”. The consumer should have exactly-once processing guarantees.
For example, the Twitter batch/historical API has similar functionality, for which they use ordered IDs on the tweets themselves.
My instinct is that this should be possible in a write-friendly (distributed-friendly) way, because I don’t need strict ordering at write time or a strictly incrementing sequence. But I can’t work out how to use
as of system time to help me in an efficient way.