A Fluxtion event processor compiled to WebAssembly, driven from this page through the generic JSON bridge. Orders and prices are events; risk decisions, positions and market data come back through named sinks. No server, no AI on the path — the rules run on-device in WASM.
loading WASM…
Risk rule (in the SEP): reject if qty ≤ 0 or the resulting net position would exceed ±1000. Accepted orders update the position book via a JS-backed service.
| symbol | net position |
|---|---|
| none yet | |
desk.onEvent({ type:'order', symbol:'EURUSD', side:'buy', qty:100 }) ← JS sends a plain object
│
▼ the bridge wraps it as StringEvent("order", json); "type" routes it
┌─────────────────────────────────────────────────────────────┐
│ OrderRiskNode @OnEventHandler(filterString = "order") │
│ • book.position(sym) → reads browser state │ PositionBook
│ • limit rule (±1000) │ = your JS
│ • book.store(sym, next) → stores browser state │ (read + write)
│ • processReentrantEvent( Accepted | Rejected ) │
└──────────────────────────────┬──────────────────────────────┘
▼
re-injected as a TYPED event
│
subscribe(Accepted).map(toJson).sink("accepted")
│
▼ the value reaches the named sink
desk.subscribe('accepted', o => addRow(o)) → updates the UI
▸ price events flow the same way: PriceNode → PriceTick → "marketData" sink
▸ every node invocation above is recorded in the audit log below
(send an event to see the audit trail)
The whole app is the generic bridge plus one service wiring. The Java is the graph (risk rule + sinks); the JavaScript drives it with plain objects.