2

I have a use case where a system transaction happen/completed over a period of time and with multiple "building up" steps. each step in the process generates one or more events (up to 22 events per transaction). All events within a transaction have a shared and unique (uuid) correlation ID.

An example is for a transaction X: will have the building blocks of EventA, EventB, EventC... and all tagged with a unique correlation identifier.

The ultimate goal here is to switch from persisting all the separate events in an RDBMS and query a consolidated view (lots of joins) To: be able to persist only 1 encompassing transaction record that will consolidate attributes from each step in the transaction.

My research so far led me toward reading about Esper (Java stack here) and WSo2/WS02 CEP. In my case each event is submitted/enqueued into JMS, and I am wondering if a solution like WS02/WSo2 CEP can be used to consolidate JMS events/messages (streams) and based on correlation ID (and maximum time limit 30 min) produce one consolidated record and send it down JMS to ultimately persist in a DB.

Since I am still in research mode, I was wondering if I am on the right path for a solution?

Anybody achieved such thing using WS02/WSo2 CEP, or is it over kill ? other recommendations?

Thanks -S

Sbham
  • 199
  • 7

2 Answers2

0

You can use WSO2 CEP by integrating that to JMS to send and receive events and by using Siddhi Pattern queries[1] to consolidate events arriving from the same transaction.

30 min is a reasonable time period and its recommended to test the scenario with some test data set because you must need enough memory in the servers for CEP to handle the states. This will greatly depend on the event rate.

AFAIK this is not an over kill in a enterprise deployment.

[1]https://docs.wso2.com/display/CEP200/Patterns

suho
  • 912
  • 6
  • 12
0

I would recommend you to try esper patterns. For multievent based system where some particular information is to be collected patterns works the best way.

A sample example would be:

select * from TemperatureEvent
match_recognize (
measures A as temp1, B as temp2, C as temp3, D as temp4
pattern (A B C D)
define
A as A.temperature > 100,
B as (A.temperature < B.value),
C as (B.temperature < C.value),
D as (C.temperature < D.value) and D.value >
(A.value * 1.5))

Here, we have 4 events and 5 conditions involving these events. Example is taken from demo project.

impossible
  • 2,380
  • 8
  • 36
  • 60