Abstracting Context in Event-Based Software

With the recent immersion of advanced mobile devices in the daily lives of millions, pervasive computing is becoming a reality. Developing pervasive software systems is inherently difficult though it requires to deal with heterogeneous infrastructure besides peer-to-peer communication and device mobility. Thus, programming support for such applications must provide loose coupling between different participants, as well as loose coupling between applications and communication protocols. Event-based programming provides an appealing paradigm to decouple participants, however many event-based systems and languages have hardwired communication protocols, which limits their adaptability to heterogeneous deployment environments. In this paper we address this issue by abstracting the context in which events are created and handled, including protocols used to convey, compose, and consume these events. More precisely, we propose to extend an event-based programming model with context aspects --- conspects for short. We demonstrate the elegant usage of conspects through several examples based on their implementation in EventJava and illustrate how they allow to modularize event-based pervasive software. We also provide a thorough empirical investigation of the performance overheads and benefits of conspects, including the costs of weaving them dynamically. Through empirical evaluations, we assess the benefits of conspects for switching protocols without any changes to the base applications through three case studies with EventJava. The three studies are (1) a tornado monitoring system deployed on different architectures ranging from desktop x86 to embedded LEON3, (2) a mobile social networking suite with protocols for different scenarios, and (3) the introduction of a novel adaptive communication protocol in our mobile social network suite as well as in a novel robotic swarm application.

[1]  Patrick Th. Eugster,et al.  EventJava: An Extension of Java for Event Correlation , 2009, ECOOP.

[2]  Philipp Haller,et al.  Implementing Joins Using Extensible Pattern Matching , 2008, COORDINATION.

[3]  Farhad Arbab,et al.  Coordination Models and Languages , 1998, Adv. Comput..

[4]  Oscar Nierstrasz,et al.  Context-oriented Programming , 2008, J. Object Technol..

[5]  Cecilia Mascolo,et al.  CARISMA: Context-Aware Reflective mIddleware System for Mobile Applications , 2003, IEEE Trans. Software Eng..

[6]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[7]  Sophia Drossopoulou ECOOP 2009 - Object-Oriented Programming, 23rd European Conference, Genoa, Italy, July 6-10, 2009. Proceedings , 2009, ECOOP.

[8]  Oscar Nierstrasz,et al.  Context-oriented programming: beyond layers , 2007, ICDL '07.

[9]  Claudio V. Russo Join patterns for visual basic , 2008, OOPSLA '08.

[10]  Satoshi Matsuoka,et al.  ECOOP'97 — Object-Oriented Programming , 1997, Lecture Notes in Computer Science.

[11]  Rolf Dieter Schraft,et al.  Control of a robotic swarm for the elimination of marine oil pollutions , 2007, 2007 IEEE Swarm Intelligence Symposium.

[12]  Hidehiko Masuhara,et al.  Improving the development of context-dependent Java applications with ContextJ , 2009, COP@ECOOP.

[13]  Éric Tanter Contextual values , 2008, DLS '08.

[14]  Vinny Cahill,et al.  STEAM: event-based middleware for wireless ad hoc networks , 2002, Proceedings 22nd International Conference on Distributed Computing Systems Workshops.

[15]  João Saraiva,et al.  Generative and Transformational Techniques in Software Engineering II , 2007, Lecture Notes in Computer Science.

[16]  Michael Haupt,et al.  A comparison of context-oriented programming languages , 2009, COP@ECOOP.

[17]  Alfonso Fuggetta,et al.  The JEDI Event-Based Infrastructure and Its Application to the Development of the OPSS WFMS , 2001, IEEE Trans. Software Eng..

[18]  Rémi Douence,et al.  Composition, reuse and interaction analysis of stateful aspects , 2004, AOSD '04.

[19]  Jan Vitek,et al.  ECOOP 2008 - Object-Oriented Programming, 22nd European Conference, Paphos, Cyprus, July 7-11, 2008, Proceedings , 2008, ECOOP.

[20]  Luca Cardelli,et al.  Modern concurrency abstractions for C# , 2002, TOPL.

[21]  Dave Thomas,et al.  ECOOP 2006 - Object-Oriented Programming , 2006 .

[22]  Susan Eisenbach,et al.  JErlang: Erlang with Joins , 2010, COORDINATION.

[23]  Michael R. Clarkson,et al.  Polyglot: An Extensible Compiler Framework for Java , 2003, CC.

[24]  D. B. Davis,et al.  Sun Microsystems Inc. , 1993 .

[25]  David S. Rosenblum,et al.  Design and evaluation of a wide-area event notification service , 2001, TOCS.

[26]  Patrick Th. Eugster,et al.  Type-based publish/subscribe: Concepts and experiences , 2007, TOPL.

