Runtime Topology: YU08-execution-algo-engine
Parent state: YU07-historical-tick-store
Entrypointsβ
POST /algo/orders,GET /algo/orders/{parentOrderId},GET /algo/orders; the new HTTP surface onexecution-algo-engine(port 18120).- No new entrypoint on any existing service;
execution-algo-enginecallsorder-matcher's existingPOST /ordersandprice-publisher's existingGET /prices/{ticker}as a client, and adds itself as a subscriber on the existing/accounts/*/ordersbroadcast subject.
Componentsβ
- Inherits every Kubernetes/C3/FDC3/EOD/tick-store runtime component already present in
YU07-historical-tick-storeunchanged. execution-algo-engine(new): a single Spring Boot service, one Deployment, one ClusterIP Service (port 18120). No PVC; all durable state lives in theTRADERX_ALGO_ENGINEJetStream stream, not local disk.- NATS gains one new JetStream stream (
TRADERX_ALGO_ENGINE, created on first boot if absent, same idiom as YU04'sTRADERX_CONTROL_ACCOUNT/TRADERX_CONTROL_SECURITY) and one new core-NATS subscriber on/accounts/*/orders; no existing subject, stream, or publisher changes.
Networkingβ
execution-algo-engineconnects to the existingnats-brokerservice (JetStream + core NATS on the same connection),order-matcher(POST /orders), andprice-publisher(GET /prices/{ticker}); all in-cluster service DNS names, no new ingress route.- VWAP's
DuckDbVolumeProfileSourcereads directly fromgs://traderx-501015-tick-store(the same bucket YU07'stick-storewrites to) via DuckDB's native GCS support; same HMAC-credential mechanism astick-store(quickstart.md), read-only from this state's side.
Startup / Health Orderβ
- Generate and verify the inherited
YU07-historical-tick-storebaseline assets. - Start MariaDB, NATS, and inherited support services as in the parent state.
execution-algo-engineconnects to NATS, ensures theTRADERX_ALGO_ENGINEstream and its durable consumer exist, and replays every unacked event to rebuild in-memory parent-order state before servingGET /algo/orders*traffic.- The scheduler loop and the
/accounts/*/orderssubscriber start once replay completes; buckets whosestartEpochMshas already passed during downtime are submitted immediately on the next scheduler tick rather than skipped.
Degraded Behaviorβ
| Condition | Effect |
|---|---|
NATS unreachable from execution-algo-engine at boot | Startup blocks until the broker is reachable (unlike tick-store's retry-without-blocking capture loop); this service's own state lives in JetStream, so it cannot safely serve GET /algo/orders* before replay completes. |
order-matcher unreachable when a bucket is due | The scheduler retries that bucket on its next tick; no partial/duplicate submission occurs because the bucket is only marked submitted after a successful response. |
execution-algo-engine crashes mid-schedule | On restart, JetStream redelivers every unacked event; already-applied events are idempotent (each fully replaces the affected bucket's fields), so replay reconstructs the exact pre-crash state, and the scheduler resumes from there. |
price-publisher unreachable when a bucket is due | The scheduler retries that bucket on its next tick rather than submitting with a stale or fabricated price. |
DuckDbVolumeProfileSource query returns zero rows | Falls back to SyntheticVolumeProfileSource's weights (research.md Decision 7); VWAP scheduling still completes. |