Type-safe eventful sessions in Java

Raymond Hu, Dimitrios Kouzapas, Olivier Pernet, Nobuko Yoshida, Kohei Honda

Research output: Chapter in Book/Report/Conference proceedingConference contribution

42 Citations (Scopus)


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.

Original languageEnglish
Title of host publicationECOOP 2010 - Object-Oriented Programming - 24th European Conference, Proceedings
Number of pages25
Publication statusPublished - 3 Aug 2010
Externally publishedYes
Event24th European Conference on Object-Oriented Programming, ECOOP 2010 - Maribor, Slovenia
Duration: 21 Jun 201025 Jun 2010

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume6183 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Conference24th European Conference on Object-Oriented Programming, ECOOP 2010


Dive into the research topics of 'Type-safe eventful sessions in Java'. Together they form a unique fingerprint.

Cite this