Architecture
The WSO2 CEP architecture consists of the following components:
The diagram below depicts the architecture with its components. Note that the arrows which are in pink show the event flow through the system.
Figure: Components of the WSO2 CEP architecture
Input Event Adapter
Input Event Adapter receives events that are coming to the CEP. This component is a combination of different adapter implementations. Most common implementations are available by default in the CEP. Because of the CEP's pluggable architecture, you can also implement custom adapters and plug into the CEP. For more information, see Working with Input Event Adapters.
Event Builder
Event builders convert the events (in XML, Map and JSON event formats) received by the Input Event Adapter to Event Stream and handle the input mapping related tasks in the CEP. WSO2Event is the common event format used in the CEP. For more information, see Working with Event Builders.
Event Processor
This is the core event processing unit of the CEP which handles actual event processing. It handles the different execution plans and processes events with the help of Siddhi engine. All processing on received events and triggering of new events happen in the Siddhi runtime engine of each execution plan. Also, see Working with Execution Plans.
Event Formatter
Event Formatters convert the uniform Event Streams in to different event formats such as XML, Map, JSON and Text. This component handles output mapping. For more information, see Working with Event Formatters.
Output Event Adapter
Output Event Adapter publishes events. Same as the Input Event Adapter, this component is also a combination of different adapter implementations. Most common implementation are available by default. It publishes events to the receiving server using various transport adapters except Cassandra and MySQL. Cassandra and MySQL are used to dump the data to relevant databases for future analysis. For more information, see Output Event Adapters.Â
Event Stream Manager
Event Stream Manager is an important component that manages the stream definitions. Users can add new stream definitions (WSO2Event stream definition) through this component. Event Stream Manager stores stream definitions in the registry of the server. Event Builder, Event Processor and Event Formatter components interact with Event Stream Manager to retrieve the information regarding the streams. Â Â