JCoBox: Generalizing Active Objects to Concurrent Components

Concurrency in object-oriented languages is still waiting for a satisfactory solution. Formany application areas, standardmechanisms like threads and locks are too low level and have shown to be error-prone and notmodular enough. Lately the actor paradigm has regained attention as a possible solution to concurrency in OOLs. We propose JCoBox: a Java extension with an actor-like concurrencymodel based on the notion of concurrently running object groups, so-called coboxes. Communication is based on asynchronous method calls with standard objects as targets. Cooperative multi-tasking within coboxes allows for combining active and reactive behavior in a simple and safe way. Futures and promises lead to a data-driven synchronization of tasks. This paper describes the concurrency model, the formal semantics, and the implementation of JCoBox, and shows that the performance of the implementation is comparable to state-of-the-art actor-based language implementations for the JVM.

[1]  Jonathan S. Shapiro,et al.  Concurrency among strangers: programming in E as plan coordination , 2005 .

[2]  Alan Mycroft,et al.  Kilim: Isolation-Typed Actors for Java , 2008, ECOOP.

[3]  Denis Caromel,et al.  Programming, Composing, Deploying for the Grid , 2006, Grid Computing: Software Environments and Tools.

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

[5]  Wilhelm Hasselbring,et al.  Programming languages and systems for prototyping concurrent applications , 2000, CSUR.

[6]  Pierre America,et al.  Issues in the design of a parallel object-oriented language , 1989, Formal Aspects of Computing.

[7]  James Noble,et al.  Ownership types for flexible alias protection , 1998, OOPSLA '98.

[8]  Denis Caromel,et al.  Toward a method of object-oriented concurrent programming , 1993, CACM.

[9]  Rachid Guerraoui,et al.  Concurrency and distribution in object-oriented programming , 1998, CSUR.

[10]  Oscar Nierstrasz,et al.  Active objects in hybrid , 1987, OOPSLA '87.

[11]  Rocco De Nicola Programming Languages and Systems, 16th European Symposium on Programming, ESOP 2007, Held as Part of the Joint European Conferences on Theory and Practics of Software, ETAPS 2007, Braga, Portugal, March 24 - April 1, 2007, Proceedings , 2007, ESOP.

[12]  Martin Odersky,et al.  Scala Actors: Unifying thread-based and event-based programming , 2009, Theor. Comput. Sci..

[13]  Philip Wadler,et al.  Featherweight Java: a minimal core calculus for Java and GJ , 1999, OOPSLA '99.

[14]  Frank S. de Boer,et al.  A Complete Guide to the Future , 2007, ESOP.

[15]  José C. Cunha,et al.  Grid Computing: Software Environments and Tools , 2005 .

[16]  Matthias Felleisen,et al.  A Programmer's Reduction Semantics for Classes and Mixins , 1999, Formal Syntax and Semantics of Java.

[17]  Torben Amtoft,et al.  Faithful Translations between Polyvariant Flows and Polymorphic Types , 2000, ESOP.

[18]  Carl Hewitt,et al.  The incremental garbage collection of processes , 1977, Artificial Intelligence and Programming Languages.

[19]  Einar Broch Johnsen,et al.  Minimal Ownership for Active Objects , 2008, APLAS.

[20]  Martin Odersky ECOOP 2004 – Object-Oriented Programming , 2004, Lecture Notes in Computer Science.

[21]  Sebastian Burckhardt,et al.  The design of a task parallel library , 2009, OOPSLA.

[22]  Akinori Yonezawa,et al.  Object-oriented concurrent programming ABCL/1 , 1986, OOPLSA '86.

[23]  Denis Caromel,et al.  Parallel object monitors , 2008, Concurr. Comput. Pract. Exp..

[24]  Gul A. Agha,et al.  Actor frameworks for the JVM platform: a comparative analysis , 2009, PPPJ '09.

[25]  Doug Lea,et al.  A Java fork/join framework , 2000, JAVA '00.

[26]  Erik Poll,et al.  Immutable Objects for a Java-Like Language , 2007, ESOP.

[27]  Gregory R. Andrews,et al.  An overview of the SR language and implementation , 1988, TOPL.

[28]  Rupak Majumdar,et al.  Tasks: language support for event-driven programming , 2007, PEPM '07.

[29]  James Low Proceedings of the 1977 symposium on Artificial intelligence and programming languages , 1977 .

[30]  SchulteWolfram,et al.  The design of a task parallel library , 2009 .

