Before I start, I might be doing something ill conceived. This is always possible and if so, please tell me.
We're building a prototype event store using reactor.
it accepts data in on one stream.
The data is persisted in a tape like format, or in memory as an array for demo.
Many subscribers can subscribe to the input stream, which by definition is hot and unbounded.
We can do replay of the history too, this has cold stream semantics, as it is bounded.
Both work, and back pressure works very nicely.
The next bit is the rub.
I'd quite like to accept a subscription that contains a query. This will then perform replay of the history (the cold bit), then switch the subscription to the input stream (the hot bit). This should happen by buffering up the hot data while the replay occurs, then pushing it in.
And, of course, we could do with preserving the back pressure signals the whole time to avoid saturating the client as it processes the stream.
I've had trouble figuring out the best approach to this using Reactor, and I'd love to know I'm not insane in trying this!
What do you think?
David