Why both BAM and CEP?
WSO2 BAM and WSO2 CEP both are products of WSO2 that are capable of data processing. But they are used for different purposes.
- BAM is a secondary storage data analysics based platform,
- While CEP is an in-memory real-time data processing platform
Data processing latency is considerably high in BAM as it is storage based system related to CEP. Therefore CEP is the solution if the requirement is real-time analysis such as alerting. So if there is a combination of requirements for both BAM and CEP, the solution is the integration of either,
- CEP in BAM - Installing CEP features in a compatible BAM server
- BAM in CEP - Installing BAM components in a compatible CEP server
- CEP and BAM in Carbon - Installing both BAM and CEP features in a compatible Carbon server
Within these alternative approaches this document will explain the first alternative, installing CEP features in a compatible BAM server.
Making the Integrated BAM
In out approach we should install all the CEP features in a downloaded BAM server. The following are the steps to do.
- Download the BAM server you want to use from here. (BAM 2.2.0 is used here.)
- Install the Complex Event Processor features are shown. (http://dist.wso2.org/p2/carbon/releases/4.0.7/ repository is used there as both CEP and BAM are Carbon 4.0.7 products)
- After restarting the server, the CEP is integrated in BAM.
Using BAM and CEP Simultaneously
Data can be sent to both CEP and BAM at the same time using the following technologies.
- REST API
- Data Bridge
So all the Data Agents (Service Statistics Data Agent, Mediation Statistics Data Agent, BAM Mediator etc.) that are used with BAM can be used with CEP. And the REST API calling mechanism is also similar to the BAM. Following are the documents corresponding to the each use case.