[31]  Carl Hewitt,et al.  A Universal Modular ACTOR Formalism for Artificial Intelligence , 1973, IJCAI.

[32]  Henry Lieberman,et al.  Concurrent object-oriented programming in Act 1 , 1987 .

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

[34]  Einar Broch Johnsen,et al.  An Asynchronous Communication Model for Distributed Concurrent Objects , 2004, SEFM.

[35]  James R. Larus,et al.  Software and the Concurrency Revolution , 2005, ACM Queue.

[36]  Jan Vitek,et al.  Thorn: robust, concurrent, extensible scripting on the JVM , 2009, OOPSLA '09.

[37]  Raffaela Mirandola,et al.  The Common Component Modeling Example: Comparing Software Component Models [result from the Dagstuhl research seminar for CoCoME, August 1-3, 2007] , 2007, CoCoME.

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

[39]  Narciso Martí-Oliet,et al.  All About Maude - A High-Performance Logical Framework, How to Specify, Program and Verify Systems in Rewriting Logic , 2007, All About Maude.

[40]  Klaus-Peter Löhr,et al.  JAC: declarative Java concurrency: Research Articles , 2006 .

[41]  Mache Creeger,et al.  Multicore CPUs for the Masses , 2005, QUEUE.

[42]  Denis Caromel,et al.  Asynchronous and deterministic objects , 2004, POPL '04.

[43]  Erika Ábrahám,et al.  Behavioral interface description of an object-oriented language with futures and promises , 2009, J. Log. Algebraic Methods Program..

[44]  Robert Hieb,et al.  The Revised Report on the Syntactic Theories of Sequential Control and State , 1992, Theor. Comput. Sci..

[45]  Robert H. Halstead,et al.  MULTILISP: a language for concurrent symbolic computation , 1985, TOPL.

[46]  Jessie Dedecker,et al.  AmbientTalk: Object-oriented Event-driven Programming in Mobile Ad hoc Networks , 2007, XXVI International Conference of the Chilean Society of Computer Science (SCCC'07).

[47]  Gul A. Agha,et al.  ACTORS - a model of concurrent computation in distributed systems , 1985, MIT Press series in artificial intelligence.

[48]  James R. Larus,et al.  Language support for fast and reliable message-based communication in singularity OS , 2006, EuroSys.

[49]  Martin Wirsing,et al.  Formal Syntax and Semantics of Java , 1999 .

[50]  J. Woehr Cooperative multitasking , 1989 .

[51]  Lieven Eeckhout,et al.  Statistically rigorous java performance evaluation , 2007, OOPSLA.

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

[53]  Denis Caromel,et al.  Sequential Object Monitors , 2004, ECOOP.

[54]  Joachim Niehren,et al.  A concurrent lambda calculus with futures , 2005, Theor. Comput. Sci..

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

[56]  Arnd Poetzsch-Heffter,et al.  CoBoxes: Unifying Active Objects and Structured Heaps , 2008, FMOODS.

[57]  Erika Ábrahám,et al.  Abstract Interface Behavior of Object-Oriented Languages with Monitors , 2007, Theory of Computing Systems.

[58]  Mario Tokoro,et al.  Object-oriented concurrent programming , 1987 .

[59]  Seyed H. Roosta Data Parallel Programming , 2000 .

[60]  Eric Dean Tribble,et al.  Concurrency Among Strangers , 2005, TGC.

[61]  Noemi de La Rocque Rodriguez,et al.  Integrating Remote Invocations with Asynchronism and Cooperative Multitasking , 2008, Parallel Process. Lett..

[62]  Akinori Yonezawa,et al.  Object-oriented concurrent programming in ABCL/1 , 1986, OOPSLA 1986.

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

[64]  Erik Poll,et al.  Type-based Object Immutability with Flexible Initialization - extended version , 2009 .

[65]  Tingjian Ge,et al.  JR: flexible distributed programming in an extended Java , 2001, Proceedings 21st International Conference on Distributed Computing Systems.

[66]  Michael Philippsen,et al.  A survey of concurrent object-oriented languages , 2000, Concurr. Pract. Exp..

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

[68]  Liuba Shrira,et al.  Promises: linguistic support for efficient asynchronous procedure calls in distributed systems , 1988, PLDI '88.

[69]  Joe Armstrong,et al.  Making reliable distributed systems in the presence of software errors , 2003 .

[70]  Klaus-Peter Löhr,et al.  JAC: declarative Java concurrency , 2006, Concurr. Comput. Pract. Exp..