Add support for algebraic stream joins#327
Open
albe wants to merge 2 commits into
Open
Conversation
It is now possible to join streams by selecting events occurring in any of, all of or a combination thereof, streams.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new, more expressive logical stream selector API for composing event streams, replacing the previous approach with a unified selector algebra. The core change is the adoption of nested array-based selectors that alternate between
ORandANDlogic by depth, enabling complex queries without a separate query language. The documentation and implementation have been updated to reflect this new model, including DCB (Domain Command Bus) query compatibility and guidance on using matchers versus tag streams.Logical Stream Selector API and Implementation:
fromStreams, where nested arrays alternate betweenORandANDoperators by depth, allowing for expressive composition of streams [1] [2] [3].CombinedEventStreamin favor of a singleJoinEventStreamimplementation that evaluates selector trees using index set operations (union/intersect) [1] [2] [3] [4].Documentation and API Updates:
docs/api.md,docs/streams.md,docs/architecture.md) to describe the new selector tree syntax, operator alternation, and examples for composing streams [1] [2] [3] [4].DCB Query Compatibility and Best Practices:
typesandtags) are compiled into selector algebra, and clarified the implementation trade-offs between using tag streams and matcher-only approaches [1] [2] [3] [4] [5].Internal and Validation Improvements:
assertSelectorStreamsExistto recursively validate that all streams referenced in a selector exist, improving error handling for nested selectors [1] [2].Summary of Most Important Changes:
Logical Selector Algebra & Implementation:
fromStreamsfor nestedOR/ANDcomposition, deprecatingCombinedEventStreamin favor of a unifiedJoinEventStreamimplementation. [1] [2] [3]assertSelectorStreamsExist. [1] [2]Documentation & API:
DCB Query Support & Best Practices:
These changes provide a more powerful and flexible foundation for logical stream composition and DCB query compatibility.