Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 8803))

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 .

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Agha, G., Mason, I., Smith, S., Talcott, C.: A Foundation for Actor Computation. Journal of Functional Programming 7, 1–72 (1997)

    Article  MathSciNet  MATH  Google Scholar 

  2. 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)

    Chapter  Google Scholar 

  3. Armstrong, J.: Erlang. Communications of ACM 53(9), 68–75 (2010)

    Article  Google Scholar 

  4. Baker, M., Thompson, M.: LMAX Disruptor. LMAX Exchange, http://github.com/LMAX-Exchange/disruptor

  5. 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)

    Chapter  Google Scholar 

  6. 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)

    Google Scholar 

  7. Christensen, B.: RxJava: Reactive Functional Progamming in Java. Netflix, http://github.com/Netflix/RxJava/wiki

  8. Fowler, M.: LMAX Architecture. Martin Fowler, http://martinfowler.com/articles/lmax.html

  9. 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)

    Google Scholar 

  10. 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)

    Chapter  Google Scholar 

  11. Goetz, B.: Lambda Expression Translation in Java 8. Oracle, http://cr.openjdk.java.net/~briangoetz/lambda/lambda-translation.html

  12. Goetz, B.: Lambda: A Peek Under The Hood. Oracle, JAX London (2012)

    Google Scholar 

  13. Goetz, B.: JSR 335, Lambda Expressions for the Java Programming Language. Oracle (March 2013), http://jcp.org/en/jsr/detail?id=335

  14. 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)

    Google Scholar 

  15. 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)

    Google Scholar 

  16. Haller, P., Odersky, M.: Scala Actors: Unifying thread-based and event-based programming. Theoretical Computer Science 410(2-3), 202–220 (2009)

    Article  MathSciNet  MATH  Google Scholar 

  17. Hewitt, C.: Procedural Embedding of knowledge in Planner. In: Proc. the 2nd International Joint Conference on Artificial Intelligence, pp. 167–184 (1971)

    Google Scholar 

  18. 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)

    Chapter  Google Scholar 

  19. 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)

    Article  MathSciNet  MATH  Google Scholar 

  20. 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)

    Chapter  Google Scholar 

  21. 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)

    Chapter  Google Scholar 

  22. 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)

    Google Scholar 

  23. Lea, D.: JSR 166: Concurrency Utilities. Sun Microsystems, Inc., http://jcp.org/en/jsr/detail?id=166

  24. Lee, E.A., Liu, X., Neuendorffer, S.: Classes and inheritance in actor-oriented design. ACM Transactions in Embedded Computing Systems 8(4) (2009)

    Google Scholar 

  25. 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)

    Article  Google Scholar 

  26. Meyer, B.: Applying “design by contract”. Computer 25(10), 40–51 (1992)

    Article  Google Scholar 

  27. Microsoft. Reactive Extensions. Microsoft, https://rx.codeplex.com/

  28. 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)

    Google Scholar 

  29. Rose, J.: JSR 292: Supporting Dynamically Typed Languages on the Java Platform. Oracle, http://jcp.org/en/jsr/detail?id=292

  30. Shipilev, A.: JMH: Java Microbenchmark Harness. Oracle, http://openjdk.java.net/projects/code-tools/jmh/

  31. 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)

    Chapter  Google Scholar 

  32. Typesafe. Akka. Typesafe, http://akka.io/

  33. Valim, J.: Elixir. Elixir, http://elixir-lang.org/

  34. 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)

    Google Scholar 

  35. Wirfs-Brock, R.J., Johnson, R.E.: Surveying Current Research in Object-oriented Design. Commun. ACM 33(9), 104–124 (1990)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics