Tesser RFC-003: Programmable Execution Engines #83
Closed
EwigMidori
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Tesser RFC-003: Programmable Execution Engines
1. Motivation
1.1 The "Strategy vs. Execution" Separation
Traders often tweak when to buy (Strategy) separately from how to buy (Execution).
Currently, adding a new execution logic (e.g., "Chase Best Bid + 1 tick") requires modifying
tesser-execution, recompiling the CLI, and restarting the entire stack.1.2 Hot-Swapping & Multi-Tenancy
RFC-002 laid the groundwork for hot-swapping by isolating Actors. RFC-003 takes this further by allowing the
OmsActorto load execution logic as plugins. This is critical for:2. Proposed Architecture
We will introduce a Scripting / Plugin Layer into the
OrderOrchestrator.2.1 Technology Choice: Rhai or WASM?
.wasmfiles.Recommendation: WASM (using
wasmerorwasmtime). It aligns with the "Industrial-Grade" vision. It allows users to write high-performance execution algos in Rust and compile them to a portable format that Tesser loads safely.2.2 The
ExecutionPluginTraitWe will define a host-guest interface (ABI) for execution algorithms.
2.3 The
PluginOrchestratorThe
OmsActorwill manage a registry of loaded WASM modules.execution_hint = "plugin:chase_vwap.wasm".ChildOrderRequests which the Orchestrator validates and routes.3. Implementation Plan
3.1 Phase 1: The Host Environment
wasmerorwasmtimeintotesser-execution.wit(WASM Interface Type) or simplified ABI for passingTickandOrderstructs efficiently.3.2 Phase 2: Dynamic Loader
LiveSessionSettingsto accept aplugins_dirpath..wasmmodules automatically.3.3 Phase 3: Standard Library
Twap,Iceberg,Pegged) to the new WASM API as reference implementations.All reactions