MobilityReadingGroup

π-calculus, Session Types research at Imperial College

Type-Safe Eventful Sessions in Java
Raymond HU, Dimitrios KOUZAPAS, Olivier PERNET, Nobuko YOSHIDA, Kohei HONDA
24th European Conference on Object-Oriented Programming (ECOOP 2010). p. 329 - 353

Event-driven programming is a major paradigm in concurrent and communication-based programming, and a widely adopted approach to building scalable high-concurrency servers. However, traditional event-driven programs are more difficult to read, write and verify than their multi-threaded counterparts due to low-level APIs and fragmentation of control flow across disjoint event handlers. This paper presents a Java language extension and a novel type discipline for type-safe event-driven session programming that counters the problems of traditional event-based programming with abstractions and safety guarantees based on session types, while retaining the expressiveness and performance characteristics of events. The type discipline extends session types and their primitives with asynchronous input, session typecase and session set types, ensuring event-handling safety and event progress in addition to the standard type soundness and communication safety. The advantages, expressiveness and performance of event-driven session programming are demonstrated through a range of examples and benchmarks, including a session-typed SMTP server.

@inproceedings{HKPYH2010,
  author = {Raymond Hu and Dimitrios Kouzapas and Olivier Pernet and Nobuko Yoshida and Kohei Honda},
  title = {{Type-Safe Eventful Sessions in Java}},
  booktitle = {24th European Conference on Object-Oriented Programming},
  series = {LNCS},
  volume = {6183},
  pages = {329--353},
  publisher = {Springer},
  year = 2010
}
@inproceedings{HKPYH2010,
  author = {Raymond Hu and Dimitrios Kouzapas and Olivier Pernet and Nobuko Yoshida and Kohei Honda},
  title = {{Type-Safe Eventful Sessions in Java}},
  booktitle = {24th European Conference on Object-Oriented Programming},
  series = {LNCS},
  volume = {6183},
  pages = {329--353},
  publisher = {Springer},
  doi = "10.1007/978-3-642-14107-2_16",
  year = 2010
}