Time Gap Alerting

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

Example Limitations

  •  
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

Sign up or Log in to add a comment or watch this page.


The individuals who post here are part of the extended Sun Microsystems community and they might not be employed or in any way formally affiliated with Sun Microsystems. The opinions expressed here are their own, are not necessarily reviewed in advance by anyone but the individual authors, and neither Sun nor any other party necessarily agrees with them.

Copyright 1994-2009 Sun Microsystems, Inc.
Powered by Atlassian Confluence
Sun Guidelines on Public Discourse Privacy Policy Terms of Use Trademarks Site Map Employment Investor Relations Contact