Skip to main content

Session-Based Distributed Programming in Java

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 5142))

Abstract

This paper demonstrates the impact of integrating session types and object-oriented programming, through their implementation in Java. Session types provide high-level abstraction for structuring a series of interactions in a concise syntax, and ensure type-safe communications between distributed peers. We present the first full implementation of a language and runtime for session-based distributed programming featuring asynchronous message passing, delegation, and session subtyping and interleaving, combined with class downloading and failure handling. The compilation-runtime framework of our language effectively maps session abstraction onto underlying transports and guarantees communication safety through static and dynamic session type checking. We have implemented two alternative mechanisms for performing distributed session delegation and prove their correctness. Benchmark results show session abstraction can be realised with low runtime overhead.

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

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   109.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

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Acute homepage, http://www.cl.cam.ac.uk/users/pes20/acute

  2. Benton, N., Cardelli, L., Fournet, C.: Modern concurrency abstractions for C#. ACM Trans. Program. Lang. Syst. 26(5), 769–804 (2004)

    Article  Google Scholar 

  3. Carbone, M., Honda, K., Yoshida, N.: Structured Communication-Centred Programming for Web Services. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 2–17. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  4. Carbone, M., Honda, K., Yoshida, N., Milner, R., Brown, G., Ross-Talbot, S.: A theoretical basis of communication-centred concurrent programming. Published in [6] (2006)

    Google Scholar 

  5. CCR: An Asynchronous Messaging Library for C#2.0, http://channel9.msdn.com/wiki/default.aspx/Channel9.ConcurrencyRuntime

  6. W3C Web Services Choreography, http://www.w3.org/2002/ws/chor/

  7. Collingbourne, P., Kelly, P.: Inference of session types from control flow. In: FESCA. ENTCS. Elsevier, Amsterdam (to appear, 2008)

    Google Scholar 

  8. Coppo, M., Dezani-Ciancaglini, M., Yoshida, N.: Asynchronous Session Types and Progress for Object-Oriented Languages. In: Bonsangue, M.M., Johnsen, E.B. (eds.) FMOODS 2007. LNCS, vol. 4468, pp. 1–31. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  9. Corin, R., Denielou, P.-M., Fournet, C., Bhargavan, K., Leifer, J.: Secure Implementations for Typed Session Abstractions. In: CFS 2007. IEEE-CS Press, Los Alamitos (2007)

    Google Scholar 

  10. Dezani-Ciancaglini, M., Mostrous, D., Yoshida, N., Drossopoulou, S.: Session Types for Object-Oriented Languages. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 328–352. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  11. Fähndrich, M., Aiken, M., Hawblitzel, C., Hodson, O., Hunt, G.C., Larus, J.R., Levi, S.: Language Support for Fast and Reliable Message-based Communication in Singularity OS. In: EuroSys 2006. ACM SIGOPS, pp. 177–190 (2006)

    Google Scholar 

  12. Gay, S., Hole, M.: Subtyping for Session Types in the Pi-Calculus. Acta Informatica 42(2/3), 191–225 (2005)

    Article  MATH  MathSciNet  Google Scholar 

  13. Honda, K., Vasconcelos, V.T., Kubo, M.: Language primitives and type disciplines for structured communication-based programming. In: Hankin, C. (ed.) ESOP 1998 and ETAPS 1998. LNCS, vol. 1381, pp. 22–138. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  14. Honda, K., Yoshida, N., Carbone, M.: Web Services, Mobile Processes and Types. The Bulletin of the European Association for Theoretical Computer Science February(91), 165–185 (2007)

    Google Scholar 

  15. Honda, K., Yoshida, N., Carbone, M.: Multiparty Asynchronous Session Types. In: POPL 2008, pp. 273–284. ACM Press, New York (2008)

    Chapter  Google Scholar 

  16. IETF. Mobility for IPv4, http://dret.net/rfc-index/reference/RFC3344

  17. Lin, C.-K., Black, A.P.: DirectFlow: A domain-specific language for information-flow systems. In: Ernst, E. (ed.) ECOOP 2007. LNCS, vol. 4609, pp. 299–322. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  18. Neubauer, M., Thiemann, P.: An Implementation of Session Types. In: Jayaraman, B. (ed.) PADL 2004. LNCS, vol. 3057, pp. 56–70. Springer, Heidelberg (2004)

    Google Scholar 

  19. Occam-pi homepage, http://www.occam-pi.org/

  20. Pierce, B.C., Turner, D.N.: Pict: A programming language based on the pi-calculus. In: Plotkin, G., Stirling, C., Tofte, M. (eds.) Proof, Language and Interaction: Essays in Honour of Robin Milner. MIT Press, Cambridge (2000)

    Google Scholar 

  21. Polyglot homepage, http://www.cs.cornell.edu/Projects/polyglot/

  22. Sackman, M., Eisenbach, S.: Session types in Haskell, draft (2008)

    Google Scholar 

  23. Scribble Project homepage, http://www.scribble.org

  24. Sparkes, S.: Conversation with Steve Ross-Talbot. ACM Queue 4(2) (March 2006)

    Google Scholar 

  25. Spring, J.H., Privat, J., Guerraoui, R., Vitek, J.: StreamFlex: high-throughput stream programming in Java. In: OOPSLA, pp. 211–228. ACM Press, New York (2007)

    Google Scholar 

  26. SJ homepage, http://www.doc.ic.ac.uk/~rh105/sessionj.html

  27. Takeuchi, K., Honda, K., Kubo, M.: An Interaction-based Language and its Typing System. In: Halatsis, C., Philokyprou, G., Maritsas, D., Theodoridis, S. (eds.) PARLE 1994. LNCS, vol. 817, pp. 398–413. Springer, Heidelberg (1994)

    Google Scholar 

  28. UNIFI. International Organization for Standardization ISO 20022 UNIversal Financial Industry message scheme (2002), http://www.iso20022.org

  29. Welch, P., Barnes, F.: Communicating Mobile Processes: introducing occam-pi. In: Abdallah, A.E., Jones, C.B., Sanders, J.W. (eds.) Communicating Sequential Processes. LNCS, vol. 3525, pp. 175–210. Springer, Heidelberg (2005)

    Google Scholar 

  30. X10 homepage, http://x10.sf.net

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jan Vitek

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Hu, R., Yoshida, N., Honda, K. (2008). Session-Based Distributed Programming in Java. In: Vitek, J. (eds) ECOOP 2008 – Object-Oriented Programming. ECOOP 2008. Lecture Notes in Computer Science, vol 5142. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-70592-5_22

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-70592-5_22

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-70591-8

  • Online ISBN: 978-3-540-70592-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics