I have a use case where I am receiving events from the client and some of these events are logically related (belong to a single session), and there is a definite ordering among events based on timestamp.
Now, I want to build a solution that would should continue aggregating events until the last one of a particular group is received in increasing order of timestamp. So, if an event not in order is received, it should be held on until the events before them, are received. And then, go ahead with storing that in a data store such as HBase based on the key of that particular group.
The problem is the number of such incomplete groups at a time can be in the millions, and would need something that can support fast appending to the incomplete group and holding the events received unordered. How should I go about this?