Skip to content

Operation flow atlas ​

This atlas is a reference for the former checkpoint engine and its fixtures. It is not the serving Redis path. Serving authority, direct ingress, physical evidence and scheduling are owned by Binary Redis core and Service runtime; Memory is owned by Resident Memory core. The flowcharts in those owning chapters describe the serving implementation.

Reading order and ownership ​

ChapterWhat to trace there
Execution, storage and physical effectsEvery reducer input, common CAS pipeline, read projections, Redis scripts, codecs, physical/callback phases, local concurrency and retained state
Scheduling, connections and lifecycleControl leases, owned queues, coordinator/repair, completion waiting, retention, cross-worker reopen, outages and graceful termination
SIP operation flowsLocal challenges/denials, initial and refreshed requests, subscriptions/NOTIFY, both INVITE directions, responses/ACK, CANCEL, BYE and other dialog requests

Architecture owns component boundaries. The runtime owns exact state, proof and scheduling invariants; protocol owns the public contract. The atlas owns the source-to-operation traversal and work accounting. Follow those links for exact limits rather than maintaining another field catalogue here. An application integration must supply its own policy, business-store and media map: sipbridge does not own those operations.

Do not conflate these units ​

flowchart LR
    A[One SIP request or response] --> B[Local parsing and admission]
    B --> C[Zero or more control RPCs]
    C --> D[One or more reducer inputs]
    B --> D
    D --> E[State adapter calls]
    E --> F[Redis script invocations]
    F --> G[Several atomic internal Redis commands]
    D --> H[Committed external effects]
    H --> I[Socket or controller IO]
    I --> D

One SIP message is not one Redis operation. One Redis script is not one HGET, nor one network round trip for every Lua command. A write of a SIP response is not a proof of peer receipt. A final SIP response, a command result, a receiver callback receipt and a physical-write settlement are distinct outcomes.

The default Memory runtime keeps typed protocol records and immutable native messages in process. It stages touched records, publishes them under a short context lock, then releases the lock before I/O. It does not enter the graph or codec pipeline shown above. The Redis checkpoint runtime uses that pipeline and keeps authoritative protocol state in Redis. Neither carries a mutable protocol aggregate across external I/O. Exact Memory invariants and its execution flow are owned by Resident Memory core.

The lifecycle changes in this revision are narrow: JSON control validates and decodes each envelope, and Memory can release completed reliable REGISTER procedures when their duties end. Follow the wire boundary and retention links for the source map.

A concrete repeated path: successful reliable NOTIFY ​

For Redis checkpoint execution, take a fresh controller-originated subscription NOTIFY on an accepted live flow, with successful peer response, definite commits, no contention, no digest retry and no exceptional owner transition. The core logical mutations are:

MutationWhy it occursGroup processing
commandCommit new local CSeq, native client request and physical obligationNormal group decode, preparation, transition, finish and encoding
reserveAdmit exactly one physical attempt on the selected flowWhole group decode remains; eligible metadata path preserves protocol bytes/budget
completeCommit actual physical outcome and native settlement evidenceNormal reduction; can update results and causal obligations
native-ingestSelect and validate peer final against the retained client transactionSelection and reduction share the authoritative update record; eligible ended NOTIFY can retire

Each successful mutation has the common ReadUpdate/CAS pair: eight warm script invocations across these four logical transitions in this selected case, before separately accounting for callback/preflight branches, worker queue discovery/acknowledgement, operation waiting, transport validation or cold/NOSCRIPT retries. This is a core-path count, not a universal round-trip count for every NOTIFY. A response arriving before physical settlement changes ordering without making either proof optional. Cross-worker physical delivery adds discovery work; local fresh-commit projections can avoid some reads.

Completion selection now shares the response reduction's authoritative ReadUpdate; there is no preliminary ReadState/group decode for this path. The native transaction can disappear after the successful final and positive settled proof, but earlier transitions still decoded and traversed the same subscription group. Retained SUBSCRIBE servers are still in that group. The current client-retirement improvement therefore reduces the material handled by future operations; it does not collapse the four mutation boundaries into one. See physical emission, conditional call counts and NOTIFY.

Operation coverage checklist ​

SurfaceCovered operations
Physical ingressTCP/TLS accept and close, UDP framing/order lanes, keepalive/framing, method denial, required-auth challenge and local ACK proof
Native ingressNew context allocation, exact existing lookup, controller-admitted ingest, retained completion, scoped refusal, request replay and unmatched response
Public controlJSON hello/status/heartbeat, Memory RequestDecision or checkpoint Ingest, four Command actions, Inspect, physical Write/InspectEffect, optional controller-context inventory
Native mutation catalogueAll fifteen current stateEngineInput.Kind cases in the execution inventory
Application effectsPresentation, lifecycle event, flow adoption, credential lookup, application probe and network open; distinct start/result rules
Physical effectsNative permit preparation, indexed discovery, Reserve, one socket attempt, Complete, inspection, settlement and reclamation
SIP proceduresREGISTER, OPTIONS, SUBSCRIBE refresh/unsubscribe, NOTIFY, UAS/UAC INVITE, provisional/final/fork response, ACK, CANCEL, BYE, re-INVITE, REFER and generic supported dialog requests
Shared stateFull/projection reads, replay/uncertainty, CAS conflict, state/owner guards, quotas, receipt expiry, selectors and serialization
Background/lifecycleOwned deadlines/wakes, worker heartbeat, leader acquisition/renewal, unowned fallback, takeover/repair, owner expiry, completion polling, certificate reload, readiness and bounded shutdown
Failure and continuityStore outage/failover/loss, controller loss, physical UNKNOWN, early setup failure, reopened TLS on another worker, late successful fork and native post-answer completion

Certificate/health/capture details continue to live in the linked health, observability and deployment guides. They are not hidden extra native reducer kinds.

Reading the atlas for simplification ​

Start with a complete operation, including controller and physical consequences. For each step, record whether it reads current authority, creates a protocol obligation, records irreversible evidence, merely derives a projection, or only repeats data conversion. Keep those classes distinct when proposing a change.

The desired continuity requirement can justify retaining native dialog and subscription identity across workers without justifying every retained setup object, every result representation or every repeated traversal. Conversely, TCP delivery does not make an interrupted process's socket/store boundary atomic. A simplification must say which post-answer, NOTIFY, sequence, flow and physical UNKNOWN behaviors survive, and which setup/recovery behavior it intentionally stops promising. The atlas itself describes the checkpoint engine's behavior; proposed removals and their qualification belong in a separate design analysis.

sipbridge holds SIP connections and runs the protocol; your application decides what happens on each call.