Email Article

CEP, EDA, and SOA - Where’s it all Headed?

by Jeff Wootton, VP Product Strategy, Aleri

There seems to be a lot of discussion and debate about the relationship of Event Driven Architecture (EDA) and Service Oriented Architecture (SOA). In that context, many people seem to think that SOA is somehow orthogonal to EDA. By extension, then, it raises the question of whether CEP has a role to play in a service oriented architecture. It is more useful, however, to think of EDA as a particular style of SOA, rather than an alternative to SOA.

SOA defines a style of application architecture that eliminates monolithic applications in favor of loosely coupled services. The benefits of SOA – reusability, maintainability, and agility, among others – have led to wide spread adoption. The most pervasive form of SOA follows the request/response paradigm where a client sends a request to a service to perform some task. But there is nothing in the concept of SOA that mandates a synchronous, request/response interaction between a client and a service.

EDA is based on the asynchronous transfer of event notifications. This is an alternative to synchronous request/response interaction, and can also be viewed as a valid paradigm for SOA implementations. In fact Gartner (who happened to coin the term SOA) view it just this way: that SOA can be implemented with client/server (i.e. request/response) interaction, event notification, or a mixture of the two. To derive the full benefits of SOA, architects shouldn’t limit themselves to request/response but consider where asynchronous event notification may be a better fit.

Clearly it is not appropriate for all interactions to be based on event notification. When a client needs to invoke a service to complete a task, request/response is what’s needed. Whenever possible, however, consider using an EDA design pattern (asynchronous event notification) – whenever real-time response to events is needed, but there is no need for the event emitter to wait for the response. There are several advantages to using event style interaction over request/response wherever possible:

once services are instrumented to emit events, new event-driven business processes can be implemented without any changes to existing systems; this results in business agility
when multiple systems need to be made aware of a single event, but the client isn’t dependent on responses from those systems, it’s far more efficient and creates fewer dependencies to use event notification rather than point-to-point request/response
while request/response interactions are generally transactional in nature, analysis of event streams and event patterns can provide insight about what’s going on across services – see the forest, not just the trees

So where does CEP fit in? While a message bus can be used to distribute event notifications, and databases can log events, applications need to act on events. EDA is about processing and reacting to events in real-time. CEP provides a way of implementing the business logic that will be applied to events in real-time. What sets CEP apart from simple event processing is that a CEP engine collects and analyzes events in the context of other events – potentially large sets of events, and applies computations and/or rules to determine when to trigger a response, what response to trigger, or to deliver up-to-date summary information to a decision maker. CEP therefore, provides the intelligence for analyzing and acting on the incoming event notification. It can be used to:

detect patterns of events that represent an opportunity or a threat
monitor changing conditions to continuously adjust inputs to other systems for real-time synchronization of business processes
deliver real-time insight in the form of summary information to decision makers
provide data orchestration services, applying business rules to incoming events to determine what new events need to be generated to update and inform other systems – this provides for real-time data synchronization as an alternative to batch-oriented ETL

At Aleri, we believe that EDA will begin to play a bigger role in SOA implementations across all industries as IT staff come to understand the benefits of EDA and the ease with which real-time insight and response can be implemented using CEP technology.