Drools CEP limitations
Drools CEP features are really powerful and are as quick to resolve decisions as any other type of Drools-based rules. However, it has a few architectural elements that we need to be aware of in order to make the most of it.
First of all, all Kie Sessions operate in memory. This means that all events living inside a Kie Session have to be in memory while they are still relevant to at least one rule in its Kie Base. This can be overcome by the @expires
annotation of an event type, but it will still require to plan ahead for the amount of memory required to define a Drools CEP service. One quick way of determining how much memory a server will need to run a Drools CEP scenario is as follows:
Determine how long each event instance should be present in the Kie Session (because it might still be used in triggering a rule). Let's call this value A.
Determine how many events can be received in a specific period of time. Let's call this value B.
Determine how big an event instance...