Technical Complexity
Medium
Source code for example this is here.
Purpose
- Monitor a inbound event stream. If a time gap occurs (no event for a maximum amount of time) We generate an event.
Situation
- Taking in feed of security cameras
- Receiving heart beat of servers (If one goes down or is overloaded, the event will arrive late, or never)
- Receiving input of monitored equipment
Design
This is based on the precept of a sliding window. When the window goes below a threshold of events, an alert is generated.
casa.PNG
IEP Constructs Used
Process Flow
iepProcess.PNG
- Inbound stream
- Partitioned Window
- Relational Updates
WSDL Modifications
You will need to change the output of the stream that is currently mapped on the file system to a soap output. This will allow you to drop the wsdl and use the output directly as an input in the BPEL process. Keep a backup copy!! As iep will ease your modifications each time the iep process is regenerated.
Partitioned Window
partitionedWindow.PNG
We can see in this operator that we've set to keep the last 3 elements of the stream, for each stock. So this way, we have a shallow history on each element important for us.
BPEL Process
All this does, is check the tag. If the tag=+, then we do an insert. if the tag=-, then we do a delete. The ems seq id is used to manage the correlation in the two events (+ and -). The setDBValues does the map of the data between the iep process stream and the external DB representation.
bpelProcess.PNG