Abstract
Concurrency in object-oriented languages is still waiting for a satisfactory solution. For many application areas, standard mechanisms like threads and locks are too low level and have shown to be error-prone and not modular 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 concurrency model 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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Ábrahám, E., Grabe, I., Grüner, A., Steffen, M.: Behavioral interface description of an object-oriented language with futures and promises. Journal of Logic and Algebraic Programming 78(7), 491–518 (2009)
Ábrahám, E., Grüner, A., Steffen, M.: Abstract interface behavior of object-oriented languages with monitors. Theor. Comput. Sci. 43(3), 322–361 (2008)
Agha, G.: Actors: a model of concurrent computation in distributed systems. MIT Press, Cambridge (1986)
America, P.: Issues in the design of a parallel object-oriented language. Form. Asp. Comput. 1(4), 366–411 (1989)
Andrews, G.R., Coffin, M., Elshoff, I., Nilson, K., Townsend, G., Olsson, R.A., Purdin, T.: An overview of the SR language and implementation. TOPLAS 10(1), 51–86 (1988)
Armstrong, J.: Making reliable distributed systems in the presence of software errors. Ph.D. thesis, The Royal Institute of Technology, Stockholm, Sweden (2003)
Baduel, L., Baude, F., Caromel, D., Contes, A., Huet, F., Morel, M., Quilici, R.: Programming, deploying, composing, for the Grid. In: Cunha, J.C., Rana, O.F. (eds.) Grid Computing: Software Environments and Tools. Springer, Heidelberg (January 2006)
Baker Jr., H.G., Hewitt, C.: The incremental garbage collection of processes. In: Proceedings of the 1977 symposium on Artificial intelligence and programming languages, pp. 55–59. ACM, New York (August 1977)
Benton, N., Cardelli, L., Fournet, C.: Modern concurrency abstractions for C#. In: Magnusson, B. (ed.) ECOOP 2002. LNCS, vol. 2374, pp. 415–440. Springer, Heidelberg (2002)
Bloom, B., Field, J., Nystrom, N., Östlund, J., Richards, G., Strniša, R., Vitek, J., Wrigstad, T.: Thorn: robust, concurrent, extensible scripting on the JVM. SIGPLAN Not. 44(10), 117–136 (2009)
de Boer, F.S., Clarke, D., Johnsen, E.B.: A complete guide to the future. In: Nicola, R.D. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 316–330. Springer, Heidelberg (2007)
Briot, J.P., Guerraoui, R., Lohr, K.P.: Concurrency and distribution in object-oriented programming. ACM Comput. Surv. 30(3), 291–329 (1998)
Caromel, D.: Towards a method of object-oriented concurrent programming. Communications of the ACM 36(9), 90–102 (1993)
Caromel, D., Henrio, L., Serpette, B.P.: Asynchronous and deterministic objects. In: Jones, N.D., Leroy, X. (eds.) POPL, pp. 123–134. ACM, New York (2004)
Caromel, D., Mateu, L., Pothier, G., Tanter, É.: Parallel object monitors. Concurrency and Computation: Practice and Experience 20(12), 1387–1417 (2008)
Caromel, D., Mateu, L., Tanter, É.: Sequential object monitors. In: Odersky, M. (ed.) ECOOP 2004. LNCS, vol. 3086, pp. 317–341. Springer, Heidelberg (2004)
Clarke, D., Potter, J., Noble, J.: Ownership types for flexible alias protection. In: OOPSLA, pp. 48–64. ACM Press, New York (October 1998)
Clarke, D., Wrigstad, T., Östlund, J., Johnsen, E.B.: Minimal ownership for active objects. In: Ramalingam, G. (ed.) APLAS 2008. LNCS, vol. 5356, pp. 139–154. Springer, Heidelberg (2008)
Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Talcott, C.L. (eds.): All About Maude - A High-Performance Logical Framework, How to Specify, Program and Verify Systems in Rewriting Logic. LNCS, vol. 4350. Springer, Heidelberg (2007)
Creeger, M.: Multicore cpus for the masses. Queue 3(7), 64–ff (2005)
Fähndrich, M., Aiken, M., Hawblitzel, C., Hodson, O., Hunt, G., Larus, J.R., Levi, S.: Language support for fast and reliable message-based communication in Singularity OS. SIGOPS Oper. Syst. Rev. 40(4), 177–190 (2006)
Felleisen, M., Hieb, R.: The revised report on the syntactic theories of sequential control and state. Theor. Comput. Sci. 103(2), 235–271 (1992)
Fischer, J., Majumdar, R., Millstein, T.: Tasks: language support for event-driven programming. In: Ramalingam, G., Visser, E. (eds.) PEPM, pp. 134–143. ACM, New York (2007)
Flatt, M., Krishnamurthi, S., Felleisen, M.: A programmer’s reduction semantics for classes and mixins. In: Alves-Foss, J. (ed.) Formal Syntax and Semantics of Java. LNCS, vol. 1523, pp. 241–269. Springer, Heidelberg (1999)
Fournet, C., Gonthier, G.: The reflexive CHAM and the join-calculus. In: POPL, pp. 372–385. ACM, New York (January 1996)
Georges, A., Buytaert, D., Eeckhout, L.: Statistically rigorous Java performance evaluation. In: Gabriel, R.P., Bacon, D.F., Lopes, C.V., Steele Jr., G.L. (eds.) OOPSLA, pp. 57–76. ACM, New York (2007)
Haack, C., Poll, E.: Type-based object immutability with flexible initialization. In: Drossopoulou, S. (ed.) ECOOP 2009 – Object-Oriented Programming. LNCS, vol. 5653, pp. 520–545. Springer, Heidelberg (2009)
Haack, C., Poll, E., Schäfer, J., Schubert, A.: Immutable objects for Java-like languages. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 347–362. Springer, Heidelberg (2007)
Haller, P., Odersky, M.: Scala actors: Unifying thread-based and event-based programming. Theor. Comput. Sci. 410(2-3), 202–220 (2009)
Halstead Jr., R.H.: Multilisp: a language for concurrent symbolic computation. ACM Trans. Program. Lang. Syst. 7(4), 501–538 (1985)
Hasselbring, W.: Programming languages and systems for prototyping concurrent applications. ACM Comput. Surv. 32(1), 43–79 (2000)
Haustein, M., Löhr, K.P.: Jac: declarative Java concurrency. Concurrency and Computation: Practice and Experience 18(5), 519–546 (2006)
Hewitt, C., Bishop, P., Steiger, R.: A universal modular ACTOR formalism for artificial intelligence. In: IJCAI, pp. 235–245. William Kaufmann, San Francisco (August 1973)
Igarashi, A., Pierce, B.C., Wadler, P.: Featherweight Java: A minimal core calculus for Java and GJ. ACM Trans. Program. Lang. Syst. 23(3), 396–450 (2001)
JCoBox website (2010), http://softech.cs.uni-kl.de/~jcobox
Jl5 polyglot extension, http://www.cs.ucla.edu/~milanst/projects/polyglot5/
Johnsen, E.B., Owe, O.: An asynchronous communication model for distributed concurrent objects. Software and Systems Modeling 6(1), 35–58 (2007)
Karmani, R.K., Shali, A., Agha, G.: Actor frameworks for the JVM platform: a comparative analysis. In: PPPJ, pp. 11–20. ACM, New York (2009)
Keen, A.W., Ge, T., Maris, J.T., Olsson, R.A.: JR: Flexible distributed programming in an extended java. ACM Trans. Program. Lang. Syst. 26(3), 578–608 (2004)
Lea, D.: A Java fork/join framework. In: JAVA 2000: Proceedings of the ACM 2000 conference on Java Grande, pp. 36–43. ACM, New York (2000)
Leijen, D., Schulte, W., Burckhardt, S.: The design of a task parallel library. SIGPLAN Not. 44(10), 227–242 (2009)
Lieberman, H.: Concurrent object-oriented programming in Act 1. In: Yonezawa, A., Tokoro, M. (eds.) Object-Oriented Concurrent Programming, pp. 9–36. MIT Press, Cambridge (1987)
Liskov, B., Shrira, L.: Promises: Linguistic support for efficient asynchronous procedure calls in distributed systems. In: PLDI, pp. 260–267 (1988)
Miller, M.S., Tribble, E.D., Shapiro, J.S.: Concurrency among strangers. In: De Nicola, R., Sangiorgi, D. (eds.) TGC 2005. LNCS, vol. 3705, pp. 195–229. Springer, Heidelberg (2005)
Morris, B.: Cactive and friends. Symbian Developer Network (June 2008)
Niehren, J., Schwinghammer, J., Smolka, G.: A concurrent lambda calculus with futures. Theor. Comput. Sci. 364(3), 338–356 (2006)
Nierstrasz, O.M.: Active objects in Hybrid. In: OOPSLA, pp. 243–253. ACM Press, New York (1987)
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)
Ousterhout, J.: Why threads are a bad idea (for most purposes) (1996), invited talk at the 1996 USENIX Conference
Philippsen, M.: A survey of concurrent object-oriented languages. Concurrency – Practice and Experience 12(10), 917–980 (2000)
Polyglot website (March 2010), http://www.cs.cornell.edu/projects/polyglot/
Rausch, A., Reussner, R., Plasil, F., Mirandola, R. (eds.): The Common Component Modeling Example: Comparing Software Component Models. LNCS, vol. 5153. Springer, Heidelberg (2008)
Rodriguez, N., Rossetto, S.: Integrating remote invocations with asynchronism and cooperative multitasking. Parallel Processing Letters 18(1), 71–85 (2008)
Schäfer, J., Poetzsch-Heffter, A.: CoBoxes: Unifying active objects and structured heaps. In: Barthe, G., de Boer, F.S. (eds.) FMOODS 2008. LNCS, vol. 5051, pp. 201–219. Springer, Heidelberg (2008)
Srinivasan, S., Mycroft, A.: Kilim: Isolation-typed actors for java. In: Vitek, J. (ed.) ECOOP 2008. LNCS, vol. 5142, pp. 104–128. Springer, Heidelberg (2008)
Sutter, H.: The free lunch is over: A fundamental turn toward concurrency in software. Dr. Dobb’s Journal 30(3) (March 2005)
The computer language benchmarks game, http://shootout.alioth.debian.org
The Java RMI Specification (December 2009), http://java.sun.com/products/jdk/rmi/
The OSGi specification release 4 version 4.2 (September 2009), http://www.osgi.org
Van Cutsem, T., Mostinckx, S., Boix, E.G., Dedecker, J., Meuter, W.D.: Ambienttalk: Object-oriented event-driven programming in mobile ad hoc networks. In: SCCC, pp. 3–12. IEEE Computer Society, Los Alamitos (2007)
Yonezawa, A., Briot, J.P., Shibayama, E.: Object-oriented concurrent programming ABCL/1. In: Meyrowitz, N. (ed.) OOPSLA, pp. 258–268. ACM Press, New York (1986)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Schäfer, J., Poetzsch-Heffter, A. (2010). JCoBox: Generalizing Active Objects to Concurrent Components. In: D’Hondt, T. (eds) ECOOP 2010 – Object-Oriented Programming. ECOOP 2010. Lecture Notes in Computer Science, vol 6183. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-14107-2_13
Download citation
DOI: https://doi.org/10.1007/978-3-642-14107-2_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-14106-5
Online ISBN: 978-3-642-14107-2
eBook Packages: Computer ScienceComputer Science (R0)