Expand description
GlobalRegistry — federation membership protocol with two halves.
-
GlobalRegistryClient: bound on every client Node. Records anAnnounceop whoseserver_peerinput wires the bootstrap-server identity through the graph (no struct field). On dispatch the client ships an envelope carryingctx.current.self_peerto the server’s well-knownGLOBAL_REGISTRY_SERVER_CREFcomponent, then refreshes its TTL/heartbeat state from the server’sHandshakereply. -
GlobalRegistryServer: bound on the server Node. Accepts inboundAnnounceenvelopes, registers the announcing peer in the runtimeAddressBookunder a server-assigned TTL, and replies with aHandshakecarrying(assigned_ttl_ns, heartbeat_interval_ns). Lazy eviction runs at the top of everySample/CurrentViewread.
The protocol carries no static peer identity on either side: the
client wires server_peer via graph input, and the server reads
the announcing peer from the inbound payload.
Structs§
- Global
Registry Client - Client half of GlobalRegistry. Holds TTL / heartbeat state echoed
from the server’s most recent Handshake; the server peer is wired
through the graph at every
Announceand is not a struct field. - Global
Registry Server - Server half of GlobalRegistry. Maintains
PeerId → (expires_at_ns, source_address)over the announced cohort and exposes the cohort as abb_runtime::contracts::PeerSelectorsource. Eviction is lazy:Sample/CurrentViewdrop entries whoseexpires_at_nshas elapsed before consulting the registry. - Global
Registry Server Config - Per-deployment knobs for
GlobalRegistryServer. All durations are in nanoseconds. Defaults follow the deep-research bound: 90 s TTL, 30 s floor, 5 min ceiling. - Handshake
- Handshake payload the server replies with on a successful
Announce. The client decodes TTL/heartbeat state and mergesserver_addressesinto its [AddressBook] entry for the server peer so subsequent dial attempts can pick any reachable endpoint.
Constants§
- GLOBAL_
REGISTRY_ CLIENT_ CREF - Well-known
ComponentRefthe server addresses the client’sGlobalRegistryClientcomponent at when delivering Handshake replies. Pinned on both sides. - GLOBAL_
REGISTRY_ DOMAIN - Atomic-op opset domain shared by both halves.
- GLOBAL_
REGISTRY_ SERVER_ CREF - Well-known
ComponentRefthe client addresses the server’sGlobalRegistryServercomponent at. Pinned on both sides; a production deployment would resolve via discovery.