Skip to content

Releases: openexch/match

v0.4.0-beta — settlement journal, totally-ordered egress, market data at the edge

Choose a tag to compare

@emrebulutlar emrebulutlar released this 22 Jul 11:00
71c353c

Second beta of the Open Exchange stack (match + oms + admin-gateway + trading-ui + assets — the
Assets Engine joins the coordinated version with this release). The theme: money you can replay,
egress you can order, market data anyone can watch.

Highlights

  • Settlement journal: a lossless, replayable per-node record of every trade and terminal
    event, carrying the OMS order ids (the money key), with watermark-gated retention and
    flush-error discard counters (#120, #121, #122, #123, #143, #135).
  • Totally-ordered egress (SBE v5 → v7): egressSeq puts a log-position order key on trade
    and status egress; engine reject reasons ride the status egress; TradesBatch carries the taker
    side and per-user status broadcast is gone (#74, #110, #119).
  • Order book you can trust: a single monotonic version chain across snapshots and deltas;
    chain-broken deltas are dropped and the book flagged stale instead of drifting; periodic
    resnapshot bounds gateway staleness; stale-snapshot guard at leader switchover (#71, #105,
    #108, #112, #114, #116).
  • Matching correctness: post-only honored on LIMIT_MAKER amends; taker terminates at the
    match cap instead of resting a crossed remainder; quantity<=0 rejected at admission; requote
    no longer exhausts the 64-slot/level cap (tombstone compaction) (#101, #103, #104, #106).
  • Market data at the edge: publish once, serve every viewer from Cloudflare — edge fan-out
    relay with liveness, gapped-replay and cold-start hardening; market.openexch.io live
    (#84, #85, #86, #99, #111).
  • Durable time series: market data lands in TimescaleDB; torn-OHLCV race on the live candle
    fixed (#72, #90, #107).
  • Consensus-path hygiene: hot-path logger.warn allocation guard; replication channels
    honor the configured term length; journal archive sync-level fix (#102, #118, #124, #127).
  • Observability: per-session egress observability on the ME leader; chain-break diagnostics
    at default log level; Grafana edge/demo alerts (#87, #114, #144).
  • Deps: Aeron 1.52.2, Agrona 2.5.0, SBE 1.39.0, netty 4.2.16.
  • Security: ships with netty 4.2.16.Final, closing CVE-2026-44891 (HIGH) (#131).

Full details in CHANGELOG.md. Beta / prerelease: no external security audit yet; not recommended for production deployments holding real funds.

v0.3.0-beta — the beta hardening release

Choose a tag to compare

@emrebulutlar emrebulutlar released this 04 Jul 23:45
7377741

First beta of the Open Exchange stack (match + oms + admin-gateway + trading-ui, one coordinated version). The theme: correctness and durability first, then security, observability, and a frozen wire contract.

Highlights

  • Exact money math: FixedPoint.multiply/divide are exact and throw on true overflow; overflowing orders are rejected at admission with OVERFLOW instead of silently truncating (#52). FixedPoint.parse gives an exact decimal-string round-trip for the money-as-strings API contract (#63).
  • Egress you can trust: an egress ordering primitive plus open-order membership resnapshot: order status can no longer be reordered or silently dropped across leader switchovers; the OMS reconciles from an authoritative snapshot. Divergence under storm testing (load + repeated leader kills): 14.05% before, 0.00% after (#53, #44).
  • Durability hardened: fail-fast on the archive-replay error hot-loop (#55); ClusterBackup watchdog + heartbeat with a power-loss drill validating RPO ≈ 0 (#57); OS tuning persisted across reboots (#56).
  • Observability: hot-path-safe node metrics, gateway /metrics, Grafana starter kit, alert rules, and engine diagnostic counters (#61, #62, #42).
  • Transport: external media-driver mode with per-profile tuning; verified 800k orders/sec @ 100% on the prod profile (#38, perf baseline in docs/perf/).
  • Gateway: per-client WebSocket backpressure with conflation and resync (#40).
  • Docs & release: umbrella stack docs: architecture + scope boundary, full configuration reference, fresh-clone quick start (docs/ARCHITECTURE.md, docs/CONFIGURATION.md, docs/QUICKSTART.md); OSS hygiene (SECURITY/CONTRIBUTING/CODE_OF_CONDUCT/CHANGELOG, SPDX headers); squash-only release flow documented.
  • CI: Trivy dependency and secret scanning (#43).

Full details in CHANGELOG.md. Beta / prerelease: no external security audit yet; not recommended for production deployments holding real funds.

v0.2.0-alpha — Array-backed order book

Choose a tag to compare

@emrebulutlar emrebulutlar released this 27 Jun 22:00
cff3fbe

Replaces the preallocated order book with an array-backed, geometry-free engine, and bounds the egress pipeline so matching nodes can't run out of memory under load.

Highlights

  • Array-backed order book — AA tree + pooled doubly-linked FIFO in flat primitive arrays. Geometry-free (no fixed price range/tick), no 64-orders-per-level cap (book-wide tunable pool with a loud BOOK_FULL), zero hot-path allocation. About 3x less memory (668 → 222 MB in-process; long[] 735 → 182 MB live), now proportional to resting orders.
  • Egress hardened — egress buffers were bounded by entry count but not by bytes, so a slow consumer or replaying a large log could exhaust the heap and OOM the matching/consensus threads. Now byte-bounded end to end (~176 MB cap); sheds load with a loud log + OMS reconciliation instead of crashing.
  • Default engine is now array — set MATCH_ENGINE_IMPL=direct to fall back to the preallocated engine.

Validated (single Intel 13700K, 3-node Raft cluster, dev/local)

  • Sub-microsecond matching (p50 ~0.3 µs), flat across load.
  • 281,000 orders/sec at 100% success (limited by the test rig, not the cluster).
  • The 400k orders/sec overload that previously OOM'd two nodes now runs clean, 0 OOM.

Both engines run the determinism corpus and are byte-identical except for the intended 64-cap change. Full diff and commit breakdown in #27.

Tunables: match.engine.book.capacity (default 131072/side), match.egress.buffer.max (default 200k).

Alpha / prerelease.

v0.1.0-alpha — First Alpha

Pre-release

Choose a tag to compare

@emrebulutlar emrebulutlar released this 08 May 08:22
7c8a946

First alpha release of the Open Exchange matching engine.

⚠️ Alpha software. The project is under active development. Internals, APIs, and tuning parameters may change. This tag exists primarily as a stable snapshot for the Medium post describing the system's low-latency design — the file references and line counts in that article match this release.

What's in this release

  • Aeron Cluster (Raft-replicated, 3 nodes) hosting the matching engine state machine
  • DirectIndexOrderBook — O(1) order book with direct array indexing on price
  • DirectMatchingEngine — zero-allocation match loop with pre-allocated result arrays
  • SBE wire format for ingress and egress (order-schema.xml)
  • LMAX Disruptor per-market event publishing with BusySpinWaitStrategy
  • HTTP order gateway (port 8080) and WebSocket market gateway (port 8081)
  • Go-based admin gateway (port 8082) for cluster control, snapshots, and rolling updates
  • Load test harness with quick / baseline / stress / endurance / progressive scenarios

Measured latency (10k orders/sec, 60s sustained)

Percentile End-to-end
p50 ~12 µs
p99 ~45 µs
p99.9 ~85 µs

Core match step in isolation: 300–800 ns.

Companion repo

Pair this with openexch/oms@v0.1.0-alpha for the full risk + ledger layer in front of the matcher.

Status

Alpha — expect rough edges. Issues and contributions welcome.