Wednesday, October 29, 2008

Esper - course on DSMS at University of Oslo

The University of Oslo, Norway, is running for 2008 some courses on Data Stream Management Systems (DSMS) - some of it based on Esper.
DSMS was the term coined by academic work as opposition to DBMS (database) in the "early days" before the more marketed Complex Event Processing CEP acronym was introduced. CEP is now more widely used by vendors, press and analysts as productization and real world deployment is taking place.

Some course materials are available online, and it is worth the read because it recaps on the key concepts, fit for purpose, and mechanics of DSMS/CEP engines such as TelegraphCQ, Stream, Borealis and Esper.

There are also 2 project assignments that plan to leverage Esper - which is an excellent illustration of how open source can be leveraged in the academic world.
  • Extending a DSMS benchmark
  • Online analysis of medical sensor data with the Esper Event Stream Processing System
There is obviously great confidence that the Esper project will not be closed down anytime soon for monetization purpose - unlike what happened with other such DSMS projects (if not all...). The direction around Esper and enterprise open source is already crystal clear and that's definitely a win-win for both academics, community, and enterprise practitioners.

Thursday, October 16, 2008

Complex Event Processing and Data Fusion - Esper demo

I have put together a live demo of a CEP track and trace application based on Esper Complex Event Processing (CEP).

The entire scenario has been designed and developed by Data Fusion Research Center AG, a Switzerland based company "that is quickly becoming a leading center of knowledge, research, and development in the field of geospatial data fusion and analysis". DFRC has chosen Esper for their CEP solution, and has kindly made preliminary results of their work available. I have rewrapped their application bits into a single Java WebStart package so that you can run it securely in a sandboxed environment without installing anything.

The Scenario

The scenario illustrates:
  • Edge computing, with raw events coming from radio sensors or ground based radars at the boundaries of a classical IT infrastructure
  • Complex Event Processing, an automated way for deriving coarse events out of real-time event streams, using advanced concepts such as time driven computations and causality concepts. A CEP solution typically comes with an abstracted programming model or event processing language so as to empowers the application developers with a continuous query paradigm.
  • Data Fusion, a "set of techniques that combine data from multiple sources and gather that information in order to achieve inferences, which will be more efficient and potentially more accurate than if they were achieved by means of a single source" (wikipedia). Data Fusion can sometime appear as a conceptual superset of CEP. In the DFRC application, the CEP algorithm can be tuned in several ways - which directly maps to the "potentially more accurate" goal of the Data Fusion approach.
  • Rich client application, to empower the business user and represent CEP / Data Fusion derived information in the most efficient way (in this case a satellite map with real time moving icons for identified aircrafts). CEP + BAM or CEP + BI - it all comes down to materializing real-time information out of the CEP / Data Fusion engine.
The Problem

