Include filters on link types for upstream query to Event Repository
Opened this issue · 0 comments
Description
Upon receiving a 'start event' (defined by the rulesets used) Eiffel Intelligence performs an 'upstream' search to find any historical events in the Event Repository that the start event links to. This request to ER is broad and does not filter on any link types. A wide search is performed, to always include ALL link types that the start event links to.
Motivation
This behavior can cause a potential load issue if a lot of start events are received in quick succession, causing EI to send multiple upstream requests to ER without filtering, almost simultaneously.
The request to ER for any upstream events is partly configurable today (for example the shallow flag) but not on individual link types.
Exemplification
EI should send a request to ER that already includes the filtering of which link types are relevant. It would be very useful if the entire url is also logged properly. Only the base url is currently logged here:
The History Rules already define specific link types (in the rules available in this repository, but no standard is defined for this syntax) which could potentially be read to figure out which link types to use in the upstream search in ER.
Another alternative could be to add a configuration parameter that defines which link types the upstream search should include.
Benefits
A more precise query will be sent to ER to search for only the relevant events. Less events will be returned in the response from ER that EI will not have to process internally, saving time in the event aggregation process.
Possible Drawbacks
If reading link type from ruleset:
A standard for the syntax must be defined and documented, so that EI can easily determine which link types to search for. This standard should not break backward-compatibility with current rulesets.
If going for a configuration property:
Only the initial start event triggers an upstream search to ER, so all link types from the start event to upstream events must be included in such a property. Extra consideration must be taken if the property for making shallow requests to ER is set to True or False. (whether to perform a search in several connected ER instances)