Skip to main content

Kilim: Isolation-Typed Actors for Java

(A Million Actors, Safe Zero-Copy Communication)

  • Conference paper
ECOOP 2008 – Object-Oriented Programming (ECOOP 2008)

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

Included in the following conference series:

Abstract

This paper describes Kilim, a framework that employs a combination of techniques to help create robust, massively concurrent systems in mainstream languages such as Java: (i) ultra-lightweight, cooperatively-scheduled threads (actors), (ii) a message-passing framework (no shared memory, no locks) and (iii) isolation-aware messaging.

Isolation is achieved by controlling the shape and ownership of mutable messages – they must not have internal aliases and can only be owned by a single actor at a time. We demonstrate a static analysis built around isolation type qualifiers to enforce these constraints.

Kilim comfortably scales to handle hundreds of thousands of actors and messages on modest hardware. It is fast as well – task-switching is 1000x faster than Java threads and 60x faster than other lightweight tasking frameworks, and message-passing is 3x faster than Erlang (currently the gold standard for concurrency-oriented programming).

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Armstrong, J.: Making Reliable Distributed Systems in the Presence of Software Errors. PhD thesis, The Royal Institute of Technology, Stockholm (2003)

    Google Scholar 

  2. Armstrong, J., Virding, R., Wikström, C., Williams, M.: Concurrent Programming in Erlang. Prentice-Hall, Englewood Cliffs (1996)

    Google Scholar 

  3. Adya, A., Howell, J., Theimer, M., Bolosky, W.J., Douceur, J.R.: Cooperative Task Management Without Manual Stack Management. In: USENIX Annual Technical Conference, General Track, pp. 289–302 (2002)

    Google Scholar 

  4. von Behren, R., Condit, J., Zhou, F., Necula, G., Brewer, E.: Capriccio: Scalable threads for Internet Services. In: 19th ACM Symposium on Operating Systems Principles (2003)

    Google Scholar 

  5. Bevin, G.: Rife, http://rifers.org

  6. Boehm, H.J.: Threads cannot be implemented as a library. In: ACM Conf. on PLDI, pp. 261–268 (2005)

    Google Scholar 

  7. Boyapati, C., Lee, R., Rinard, M.C.: Ownership types for safe programming: preventing data races and deadlocks. In: Proc. of OOPSLA, pp. 211–230 (2002)

    Google Scholar 

  8. Boyapati, C., Liskov, B., Shrira, L.: Ownership types for object encapsulation. In: Proc. of ACM POPL, pp. 213–223 (2003)

    Google Scholar 

  9. Boyland, J., Noble, J., Retert, W.: Capabilities for sharing: A generalisation of uniqueness and read-only. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 2–27. Springer, Heidelberg (2001)

    Chapter  Google Scholar 

  10. Boyland, J.: Alias burying: Unique Variables Without Destructive Reads. Softw. Pract. Exper. 31(6), 533–553 (2001)

    Article  MATH  Google Scholar 

  11. Briot, J.P., Guerraoui, R., Löhr, K.P.: Concurrency and distribution in object-oriented programming. ACM Comput. Surv. 30(3), 291–329 (1998)

    Article  Google Scholar 

  12. Clarke, D.G., Potter, J., Noble, J.: Ownership types for flexible alias protection. In: Proc. of OOPSLA, pp. 48–64 (1998)

    Google Scholar 

  13. Clarke, D., Wrigstad, T.: External uniqueness is unique enough. In: Cardelli, L. (ed.) ECOOP 2003. LNCS, vol. 2743, pp. 176–200. Springer, Heidelberg (2003)

    Google Scholar 

  14. Danaher, J.S., Lee, I.T.A., Leiserson, C.E.: Programming with exceptions in JCilk. Sci. Comput. Program. 63(2), 147–171 (2006)

    Article  MATH  MathSciNet  Google Scholar 

  15. DeCandia, G., Hastorun, D., Jampani, M., Kakulapati, G., Lakshman, A., Pilchin, A., Sivasubramanian, S., Vosshall, P., Vogels, W.: Dynamo: Amazon’s Highly Available Key-value Store. In: SOSP, pp. 205–220 (2007)

    Google Scholar 

  16. Drossopoulou, S., Clarke, D., Noble, J.: Types for Hierarchic Shapes. In: Sestoft, P. (ed.) ESOP 2006 and ETAPS 2006. LNCS, vol. 3924, pp. 1–6. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  17. Ennals, R., Sharp, R., Mycroft, A.: Linear types for Packet Processing. In: Schmidt, D. (ed.) ESOP 2004. LNCS, vol. 2986, pp. 204–218. Springer, Heidelberg (2004)

    Google Scholar 

  18. 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: Proc. of EuroSys (2006)

    Google Scholar 

  19. Foster, J.S., Terauchi, T., Aiken, A.: Flow-sensitive type qualifiers. In: ACM Conf. on PLDI, pp. 1–12 (2002)

    Google Scholar 

  20. Ganz, S.E., Friedman, D.P., Wand, M.: Trampolined style. In: ICFP, pp. 18–27 (1999)

    Google Scholar 

  21. Haack, C., Poll, E., Schäfer, J., Schubert, A.: Immutable objects for a Java-like language. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 347–362. Springer, Heidelberg (2007), http://www.cs.ru.nl/~chaack/papers/papers/imm-obj.pdf

    Chapter  Google Scholar 

  22. Haller, P., Odersky, M.: Event-based programming without inversion of control. In: Proc. Joint Modular Languages Conference. Springer, Heidelberg (2006)

    Google Scholar 

  23. Hoare, C.A.R.: Communicating sequential processes. Communications of the ACM 21(8), 666–677 (1978)

    Article  MATH  MathSciNet  Google Scholar 

  24. Hogg, J., Lea, D., Wills, A., de Champeaux, D., Holt, R.C.: The Geneva Convention on the treatment of object aliasing. OOPS Messenger 3(2), 11–16 (1992)

    Article  Google Scholar 

  25. JavaFlow: The Apache Software Foundation: http://jakarta.apache.org/commons/sandbox/javaflow

  26. Kobayashi, N.: Quasi-linear types. In: Proc. of ACM POPL, pp. 29–42 (1999)

    Google Scholar 

  27. Lea, D.: A Java fork/join framework. In: Java Grande, pp. 36–43 (2000)

    Google Scholar 

  28. Milner, R.: Communicating and Mobile Systems: the π-calculus. Cambridge University Press, Cambridge (1999)

    Google Scholar 

  29. Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis. Springer, Heidelberg (1999)

    MATH  Google Scholar 

  30. Pettyjohn, G., Clements, J., Marshall, J., Krishnamurthi, S., Felleisen, M.: Continuations from generalized stack inspection. In: ICFP, pp. 216–227 (2005)

    Google Scholar 

  31. Salcianu, A., Rinard, M.C.: A combined pointer and purity analysis for Java programs. In: MIT Technical Report MIT-CSAIL-TR-949 (2004)

    Google Scholar 

  32. Spring, J.H., Privat, J., Guerraoui, R., Vitek, J.: Streamflex: High-throughput stream programming in Java, 211–228 (2007)

    Google Scholar 

  33. Srinivasan, S.: A thread of one’s own. In: Workshop on New Horizons in Compilers (2006), http://www.cse.iitb.ac.in/~uday/NHC-06/advprogram.html

  34. Tschantz, M.S., Ernst, M.D.: Javari: adding reference immutability to Java. In: Proc. of OOPSLA, pp. 211–230 (2005)

    Google Scholar 

  35. Welch, P.: JCSP, http://www.cs.kent.ac.uk/projects/ofa/jcsp

  36. Welsh, M., Culler, D.E., Brewer, E.A.: SEDA: An architecture for well-conditioned, scalable internet services. In: SOSP, 230–243 (2001)

    Google Scholar 

  37. Wilhelm, R., Sagiv, S., Reps, T.W.: Shape analysis. In: Watt, D.A. (ed.) CC 2000 and ETAPS 2000. LNCS, vol. 1781, pp. 1–17. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

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

Srinivasan, S., Mycroft, A. (2008). Kilim: Isolation-Typed Actors for 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_6

Download citation

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

  • 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