synit-manual/src/operation/system-bus.md

2.3 KiB

The System Bus: 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.

  1. It provides a root system bus service for use by other programs. In this way, it is analogous to D-Bus.

  2. It provides 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.

  3. It provides a limited configuration scripting language suitable for programming dataspaces with simple reactive behaviours.

  4. It provides an inotify-based configuration loader which loads and executes configuration files written in the scripting language.

  5. It provides process supervision and dependency tracking services for starting other programs.

The main 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.