Ask HN: Has anyone implemented branching for event streams?
1 comments
We have already discussed this. I think branches are a good idea, although we need to look at how they work first. For your GenesisDB, I would really like a "softer" mode so that individual types and events can be removed during development. Perhaps that could also be done with branches.
The idea came from user requests. Several people asked for the ability to:
- Test scenarios with production data without polluting the main stream
- Explore "what if" questions in isolation
- Roll back a series of events that shouldn't have happened
The design: create a branch (O(1), just a pointer), commit events to it in isolation, then merge back to main or discard. Hash chain gets recalculated on merge, and merges are logged as system events for audit.
I'm curious:
- Has anyone seen this pattern before in other event stores?
- What use cases would this unlock for you?
- Any gotchas I should watch out for?