-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
TODO: | ||
# Aggregate expression engines | ||
|
||
- Bool | ||
- Ints | ||
- Floats | ||
This repo contains Inngest's aggregate expression engine service, turning O(n^2) expression | ||
matching into O(n). | ||
|
||
It does this by: | ||
|
||
1. Parsing each expression whilst lifting literals out of expressions | ||
2. Breaking expressions down into subgroups (matching && comparators) | ||
3. Storing each group's comparator in a matching engine for fast lookups | ||
|
||
When an event is received, instead of matching the event against every expression, we instead | ||
inspect each matching engine to filter out invalid expressions. This leaves us with a subset of | ||
expressions that are almost always matching for the event, simplifying the number of expressions | ||
to match against. | ||
|
||
Copyright Inngest 2024. |