The System Bus: syndicate-server
- Source code:
[syndicate-rs]/syndicate-server/
- Packaging:
[synit]/packaging/packages/syndicate-server/
The syndicate-server
program has a number of closely-related functions. In many ways, it is a
reification of the system layer concept itself.
It provides:
-
A root system bus service for use by other programs. In this way, it is analogous to D-Bus.
-
A configuration language suitable for programming dataspaces with simple reactive behaviours.
-
A general-purpose service dependency tracking facility.
-
A gatekeeper service, for exposing capabilities to running objects as (potentially long-lived) macaroon-style "sturdy references", plus TCP/IP- and Unix-socket-based transports for accessing capabilities through the gatekeeper.
-
An
inotify
-based configuration tracker which loads and executes configuration files written in the scripting language. -
Process startup and supervision services for running external programs.
The program can also be used as an "inferior" bus. For example, there may be a per-user bus, or a per-session bus, or both. Each bus would appropriately scope the lifetime of its supervised processes.
Finally, it can be used completely standalone, outside a Synit context.
The root system bus
The synit-pid1
program invokes syndicate-server
like this:
/usr/bin/syndicate-server --inferior --config /etc/syndicate/boot
The first flag, --inferior
, tells the server to expect to be able to communicate on its
stdin/stdout using the standard wire protocol. This lets synit-pid1
join
the community of actors running within the system dataspace.
The second flag, --config /etc/syndicate/boot
, tells the server to start monitoring the
directory tree rooted at /etc/syndicate/boot
for changes. Files whose names end with .pr
within that tree are loaded as configuration script files.
Almost all of Synit is a consequence of careful use of the configuration script files in
/etc/syndicate
.