EventJava: An Extension of Java for Event Correlation

  • Patrick Eugster
  • K. R. Jayaram
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5653)


Event correlation has become the cornerstone of many reactive applications, particularly in distributed systems. However, support for programming with complex events is still rather specific and rudimentary. This paper presents EventJava, an extension of Java with generic support for event-based distributed programming. EventJava seamlessly integrates events with methods, and broadcasting with unicasting of events; it supports reactions to combinations of events, and predicates guarding those reactions. EventJava is implemented as a framework to allow for customization of event semantics, matching, and dispatching. We present its implementation, based on a compiler transforming specific primitives to Java, along with a reference implementation of the framework. We discuss ordering properties of EventJava through a formalization of its core as an extension of Featherweight Java. In a performance evaluation, we show that EventJava compares favorably to a highly tuned database-backed event correlation engine as well as to a comparably lightweight concurrency mechanism.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Trigeo: TriGeo Security Information Manager, Trigeo SIM (2007), http://www.trigeo.com/products/detailedf/
  2. 2.
    Gay, D., Levis, P., von Behren, R., Welsh, M., Brewer, E., Culler, D.: The nesC Language: A Holistic Approach to Networked Embedded Systems. In: PLDI, pp. 1–11 (2003)Google Scholar
  3. 3.
    Demers, A., Gehrke, J., Hong, M., Riedewald, M., White, W.: Towards Expressive Publish/Subscribe Systems. In: Ioannidis, Y., Scholl, M.H., Schmidt, J.W., Matthes, F., Hatzopoulos, M., Böhm, K., Kemper, A., Grust, T., Böhm, C. (eds.) EDBT 2006. LNCS, vol. 3896, pp. 627–644. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  4. 4.
    Abadi, D.J., Carney, D., Çetintemel, U., Cherniack, M., Convey, C., Lee, S., Stonebraker, M., Tatbul, N., Zdonik, S.: Aurora: A New Model and Architecture for Data Stream Management. VLDB Journal 12(2), 120–139 (2003)CrossRefGoogle Scholar
  5. 5.
    Ahmad, Y., Berg, B., Çetintemel, U., Humphrey, M., Hwang, J.H., Jhingran, A., Maskey, A., Papaemmanouil, O., Rasin, A., Tatbul, N., Xing, W., Xing, Y., Zdonik, S.: Distributed Operation in the Borealis Stream Processing Engine. In: SIGMOD 2005, pp. 882–884 (2005)Google Scholar
  6. 6.
    Amir, Y., Danilov, C., Miskin-Amir, M., Schultz, J., Stanton, J.: The Spread Toolkit, http://www.spread.org
  7. 7.
    Pietzuch, P.R., Bacon, J.: Hermes: A Distributed Event-Based Middleware Architecture. In: ICDCSW 2002, pp. 611–618 (2002)Google Scholar
  8. 8.
    Apache: ActiveMQ (2008), http://activemq.apache.org/
  9. 9.
    Forgy, C.: Rete: A Fast Algorithm for the Many Patterns/Many Objects Match Problem. Artificial Intelligence 19(1), 17–37 (1982)CrossRefGoogle Scholar
  10. 10.
    Friedman-Hill, E.: Jess (2008), http://www.jessrules.com/jess/
  11. 11.
    Ban, B.: JGroups - A Toolkit for Reliable Multicast Communication (2007), http://www.jgroups.org/javagroupsnew/docs/index.html
  12. 12.
    Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: A Minimal Core Calculus for Java and GJ. TOPLAS 23(3), 396–450 (2001)CrossRefGoogle Scholar
  13. 13.
    Eugster, P., Jayaram, K.R.: EventJava: An Extension of Java for Event Correlation. Technical Report CSD TR #09-002, Department of Computer Science, Purdue University (2009), http://www.cs.purdue.edu/research/technical_reports/
  14. 14.
    Chakravarthy, S., Krishnaprasad, V., Anwar, E., Kim, S.K.: Composite Events for Active Databases: Semantics, Contexts and Detection. In: VLDB 1994, pp. 606–617 (1994)Google Scholar
  15. 15.
    Sánchez, C., Słanina, M., Sipma, H.B., Manna, Z.: Expressive completeness of an event-pattern reactive programming language. In: Wang, F. (ed.) FORTE 2005. LNCS, vol. 3731, pp. 529–532. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  16. 16.
    Welc, A., Hosking, A.L., Jagannathan, S.: Transparently reconciling transactions with locking for java synchronization. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 148–173. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  17. 17.
    Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: An extensible compiler framework for java. In: Hedin, G. (ed.) CC 2003. LNCS, vol. 2622, pp. 138–152. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  18. 18.
    Sun: Java Remote Method Invocation, Java RMI (2004), http://java.sun.com/j2se/1.5.0/docs/guide/rmi/
  19. 19.
    Black, A., Immel, M.: Encapsulating plurality. In: Nierstrasz, O. (ed.) ECOOP 1993. LNCS, vol. 707, pp. 57–79. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  20. 20.
    Guerraoui, R., Garbinato, B., Mazouni, K.: GARF: A Tool for Programming Reliable Distributed Applications. Concurrency 5(4), 29–32 (1997)Google Scholar
  21. 21.
    Toinard, G.F.C.: A New Way to Design Causally and Totally Ordered Multicast Protocols. OSR 26(4), 77–83 (1992)Google Scholar
  22. 22.
    Benton, N., Cardelli, L., Fournet, C.: Modern Concurrency Abstractions for C#. TOPLAS 26(5), 769–804 (2004)CrossRefMATHGoogle Scholar
  23. 23.
    Fournet, C., Gonthier, C.: The Reflexive Chemical Abstract Machine and the Join Calculus. In: POPL 1996, 372–385 (1996)Google Scholar
  24. 24.
    Haahr, M., Meier, R., Nixon, P., Cahill, V., Jul, E.: Filtering and Scalability in the ECO Distributed Event Model. In: PDSE 2000, pp. 83–92 (2000)Google Scholar
  25. 25.
    Eugster, P.: Type-based Publish/Subscribe: Concepts and Experiences. TOPLAS 29(1) (2007)Google Scholar
  26. 26.
    Itzstein, S.V., Kearney, D.: The Expression of Common Concurrency Patterns in Join Java. In: PDPTA 2004, pp. 1021–1025 (2004)Google Scholar
  27. 27.
    Navarro, L., Südholt, M., Vanderperren, W., Fraine, B.D., Suvée, D.: Explicitly Distributed AOP using AWED. In: AOSD 2006, pp. 51–62 (2006)Google Scholar
  28. 28.
    Reppy, J.H., Xiao, Y.: Specialization of CML Message-passing Primitives. In: POPL 2007, pp. 315–326 (2007)Google Scholar
  29. 29.
    Spring, J., Privat, J., Guerraoui, R., Vitek, J.: StreamFlex: High-throughput Stream Programming in Java. In: OOPSLA 2007, pp. 211–228 (2007)Google Scholar
  30. 30.
    Lamb, A.A., Thies, W., Amarasinghe, S.: Linear Analysis and Optimization of Stream Programs. In: PLDI, pp. 12–25 (2003)Google Scholar
  31. 31.
    Rajan, H., Leavens, G.T.: Ptolemy: A Language with Quantified, Typed Events. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 155–179. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  32. 32.
    Haller, P., Van Cutsem, T.: Implementing Joins using Extensible Pattern Matching. In: Lea, D., Zavattaro, G. (eds.) COORDINATION 2008. LNCS, vol. 5052, pp. 135–152. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  33. 33.
    Haller, P., Odersky, M.: Actors that Unify Threads and Events. In: Murphy, A.L., Vitek, J. (eds.) COORDINATION 2007. LNCS, vol. 4467, pp. 171–190. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  34. 34.
    Ericsson Computer Science Laboratory: The Erlang Pogramming Language, http://www.erlang.org
  35. 35.
    Milicia, G., Sassone, V.: Jeeg: Temporal Constraints for the Synchronization of Concurrent Objects. CCPE 17(5-6), 539–572 (2005)Google Scholar
  36. 36.
    Briot, J.P.: Actalk: A Testbed for Classifying and Designing Actor Languages in the Smalltalk-80 Environment. In: ECOOP 1989, pp. 109–129 (1989)Google Scholar
  37. 37.
    Chin, B., Millstein, T.: Responders: Language Support for Interactive Applications. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 255–278. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  38. 38.
    Lin, C., Black, A.P.: DirectFlow: A Domain-Specific Language for Information-Flow Systems. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 299–322. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  39. 39.
    Bierman, G., Meijer, E., Schulte, W.: The Essence of Data Access in Cω. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 287–311. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  40. 40.
    Nishizawa, M.: Remote Pointcut: A Language Construct for Distributed AOP. In: AOSD 2004, pp. 7–15 (2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Patrick Eugster
    • 1
  • K. R. Jayaram
    • 1
  1. 1.Department of Computer SciencePurdue UniversityWest LafayetteUSA

Personalised recommendations