Abstractions for software communication
: Programming protocols in typescript

  • J. (Jan) van Overveld

Student thesis: Master's Thesis


More software parallelization results in more software communication and therefore the need for software communication protocols. Protocol logic in a program is also called the coordination concern. Separating this coordination concern from the regular computation concern in a distributed application can result in higher quality software code. This can be achieved by providing a software engineer facilities for programming protocols based on a global protocol definition. Not only will the coordination be separated from the compu-tation concern, but the defined protocol can also be statically validated. Generating the coordination layer for a distributed application also saves time and reduces programming errors instead of implementing this layer manually.
This thesis reports on research for adding software protocol abstractions to the pro-gramming language TypeScript. TypeScript is a statically compiled and typed version of the programming language JavaScript, which is a popular language for programming dis-tributed applications.
Various concrete abstractions that are needed for the protocol abstraction layer are di-vided over three conceptual layers. The first conceptual layer provides abstractions needed for starting the protocol and a role based messaging system. The second layer provides a programming interface for each distributed process that is part of the protocol. This in-terface will enable static protocol validation and with a professional development environ-ment, facilities like code statement completion and code navigation will be present. The third layer provides the global protocol definition with the corresponding programming syntax, through an external DSL.
A runtime facility for starting up the protocol, to make sure all involved distributed soft-ware processes are present, is called the Mediator. This Mediator role collects the physical address details of all the protocol involved roles and delivers this information to these roles. After this startup process the Mediator dies and the protocol has started for the involved protocol roles. Messages are specified and can be continuously received, but processed when a role is ready for a specific message. Static protocol validation is based on state machine simulation per role. The generated API will have objects for all states, and the methods of these objects represent the transitions between states. These transitions can only be made once, which is checked at runtime to guarantee protocol safety. Performance penalty tests indicate a low decrease of performance due to the extra abstraction layer, and this happens only when the amount of messages increase to high volumes.
Normally the implementation of the coordination concern of a distributed application can be error prone, but with a generated coordination layer and static validation, protocol constraints are enforced and therefore errors are reduced.
Date of Award7 Feb 2020
Original languageEnglish
SupervisorSung-Shik Jongmans (Examinator) & Marko van Eekelen (Co-assessor)

Cite this