Saturday, June 6, 2009

Esper, OSGi and Complex Event Processing

There is an interesting article that discusses the pros and cons of integrating OSGi with Esper to achieve modularity and dynamicity beyond what Esper already provides.

The article goes over comparing 3 scenarios and comes with sample code (and complete source, with Maven and Eclipse artifacts)
  1. Exposing Esper runtime and administrative interfaces as OSGi services
  2. Layering Esper interfaces as OSGi services through some service provider abstraction
  3. Using Esper and the OSGi EventAdmin service specification
This third approach although a bit more complex for readers without OSGi background is the recommended one by the author - Valery Abu-Eid.

It is nice to see such exploration going on. I know we already have users running Esper in OSGi environment, although the vast majority is still running on bare JSE JVM or on JEE / servlet container stacks.

Readers familiar with the matter will also notice that WebLogic Event Server (now Oracle CEP) - is also leveraging OSGi. A main difference is that Esper does not mandate OSGi at all while the BEA/Oracle product does mandate end users to author OSGi modules - with pros and cons.

If you have experimented with similar stacks I'd be pleased to hear about your experience.
There is also good material available from the DynamicJava.org site to get started with OSGi based runtimes - including their own OSGi stack.

Read more about Esper and OSGi experiments at DynamicJava.org