MobilityReadingGroup

π-calculus, Session Types research at Imperial College

Distributed Programming Using Java APIs Generated from Session Types
Raymond HU
Behavioural Types: from Theory to Tools. p. 287 - 308

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.

@article{H2017,
  author = {Raymond Hu},
  title = {{Distributed Programming Using Java APIs Generated from Session Types}},
  journal = {Behavioural Types: from Theory to Tools},
  pages = {287--308},
  publisher = {River Publishers},
  year = 2017
}
@article{H2017,
  author = {Raymond Hu},
  title = {{Distributed Programming Using Java APIs Generated from Session Types}},
  journal = {Behavioural Types: from Theory to Tools},
  pages = {287--308},
  publisher = {River Publishers},
  doi = "10.13052/rp-9788793519817",
  year = 2017
}