Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sequential Logic #6182

Open
mdproctor opened this issue Dec 4, 2024 · 0 comments
Open

Sequential Logic #6182

mdproctor opened this issue Dec 4, 2024 · 0 comments
Assignees

Comments

@mdproctor
Copy link
Contributor

I'm working on adding a subsystem to Drools for sequential logic over streams.

Under the hood is a dedicated state machine that moves through states when signals are received; the state machine is optimised for integrations from the sources it interacts with. Those signals are provided by logic gates once they become satisfied. The logic gates matched data received from the event stream. The "feel" of the system is similar to how regular expression matching works.

Because it only wants to attempt to match data for the current active sequence or subsequence, it uses a flat list of current patterns to match against. Bitmasks are used to get efficient routing from the input of data, to the pattern matching to the appropriate logic gates and their parent sequence.

The branch can be found here:
https://github.com/mdproctor/drools/tree/sequentiallogic

It's early days, however a lot of the unit tests are in place to show how it works, but it's currently still very low level. But it will allow more advanced aggregations of whole sequences themselves now - which wasn't possible before for the existing aggregators. For those interested, a lot of the unit tests can be found here:
https://github.com/mdproctor/drools/tree/sequentiallogic/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/integrationtests/phreak/sequencing

@mdproctor mdproctor self-assigned this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant