Abstract
There exist numerous languages and frameworks that support an implementation of a variety of actor-based programming models in Java using concurrency utilities and threads. Java 8 is released with fundamental new features: lambda expressions and further dynamic invocation support. We show in this paper that such features in Java 8 allow for a high-level actor-based methodology for programming distributed systems which supports the programming to interfaces discipline. The embedding of our actor-based Java API is shallow in the sense that it abstracts from the actual thread-based deployment models. We further discuss different concurrent execution and thread-based deployment models and an extension of the API for its actual parallel and distributed implementation. We present briefly the results of a set of experiments which provide evidence of the potential impact of lambda expressions in Java 8 regarding the adoption of the actor concurrency model in large-scale distributed applications.
This paper is funded by the EU project FP7-610582 ENVISAGE: Engineering Virtualized Services, http://www.envisage-project.eu .
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Agha, G., Mason, I., Smith, S., Talcott, C.: A Foundation for Actor Computation. Journal of Functional Programming 7, 1–72 (1997)
Agha, G.: The Structure and Semantics of Actor Languages. In: de Bakker, J.W., Rozenberg, G., de Roever, W.-P. (eds.) REX 1990. LNCS, vol. 489, pp. 1–59. Springer, Heidelberg (1991)
Armstrong, J.: Erlang. Communications of ACM 53(9), 68–75 (2010)
Baker, M., Thompson, M.: LMAX Disruptor. LMAX Exchange, http://github.com/LMAX-Exchange/disruptor
Chang, P.-H., Agha, G.: Towards Context-Aware Web Applications. In: Indulska, J., Raymond, K. (eds.) DAIS 2007. LNCS, vol. 4531, pp. 239–252. Springer, Heidelberg (2007)
Cheong, E., Lee, E.A., Zhao, Y.: Viptos: a graphical development and simulation environment for tinyOS-based wireless sensor networks. In: Proc. Embedded Net. Sensor Sys., SenSys 2005, p. 302 (2005)
Christensen, B.: RxJava: Reactive Functional Progamming in Java. Netflix, http://github.com/Netflix/RxJava/wiki
Fowler, M.: LMAX Architecture. Martin Fowler, http://martinfowler.com/articles/lmax.html
Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Abstraction and Reuse of Object-Oriented Design. In: Nierstrasz, O.M. (ed.) ECOOP 1993. LNCS, vol. 707, pp. 406–431. Springer, Heidelberg (1993)
Giachino, E., Grazia, C.A., Laneve, C., Lienhardt, M., Wong, P.Y.H.: Deadlock analysis of concurrent objects: Theory and practice. In: Johnsen, E.B., Petre, L. (eds.) IFM 2013. LNCS, vol. 7940, pp. 394–411. Springer, Heidelberg (2013)
Goetz, B.: Lambda Expression Translation in Java 8. Oracle, http://cr.openjdk.java.net/~briangoetz/lambda/lambda-translation.html
Goetz, B.: Lambda: A Peek Under The Hood. Oracle, JAX London (2012)
Goetz, B.: JSR 335, Lambda Expressions for the Java Programming Language. Oracle (March 2013), http://jcp.org/en/jsr/detail?id=335
Hähnle, R., Helvensteijn, M., Johnsen, E.B., Lienhardt, M., Sangiorgi, D., Schaefer, I., Wong, P.Y.H.: HATS abstract behavioral specification: The architectural view. In: Beckert, B., Damiani, F., de Boer, F.S., Bonsangue, M.M. (eds.) FMCO 2011. LNCS, vol. 7542, pp. 109–132. Springer, Heidelberg (2013)
Haller, P.: On the integration of the actor model in mainstream technologies: the Scala perspective. In: Proceedings of the 2nd Edition on Programming Systems, Languages and Applications Based on Actors, Agents, and Decentralized Control Abstractions, pp. 1–6. ACM (2012)
Haller, P., Odersky, M.: Scala Actors: Unifying thread-based and event-based programming. Theoretical Computer Science 410(2-3), 202–220 (2009)
Hewitt, C.: Procedural Embedding of knowledge in Planner. In: Proc. the 2nd International Joint Conference on Artificial Intelligence, pp. 167–184 (1971)
Hewitt, C.: What Is Commitment? Physical, Organizational, and Social (Revised). In: Noriega, P., Vázquez-Salceda, J., Boella, G., Boissier, O., Dignum, V., Fornara, N., Matson, E. (eds.) COIN 2006 Workshops. LNCS (LNAI), vol. 4386, pp. 293–307. Springer, Heidelberg (2007)
Jaghoori, M.M., de Boer, F.S., Chothia, T., Sirjani, M.: Schedulability of asynchronous real-time concurrent objects. J. Log. Algebr. Program. 78(5), 402–416 (2009)
Johnsen, E.B., Hähnle, R., Schäfer, J., Schlatte, R., Steffen, M.: ABS: A core language for abstract behavioral specification. In: Aichernig, B.K., de Boer, F.S., Bonsangue, M.M. (eds.) FMCO 2010. LNCS, vol. 6957, pp. 142–164. Springer, Heidelberg (2011)
Johnsen, E.B., Schlatte, R., Tapia Tarifa, S.L.: Modeling resource-aware virtualized applications for the cloud in Real-Time ABS. In: Aoki, T., Taguchi, K. (eds.) ICFEM 2012. LNCS, vol. 7635, pp. 71–86. Springer, Heidelberg (2012)
Karmani, R.K., Shali, A., Agha, G.: Actor frameworks for the JVM platform: a comparative analysis. In: Proc. Principles and Practice of Prog. in Java (PPPJ 2009), pp. 11–20. ACM (2009)
Lea, D.: JSR 166: Concurrency Utilities. Sun Microsystems, Inc., http://jcp.org/en/jsr/detail?id=166
Lee, E.A., Liu, X., Neuendorffer, S.: Classes and inheritance in actor-oriented design. ACM Transactions in Embedded Computing Systems 8(4) (2009)
Lee, E.A., Neuendorffer, S., Wirthlin, M.J.: Actor-Oriented Design of Embedded Hardware and Software Systems. Journal of Circuits, Systems, and Computers 12(3), 231–260 (2003)
Meyer, B.: Applying “design by contract”. Computer 25(10), 40–51 (1992)
Microsoft. Reactive Extensions. Microsoft, https://rx.codeplex.com/
Nobakht, B., de Boer, F.S., Jaghoori, M.M., Schlatte, R.: Programming and deployment of active objects with application-level scheduling. In: Proceedings of the 27th Annual ACM Symposium on Applied Computing, SAC 2012, pp. 1883–1888. ACM (2012)
Rose, J.: JSR 292: Supporting Dynamically Typed Languages on the Java Platform. Oracle, http://jcp.org/en/jsr/detail?id=292
Shipilev, A.: JMH: Java Microbenchmark Harness. Oracle, http://openjdk.java.net/projects/code-tools/jmh/
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)
Typesafe. Akka. Typesafe, http://akka.io/
Valim, J.: Elixir. Elixir, http://elixir-lang.org/
Varela, C.A., Agha, G., Wang, W.-J., Desell, T., El Maghraoui, K., LaPorte, J., Stephens, A.: The SALSA Programming Language 1.1.2 Release Tutorial. Dept. of Computer Science, RPI, Tech. Rep., pp. 07–12 (2007)
Wirfs-Brock, R.J., Johnson, R.E.: Surveying Current Research in Object-oriented Design. Commun. ACM 33(9), 104–124 (1990)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Nobakht, B., de Boer, F.S. (2014). Programming with Actors in Java 8. In: Margaria, T., Steffen, B. (eds) Leveraging Applications of Formal Methods, Verification and Validation. Specialized Techniques and Applications. ISoLA 2014. Lecture Notes in Computer Science, vol 8803. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-45231-8_4
Download citation
DOI: https://doi.org/10.1007/978-3-662-45231-8_4
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-662-45230-1
Online ISBN: 978-3-662-45231-8
eBook Packages: Computer ScienceComputer Science (R0)