Over a million developers have joined DZone.

Introduction to Event Processing

DZone's Guide to

Introduction to Event Processing

· Integration Zone ·
Free Resource

WSO2 is the only open source vendor to be named a leader in The Forrester Wave™: API Management Solutions, Q4 2018 Report. Download the report now or try out our product for free.

Last week post was on 'Major Areas of Event Processing' and this post will continue which was there. This post describe the concepts be hide event processing and it can be consider as entry point for event processing concepts.


What is event?

An event is an occurrence within a particular system or domain; it is something that has happened, or is contemplated as having happened in that domain.  Event can refer to an actual occurrence in the real world or other system. In computer science word 'event' is used to mean a programming entity (event object / event programming entity) that represents this occurrence.


“It is possible to have events that don’t correspond to actual occurrences”
In fraud detection system generates events when it suspects that a fraud is being conducted. Systems can generate false positives and further investigation can be done whether a fraud has actually happen or not.

Some Attributes in events

  • Encounter all the time (daily lives even).
    • Basic events such as phone rings, an email arrives, or a book falls on the floor
    • Unexpected events robbery event, tea being spilled or winning a lottery
  • Events can be Observed 
    • Some events can be observed very easily (hear, see or subscribing for email group)
    • In order to detect the event we have do some more work, as all we can observe are its symptoms

My Dog consumption of dog food had increased, and I needed to add an additional bag of dog food to my weekly shopping list.
I might reach this conclusion when I ran out of dog food for four or three consecutive weeks, convincing me that this was a consistent phenomenon.

In this example running out of dog food is an observable event, whereas
the dog food consumption has increased event is a higher level event.
higher level event can be deduced from observing lower level events (out of dog food was the observed event).

What is situations?
Many of the events around us are outside the scope of our interest. Some events are background noise and do not require any reaction, but some do require reaction, and those we call situations.

One of the main themes in event processing is the detection and reporting of situations so that they can be reacted to. Reaction can be simple one or complicated.

Domain where event processing can be used

  • hospital systems
  • personal banking system
  • financial institution to detect frauds
  • manufacturing plant
  • airline systems
  • online trading system
  • emergency control system
  • manufacturing plant management system
  • road tolling system detects
  • social networking site

Categories of an event processing application

  • Observation—Event processing is used to monitor a system or process by looking for exceptional behavior and generating alerts when such behavior occurs (patient monitoring)
  • Information dissemination— Deliver the right information to the right consumer at the right granularity at the right time, in other words, personalized information delivery (emergency system)
  • Dynamic operational behavior—Event processing is often used to drive the actions performed by a system dynamically so as to react to incoming events (online trading system)
  • Active diagnostics—Here the goal of the event processing application is to diagnose a problem, based on observed symptoms (mechanical failure)
  • Predictive processing—Here the goal is to identify events before they have happened, so that they can be eliminated or their effects mitigated (fraud detection system)

Event processing

What is Event processing?

Event processing is computing that performs operations on events. Common event processing operations include reading, creating, transforming, and deleting events.

Distinguish event processing from simple event-based programming

The three things that distinguish event processing from simple event-based programming

  • Abstraction — Operations that form the event processing logic can be separated from the application logic, allowing them to be modified without having to change the producing and consuming applications.
  • Decoupling — The events detected and produced by one particular application can be consumed and acted on by completely different applications.
  • Real-world focus — Event processing frequently deals with events that occur, or could occur, in the real world

There can be two type of relationship such as deterministic (exact mapping between the real world and event processing system) and approximate (approximation to real world events)

Why we use event processing

  • application might be naturally centered on events
  • application might need to identify and react to certain situations as they occur
  • extendibility of an existing application in a flexible, non-invasive manner
  • allow the application to be adapted quickly to meet new business requirements since event processing logic can be separated from application
  • application might involve analysis of a large amount of data
  • data can be organized into streams of events which are then distributed to multiple computing nodes allowing separate parts of the analysis to be performed in parallel
  • scalability and fault tolerance benefits to be gained by using an event-driven approach

Event processing platform with business perspective 

Though lot of domain or businesses use event processing, all follow the same pattern such as

  • reporting events and sometimes by multiple event producers
  • processing the events
  • creating additional events that are consumed either by humans or by automated processes

example use case


luggage management system ,events are produced by the check-in process and by the various radio-frequency identification (RFID) readers, which emit events about the movement of the luggage in the system. The events generated by the event processing system are consumed by the luggage control system itself, by airport staff, or even by the passengers themselves.

Many event processing applications keep the logic that processes the events separate from the event producers and consumers as below diagram.


An event processing platform provides some or all of the following:

  • A language for expressing event processing logic
  • Tools to design and test event processing logic
  • A runtime to execute event processing logic
  • An event distribution mechanism
  • Operational management tools

This can decrease the cost of development and maintenance, and thus the total cost of ownership. You might need to change your event processing functionality relatively quickly, and it’s much easier to make quick changes to functions that are expressed using higher level programming abstractions and that are detached from mainstream application logic. Applications may also be concerned with other non-functional properties such as reliability, availability, and security.

Generic software platforms are now being used in many areas. To take just two examples, organizations typically use database management systems to manage their data
and process queries, and they use message-oriented middleware to connect enterprise applications. In a similar fashion, we think that for many applications it has become more cost effective to use an event processing software platform rather than to implement one’s own.
In some cases the event processing functionality required is quite simple, with no special performance requirements, and the usage of event processing within the enterprise is limited. In ths do not need use event processing software platform.

Business process management (BPM) vs event processing system

The synergies between BPM and event processing are,

  • The BPM system can serve as an event producer or generating events
  • The BPM system can act as an event consumer, reacting to situations detected by the event processing system

IAM is now more than a security project. It’s an enabler for an integration agile enterprise. If you’re currently evaluating an identity solution or exploring IAM, join this webinar.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}