Assume ground radars are pushing position events from disparate non-identified sources flying all around (friends or foo, UFO, noise, doesn't matter):
PointEvent {
latitude
longitude
}
For the example app, the events are simulated from a raw flat file:
46.5 7.2
47 7.2
46 7.2
46.5 7.2
47 7.2
46.3 7.2
...
The challenge is to identify all the flight paths in real time and eliminate noise, so as to figure out where are the aircrafts, what are their flight path, and determine if further investigation has to be performed by humans or downstream systems.
It is all about turning real-time raw event streams into situational awareness.
A flight path is a directed sequence of position events that is extremely likely to represent a real aircraft trajectory. It will be displayed on an interactive map, and specific tresholds of the data fusion detection algorithm can be tuned in the client side application.
Relying on CEP and Data Fusion concepts ensures we can scale to a large number of aircrafts, a high troughput of position events, and truely empowers the business users, turning a raw stream of latitute/longitude tuples into a rich system.



The Solution

The solution is implemented using Esper. Esper combines
  1. A full featured EPL - event processing language. It can be for simplicity considered as an SQL-look-alike language augmented with time and causality. Main point here: this is a continuous query paradigm, and not a repeatedly executed query, and there is no database.
  2. An efficient, feature rich CEP engine, implemented in Java (also available in .Net/C#). Refer to the docs, presentations and website for more details and usage scenarios.
  3. An open middleware platform with open APIs, leveraging existing standards, that can be integrated into an existing infrastructure.
The algorithm designed by DFRC can be summarized as below (from their case study). Key capabilities, such as reusing existing geodesic distance and azimuth delta computation libraries straight into the Esper EPL language are also key capabilities being leveraged.
"Basically the algorithm was written to correlate events that are close enough together in distance and direction during a specific time frame.
Those events are considered as a potential flight path. Once it correlates events, it builds a flight path between connected events.

The algorithm compares flight paths, if any two paths share start or end points, which would mean that we have a longer flight path containing 3 points.

It then checks any 3 point flight path measuring the azimuth difference from the 1st to 2nd and the 2nd to 3rd. If difference is less than a predetermined number of degrees we consider it an identified aircraft."

Demonstration and Conclusion

Run the live demo (Java WebStart)
Quick howto:
Accept the Java Web Start security dialog
The rich client application launches and display a satellite map
Click the Start Button
Blue dots on the map are the raw position events. Red lines are the flight paths identified out of the raw data. Green arrows are the identied aircrafts


Read more from DFRC AG case study
Read more about Esper

The demo is entirely databaseless and serverless and fits in just 3 MB binaries. The very same concepts implemented here with Esper can of course be pushed out to the real world, with entire control of the architecture, its scalability and integration with fully fledged sensors/server/client setup.
Congratulations to DFRC for putting it together.

Monday, October 13, 2008

Complex Event Processing with Esper making its way to Java community

There has been some nice coverage around Esper and Complex Event Processing (CEP) in the Java community recently:
  • Complex Event Processing with Esper, on DZone and published by OCI Inc.' Paul Jensen. A nice introductory article that covers the basics of Esper 2.x.
  • Open Source SOA upcoming book at Manning, due for availability in March 2009 by Jeff Davis - see interview on DZone. The book will cover CEP with Esper, alongside ESB, SCA, BRMS, and BPM all with open source solutions.
"Jeff: Complex Event Processing is a somewhat emerging technology, at least in the open source space. With CEP, real-time business events are sent to the engine, which can then use correlation and pattern matching rules to determine whether any anomalies are occurring within your enterprise. The real-time analytical engine is what differentiates CEP from other more traditional BI vendors, which tend to evaluate events after-the-fact. CEP is very exciting, and can be used for anything from compliance, monitoring service levels, to real-time trending."
It's great to see that after the core Esper team - including myself - spent time doing some evangelization for the last 2 years with articles all around on OReilly, The Server Side, InfoQ and Java One, it is now being taken to the next level thru autonomic contributions. That is one of the great outcome of making things available under an open source model.

Monday, September 8, 2008

CEP standard, really?

The recently published paper by Oracle and StreamBase has triggered some deep echo in the CEP blogosphere.
The paper "Towards A Streaming SQL Standard" which was promoted in a StreamBase sponsored press release first appeared from the VLDB / Very Large Data Base Conference which took place on August 28, 2008 and is a joint work from Oracle, StreamBase and Stanford/Cornell universities (full paper).

Marc Adler from the user camp posted twice here and there on that matter, also asking Coral8 vendor to comment, which they did, and few days later, Apama also commented here although trying to move the debate "to mine (event processing language) is better than yours".

Overall, the comments are a mix of
  • "how that can be call standardization effort ?"
  • "how much an end user does care about the differences between X and Y engines as long as each engine documentation is clear about its behavior"
  • "how a new SPREAD operator would be more of a solution than an output clause" - a so called "big switch" approach that is available in Coral8, Esper, and likely others.
It all sounds like the title of the paper ("... standards") and its context (publication in a mostly academic conference (not a user conference)) got disconnected - on purpose or not.

There are some facts I would like to remind everyone:
  • Standards are not driven by having 2 actors work or study together (whatever there respective market caps or marketing loudness). Standards are driven by acceptance - which is in itself a de-jure or a de-facto acceptance. To date, neither StreamBase nor Oracle advertise a product that implements what they advocate.
  • This is an academic work ie mostly R&D from Oracle. This is not claimed as going toward product direction change for Oracle nor StreamBase. I think this is far from whatever road a company like Oracle would follow for a standardization effort and this is more close to StreamBase hooking on the elephant to issue a press release that ranks #4 on Google when searching "Oracle CEP".
  • Oracle itself has more than one event processing language and implementation. The one from WebLogic Event Server (which comes from BEA acquisition hence inherits from Esper capabilities given the relationship between EsperTech and BEA) does have the so called "big switch" approach that is illustrated in the paper. See docs from Oracle site about the Oracle Complex Event Processing 2.0 (ie rebranded WebLogic Event Server 2.0)
The Oracle product doc itself precisely illustrates this big switch like this:
SELECT * FROM StockTickEvent RETAIN 5 EVENTS OUTPUT EVERY 90 SECONDS
which in Esper would be
select * from StockTickEvent.win:length(5) output every 1.5 minutes

A better title in that regards would have been "Unifying tuple based and time based processing in event streaming engines" (far less attractive), or simply the one used by complexevents.com to announce the paper "StreamBase and Oracle team on CEP research" (although not a suitable title for an academic publication) - nothing more, nothing less - and blogosphere should take some wisdom reacting to such an initiative. Collaboration is always a good thing, and obviously always starts with 2 actors.

Wednesday, August 6, 2008

Complex Event Processing meets Business Intelligence: CEP BI

EsperTech has announced a technology agreement with Business Objects, an SAP company. The news describes::
"EsperTech (...) unveiled that Business Objects, an SAP company and the world's leading provider of business performance optimization solutions, will incorporate EsperTech's Esper product, for evaluation, into Business Objects Labs' "Event Driven BI" prototype"

Beyond the headlines, you can actually download and run the real world prototype from Business Objects Labs that integrates BusinessObjects XI 3.0 ( XCelsius 2008, InfoView, BI Widgets) with Esper, and also access a recorded demo.

This is a really great combination, and it's great to see how BO worked on abstracting the Esper CEP into Business Intelligence semantics that is known by their user base and target audience rather than creating yet another CEP engine or claiming "we do CEP too" without true innovation.

Also interesting, Coral8 has also announced a "Marketing and Technology" agreement with Actuate. Actuate is a fairly smaller BI player, but well know for beeing the maker of the open source Eclipse hosted BIRT platform.

I am really a big fan of CEP + BI/real time dashboard integration, and it is great to see those two announcements, that further bring CEP into the hands of business users through various level of visual and semantics abstractions.

There are also some great side comments to draw from those 2 news showing up at roughly the same time:
  • Business Objects, Actuate (who are competitors), are probably right in their approach, and so are EsperTech and Coral8 (who are competitors): rising tide raises all boats.
  • It (again) demonstrates EsperTech has grown well beyond its initial BEA OEM relationship (Esper powers WebLogic Event Server / now Oracle), up to the point of beeing used by an Oracle top competitor: SAP.
  • If you haven't done so, checkout EsperTech EsperJDBC - a bridge between Esper CEP and any JDBC compliant tool. It shipped in May 2008 and includes a nice demo that is using ... BIRT!
EsperJDBC Sample code and recorded demo (follow the "EsperJDBC and Business Intelligence reporting and charting with Eclipse BIRT" demo link) available.

It seems that while EsperTech worked early in that area, beyond technology, Coral8 secured some more marketing ;-) Well done folks.