Ask HN: Has anyone implemented branching for event streams? I'm working on GenesisDB, an event sourcing database, and have been thinking about adding git-like branches for event streams. 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? |