Communicating Scala Objects -- LOOM release

ThreadCSO is the second substantive implementation of the Communicating Scala Objects DSL (CSO).

Though there are several more modern programming languages that provide channel-based communication, few provide the low-overhead compositional blend of CSO – inspired by CSP/OCCAM – that includes (potentially-guarded and timed) input and output alternations, “upstream” channel closing, straightforward clean network termination, etc.

ThreadCSO is published on GitHub now, with a few small example programs, in the hope that it may prove useful to someone as a pedagogical or a practical tool.

ThreadCSO can use virtual threads (from jdk20) alongside platform threads. These virtual threads provide dramatically enhanced possibilities for channel-based programming since tens or hundreds of thousands of them can be running in the same address space. Inter-process communication performance (between processes running on virtual threads) appears (in our tests) to better by order(s) of magnitude.

For more information including slides and the introductory paper, as well as the implementation for Scala 2.13 see:

A revised implementation for Scala 3 is under construction.

4 Likes