Implementing the SSH protocol in Syndicate
This past week I have been dusting off my old implementation of the SSH protocol in order to exercise the new Syndicated Actor design and implementations. You can find the new SSH code here. (You’ll need the latest Syndicate/rkt implementation to run it.)
The old SSH code used a 2014 dataspace-like language dialect called “Marketplace”, which shared some concepts with modern Syndicate but relied much more heavily on a pure-functional programming style within each actor. The new code uses mutability within each actor where it makes sense, and takes advantage of Syndicate DSL features like facets and dataflow variables that I didn’t have back in 2014 to make the code more modular and easier to read and work with.
Big changes include:
-
A protocol for streams, and revision of the TCP/IP driver to use it;
-
A protocol for services and service activations, and revision of the Syndicate/rkt implementation to use it;
-
Implementation of queries over dataspace contents, as described in my dissertation. Queries establish a reactive connection from dataspace contents to facet-local dataflow variables;
plus a couple of small Syndicate/rkt syntax changes (renaming when
to on
, making the notion of “event expander” actually useful, and a
new once
form for convenient definition of state-machine-like
behaviour).