Reputation: 941
I have been reading up on the reactive programming and can understand the programming model and how we can use patterns such as CQRS to build micro services & applications. How is this different from the legacy Complex event processing approach used by traditional middleware.
Upvotes: 1
Views: 447
Reputation: 364
One can compare apples and oranges yes. And using the word "legacy" for oranges is probably not appropriate. The reactive programming is about general-purpose programming APIs for dataflows, push, pull, threading, backpressure etc.. Such as provided by an actor library. CEP is about analyzing events and provides a language (SQL, rules, XML) to make it easy and concise to detect situations in an event stream. CEP is provided by a CEP engine. For example to find a train-passing event without a train-station-stop event within 10 seconds you can express this situation detection in a CEP engine using just 60 characters. If you write programming language code to detect such a situation in say Java it probably upwards of 20 lines of code and is much harder to read. The CEP engine will do more for you such as being very fast in matching events with which rules they apply to. This for the case when you have many situations to detect. CEP engines and reactive programming can well be used together and are in fully in synergy and do not provide at all the same functionality.
Upvotes: 1