Getting Started
Prerequisites
- .NET 10 SDK
- Access to the private Virtufin registries (
Virtufin.*NuGet packages, including virtufin-execution-devkit). - Python 3 (for the deployment scripts --
virtufin-api, the Python gRPC gateway client, needs to be importable).
Run the tests
dotnet build Virtufin.ExecutionEngines.slnx
dotnet test Virtufin.ExecutionEngines.slnx
Deploy a worker
Each worker directory (SimulatedExecutor/, ShadowExecutor/,
LiveExecutor/) has its own config/config.json + scripts/*.py
deployment wrappers (thin wrappers over @common/scripts/, same
pattern virtufin-strategies uses):
cd SimulatedExecutor
python3 scripts/build_managed.py --csproj src/Virtufin.Worker.SimulatedExecutor/Virtufin.Worker.SimulatedExecutor.csproj
python3 scripts/publish.py --worker-nupkg /tmp/worker-out/Virtufin.Worker.SimulatedExecutor.nupkg
python3 scripts/create_worker.py --api-client-host localhost --api-client-port 5002
config.json's topics (a JSON list -- CreateWorkerRequest.topics,
not a wildcard: the deployed Dapr pubsub component is Redis
Streams, which has no wildcard subscription support) defaults to a
placeholder scenario for SimulatedExecutor/ShadowExecutor; edit it
or pass --topic (repeatable) per deployment. LiveExecutor's
already defaults correctly to sc.LIVE.trading.order.submitted, the
only scenario it should ever serve.
Other lifecycle scripts (@common/scripts/list_workers.py,
start_worker.py, stop_worker.py, delete_worker.py,
recover_workers.py, get_worker_history.py) take --config <path>
directly -- see each worker's README.
Build your own executor
See Development and the execution devkit
docs for
ExecutorWorkerBase<TState>'s contract; SimulatedExecutor in this
repo is a worked example.