[27]  Kathryn S. McKinley,et al.  Immix: a mark-region garbage collector with space efficiency, fast collection, and mutator performance , 2008, PLDI '08.

[28]  Cédric Fournet,et al.  The reflexive CHAM and the join-calculus , 1996, POPL '96.

[29]  Michael Haupt,et al.  An Introduction to Context-Oriented Programming with ContextS , 2007, GTTSE.

[30]  Gruia-Catalin Roman,et al.  Context-Aware Publish Subscribe in Mobile Ad Hoc Networks , 2007, COORDINATION.

[31]  Hector Garcia-Molina,et al.  Parameterized subscriptions in publish/subscribe systems , 2007, Data Knowl. Eng..

[32]  Boris Magnusson,et al.  ECOOP 2002 — Object-Oriented Programming , 2002, Lecture Notes in Computer Science.

[33]  Jan Vitek,et al.  High-level programming of embedded hard real-time devices , 2010, EuroSys '10.

[34]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[35]  Radhika Nagpal,et al.  Robust and Self-Repairing Formation Control for Swarms of Mobile Agents , 2005, AAAI.

[36]  Fred B. Schneider,et al.  Implementing fault-tolerant services using the state machine approach: a tutorial , 1990, CSUR.

[37]  Erik N. Rasmussen,et al.  Refined Supercell and Tornado Forecast Parameters , 2003 .

[38]  Friedemann Mattern,et al.  Virtual Time and Global States of Distributed Systems , 2002 .

[39]  Theo D'Hondt,et al.  Ambient-Oriented Programming in AmbientTalk , 2006, ECOOP.

[40]  Sorin Lerner,et al.  Deep typechecking and refactoring , 2008, OOPSLA '08.

[41]  Premkumar T. Devanbu,et al.  DADO: enhancing middleware to support crosscutting features in distributed, heterogeneous systems , 2003, 25th International Conference on Software Engineering, 2003. Proceedings..

[42]  David L. Mills,et al.  Internet time synchronization: the network time protocol , 1991, IEEE Trans. Commun..

[43]  Patrick Th. Eugster,et al.  Putting events in context: aspects for event-based distributed programming , 2011, AOSD '11.

[44]  John H. Reppy,et al.  Specialization of CML message-passing primitives , 2007, POPL '07.

[45]  Mingyan Liu,et al.  Random waypoint considered harmful , 2003, IEEE INFOCOM 2003. Twenty-second Annual Joint Conference of the IEEE Computer and Communications Societies (IEEE Cat. No.03CH37428).

[46]  Patrick Th. Eugster,et al.  Context-oriented programming with EventJava , 2009, COP@ECOOP.

[47]  Gary T. Leavens,et al.  Ptolemy: A Language with Quantified, Typed Events , 2008, ECOOP.

[48]  Yiannis Ventikos,et al.  Robotic swarm concept for efficient oil spill confrontation. , 2008, Journal of hazardous materials.

[49]  Vinny Cahill,et al.  On Event-Based Middleware for Location-Aware Mobile Applications , 2010, IEEE Transactions on Software Engineering.

[50]  Mira Mezini,et al.  Engineering Event-Based Systems with Scopes , 2002, ECOOP.

[51]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[52]  Robert Grimm,et al.  A Universal Calculus for Stream Processing Languages , 2010, ESOP.

[53]  Dale Skeen,et al.  The Information Bus: an architecture for extensible distributed systems , 1994, SOSP '93.

[54]  Mads Haahr,et al.  Filtering and scalability in the ECO distributed event model , 2000, 2000 Proceedings International Symposium on Software Engineering for Parallel and Distributed Systems.

[55]  Patrick Th. Eugster,et al.  Location-based Publish/Subscribe , 2005, Fourth IEEE International Symposium on Network Computing and Applications.

[56]  G. Stewart Von Itzstein,et al.  The Expression of Common Concurrency Patterns in Join Java , 2004, PDPTA.

[57]  Rachid Guerraoui,et al.  Introduction to Reliable and Secure Distributed Programming , 2011 .

[58]  Luis Daniel Benavides Navarro,et al.  Explicitly distributed AOP using AWED , 2006, AOSD '06.

[59]  Brian Campbell,et al.  Amortised Memory Analysis Using the Depth of Data Structures , 2009, ESOP.

[60]  Leslie Lamport,et al.  Time, clocks, and the ordering of events in a distributed system , 1978, CACM.

[61]  Martin Sulzmann,et al.  Actors with Multi-headed Message Receive Patterns , 2008, COORDINATION.

[62]  Sophia Drossopoulou,et al.  SCHOOL: a Small Chorded Object-Oriented Language , 2006, DCM@ICALP.