Owl architecture
Owl connects observations from experiment scripts to a live or replayable view of the experiment network. Publishers describe changes to nodes and links; the Owl server records them in RabbitMQ streams and delivers them to readers. The browser viewer combines those observations with the attached realization's network model from the SPHERE portal.
Components and connections
The diagram shows the logical connections. In the supplied
SPHERE deployment, RabbitMQ and the Owl server run as
containers on a control experiment node. Event generators run on experiment
nodes, and the viewer runs in a separate XDC. The backend can also run in
Kubernetes.
| Component | Responsibility |
|---|---|
| Publishers | Experiment scripts and applications use the owl CLI or API to send observations, legends, and topology snapshots. They must generate observations explicitly; Owl does not collect network activity automatically. |
| Owl server | A Go service exposing owl.v1.OwlService through Connect RPC over HTTP. It timestamps incoming records, writes and reads RabbitMQ streams, and schedules replay delivery. It listens on port 80 inside its container. |
| RabbitMQ | Stores the ordered event history for each Owl ID using the RabbitMQ stream plugin. The server connects through the broker's stream protocol, normally on port 5552. |
| CLI reader | Reads history or follows live events directly from the backend. It can also publish, stop a reader, or delete history. |
| XDC web server | A Node service on port 8080 that serves the built React app, exposes attachment and topology endpoints, and proxies allowed Owl requests through /api. |
| Owlview browser app | Displays the topology, legend, inspector, and searchable event feed. It requests events through the XDC web server at the same origin. |
| SPHERE services | Launch and Kratos supply the login session. The portal API checks materialization access and supplies the realization and revision used to build the topology. |
From an observation to a replay
- A publisher sends observations for an Owl ID. Each entity event identifies a node or two-node link and changes one characteristic: state, color, or shape. It may also include a message, narrative, and duration.
- The server assigns its current timestamp to each event in the request. Events
in the same request share that timestamp. It encodes each
StreamEventas Protobuf and appends the records to the corresponding RabbitMQ stream. - A reader opens
GetEventsStreamwith a client ID, a starting position, and a playback speed. The starting position can be a numeric offset, a timestamp, or the live tail. The browser exposes offset and live controls; timestamp selection is available through the CLI and API. - The server reads records from RabbitMQ and paces delivery using their stored
timestamps. Speed
0delivers without playback delays; speed1preserves the recorded spacing. Replay stays connected after catching up, receiving newly published events. - The browser applies received entity events to matching nodes and links in the topology, updates the legend when a legend record arrives, and adds entity events to its feed. Restarting playback clears the displayed history and reconstructs the view from the records received on the new connection.
Entity events, legend snapshots, and topology snapshots share one ordered history, so all three consume offsets. The server declares streams on demand with a maximum length of 2 GB per stream. Retention can remove older records, including setup events needed to reconstruct an earlier view.
The server controls replay pacing, while the browser controls temporary visual changes. A duration starts when the browser receives an event and uses elapsed real time, independently of playback speed. See the event format reference for record structure and the browser guide for duration behavior.
How the XDC selects and authorizes a stream
The viewer follows the XDC attachment. The XDC web server reads
/etc/mergetb/attached_state.json and forms the Owl ID as
REALIZATION.EXPERIMENT.PROJECT (rid.eid.pid). The browser polls
/attached-state.json every two seconds. An attachment change selects a new
stream and clears the previous view; a detached XDC has no selected stream.
For browser requests, the XDC web server performs the following checks:
- Validate the Launch session cookie through Kratos. This applies to the app, static assets, attachment and topology endpoints, and Owl API requests.
- Before returning attachment or topology data, check access to the attached materialization through the SPHERE portal API.
- For
/apirequests, require the requested Owl ID to match the XDC attachment, check materialization access, and allow onlyGetEvents,GetEventsStream,StopEventsStream, andDeleteStream. - During an event stream, recheck the attachment, session, and materialization access every 15 seconds by default. Close the upstream connection if any check fails or the attachment changes.
The backend itself has no authentication or per-stream authorization. Its private network endpoint is used directly by publishers and CLI readers; those requests do not pass through the XDC checks. Keep the backend within the intended private network or behind deployment access controls. Publishing is not exposed through the viewer's proxy. See viewer deployment for proxy and access configuration.
How the experiment topology is displayed
For /topology.json, the XDC web server asks the portal for the attached
realization, follows its revision hash, and projects the revision's XIR nodes
and links into a topology for the browser. The topology can therefore appear
before any Owl events have been published.
The experiment model defines every experiment node and link. Node observations update those nodes by name, or create additional visualization nodes for names outside the experiment model. Link observations update existing two-node endpoint pairs. Links with more than two endpoints are drawn as LAN junctions; Owl link events currently address two-node links only.
Topology snapshots in event history are available to other consumers, but the XDC viewer gets the experiment model from the SPHERE portal as its initial topology source. Additional visualization nodes serve observability purposes without changing that experiment model. Legends come from the event stream: replay must include a legend record for its descriptions to appear. Starting at a later offset can omit earlier styling and legends.
Reader and history lifecycle
An Owl ID identifies shared history. A client ID identifies a reader within that stream. Stopping a reader closes its event connection without stopping publishers or removing history. The server tracks active readers in memory; with multiple server replicas, a stop request must reach the process handling that reader.
Deleting an entity appends a deletion record, preserving earlier observations. Deleting a stream erases its shared history and recreates an empty stream with the same ID. Publishers can immediately fill it again. See the CLI guide for these operations and server setup for deployment and storage details.