Distributed programming using Java APIs generated from session types

Raymond Hu

Research output: Chapter in Book/Report/Conference proceedingChapter

6 Citations (Scopus)


This is a tutorial on using Scribble [9], a toolchain based on multiparty session types [1, 4], for distributed programming in Java. The methodology is based on the generation of protocol-specific Endpoint APIs from Scribble specifications [6]. We start with a brief recap of TCP network programming using standard Java APIs, and their limitations with regards to safety assurances. The main tutorial content is an overview of the key stages of the Scribble toolchain, from global protocol specification, through Endpoint API generation, to Java endpoint implementation, with examples. We discuss the hybrid form of session safety promoted by the Endpoint API generation approach. We then consider Scribble specifications and implementations of HTTP as a real-world use case. Finally, we demonstrate some further Scribble features that leverage Endpoint API generation to safely support more advanced communication patterns.

Original languageEnglish
Title of host publicationBehavioural Types
Subtitle of host publicationfrom Theory to Tools English
PublisherRiver Publishers
Number of pages22
ISBN (Electronic)9788793519817
ISBN (Print)9788793519824
Publication statusPublished - 31 Jul 2017
Externally publishedYes


Dive into the research topics of 'Distributed programming using Java APIs generated from session types'. Together they form a unique fingerprint.

Cite this