Skip to main content

LMAX Sequencer Architecture (Trading Hot Path)

State 009 runtime with the trading hot path rebuilt as a sequenced, journaled, single-threaded in-memory BLP wired with disruptor rings; external contracts unchanged.

  • Generated from: system/architecture.model.json
  • Canonical flows: system/end-to-end-flows.md

Architecture Diagram​

Node Catalog​

NodeKindLabelNotes
developeractorDeveloperLocal developer using this state.
app_runtimeboundaryTraderX App RuntimeState 009 runtime baseline with the LMAX hot-path replacement.
obs_runtimeboundaryObservability RuntimeLGTM + OTel stack from state 007 carried forward with hot-path telemetry coverage.
ingressserviceNGINX IngressRoutes UI, API, and order admin traffic (unchanged).
trade_uiserviceAngular Trade UITrade ticket, order ticket, blotters, and admin tab (unchanged).
gatewayserviceGateway (Trade Service)Receptionist role: validates via in-memory replicas, maps ticker to securityId, fixed-point converts, SBE-encodes, submits sequenced input events.
price_publisherservicePrice PublisherMarket tick source (unchanged node); ticks enter the sequenced stream via the Gateway.
input_disruptorserviceInput Disruptor + SequencerPre-allocated ring; global sequence assignment; parallel journaler/replicator/un-marshaller; sequence barrier gating the BLP.
journalserviceEvent JournalDurable, replicated, authoritative append-only log of sequenced input events (Chronicle Queue / Aeron Archive).
blpserviceBusiness Logic ProcessorSingle thread, in-memory, event-sourced: order books, positions, caches; match + book + position + emit.
replica_blpserviceReplica BLP (warm standby)Consumes the replicated input stream in lock-step with output suppressed; promoted on leader failure. Loopback/stub in demo profile.
output_disruptorserviceOutput DisruptorSingle-producer egress ring with parallel marshaller, NATS publisher, and read-model projector handlers.
natsserviceNATS BrokerRealtime transport; subjects and payloads unchanged from 009.
projectorserviceRead-model ProjectorBatched, checkpointed, rebuildable async writer of OrderBook/trade/position rows.
databaseserviceShared Database (read-model)Same schema as 009; demoted to an async read-model projected from output events.
prometheusservicePrometheusScrapes hot-path, order, and allocation metrics plus blackbox probes.
blackboxserviceBlackbox ExporterProbes order endpoints and inherited runtime endpoints.
lokiserviceLokiAggregates runtime logs (hot-path logging is async/off-thread).
grafanaserviceGrafanaDashboards for ring headroom, sequence lag, BLP/egress latency, projector lag, allocation rate, GC pauses.