|
A11 (C++ runtime)
Native C++ implementation of the A11 action and streaming runtime
|
This is the reference for A11's native C++ runtime — the layer that actually runs actions, moves streamed data, and multiplexes network transports. It is implemented in C++20 under cpp/a11/ and exposed to Python with pybind11.
Application developers do not need this layer: the Python API is the public contract, and everything here is bound one-to-one into it. These pages are for contributors to the runtime itself and for anyone who wants to understand what happens beneath the Python surface. Where a class has a Python counterpart, its behaviour is identical — the Python docstrings and this reference describe the same object.
A11 is a small stack of layers, each written against the one below it:
a11::Task, executors, schedulers) every asynchronous operation is built on. Awaitables returned across the runtime "resolve when …" some work completes.a11::data::Chunk, a11::data::NodeFragment, a11::data::WireMessage) and the a11::data::SerializationRegistry that maps application objects to and from chunks.a11::stores::ChunkStore, the ordered, appendable log that holds a stream's data, with ChunkStoreReader/ChunkStoreWriter cursors over it. The default LocalChunkStore keeps data in memory; the interface is a pluggable extension point.a11::nodes::AsyncNode, the unit of streaming state (an ordered sequence of chunks, keyed by sequence number) that one side writes and another reads, optionally mirrored to a peer over a wire stream. NodeMap groups the nodes of a peer.a11::net::WireStream, the transport abstraction, and its implementations (in-process, WebSocket/HTTP2, HTTP SSE, WebRTC) plus the signalling used to establish peer connections. A wire stream's delivery is unordered but synchronised on closure.a11::actions::Action, the schema-described unit of work whose typed input/output ports are async nodes, together with ActionRegistry and the ActionSchema family that describe an action's interface.a11::service::Session, the connection-scoped runtime that attaches wire streams, dispatches incoming action calls against a registry, and tracks their lifetimes so a connection can drain and close cleanly.a11::nodes::AsyncNode, a11::stores::ChunkStore.a11::actions::Action, a11::actions::ActionRegistry.a11::net::WireStream, a11::service::Session.For task-oriented walkthroughs and the Python API, see the main A11 documentation.