Syndicated Actors for Rust (and a new extensible server implementation)
For my system layer project, I need a fast, low-RAM-usage, flexible, extensible daemon that speaks the Syndicate network protocol and exposes dataspace and system management services to other processes.
So I built one in Rust.
git clone
https://git.syndicate-lang.org/syndicate-lang/syndicate-rs
It uses the Syndicated Actor Model internally to structure its
concurrent activities. The actor model implementation is split out
into a crate of its own,
syndicate
, that can be used by
other programs. There is also a crate of macros,
syndicate-macros
, that
makes working with dataspace patterns over Preserves values a bit
easier.1
The syndicate
crate is
reasonably extensively documented.
The server itself is documented here.
The implementation includes:
-
Actor supervision, inspired by Erlang/OTP’s supervisors;
-
Full support for a tree of nested facets within each actor, representing that actor’s conversational contexts;
-
A generic implementation of point-to-point Syndicate network protocol, instantiated for plain TCP/IP, websockets, Unix domain sockets, and
stdin
/stdout
; -
A gatekeeper that resolves long-lived, “sturdy” references like
<ref "syndicate" [] #[acowDB2/oI+6aSEC3YIxGg==]>
to on-the-wire usable object capability references; -
An
inotify
-based configuration watcher service that monitors a directory full of Preserves text files for changes; -
and more!
-
Future work for
syndicate-macros
is to add syntactic constructs for easily establishing handlers for responding to assertions and messages, cutting out the boilerplate, in the same way that Racket’s syndicate macros do. In particular, having aduring!
macro would be very useful. ↩