Skip to content

Components

Five moving parts, each with its own sub-site. Click through for the full reference; the sketches here are the architecture overview at one zoom level deeper.

virtufin-api — the gateway

The single public entry point. Discovers gRPC services via reflection, mirrors calls, exposes REST/JSON, brokers pub/sub and state on behalf of the rest of the platform.

flowchart LR
    subgraph VirtufinApi["virtufin-api"]
        GW[GrpcGateway]
        REF[GrpcReflectionService]
        PS[PubsubService]
        ST[StateService]
        CFG[ConfigService]
    end
    GW --> REF
    PS <--> DAPR1[(Dapr PubSub)]
    ST <--> DAPR2[(Dapr State)]
    CFG --> Files[services.json]

virtufin-websocketmanager — the upstream proxy

Owns the upstream exchange / data feed connections. Translates proprietary WS / FIX / REST into CloudEvent v1.0 envelopes on the act.exchange.<venue>.* topic lane. The rest of the platform never talks to an exchange directly.

flowchart LR
    EX[Upstream feed<br/>Binance, IB, etc.]
    WSM[WebSocketManager]
    PS[(Dapr PubSub)]
    EX <-->|WS / REST| WSM
    WSM -->|CloudEvent<br/>act.exchange.<venue>.*| PS

virtufin-workmanager — the worker orchestrator

Loads workers, dispatches events to them, manages worker lifecycle, exposes the worker-management gRPC interface. The API gateway is the worker runtime's control plane (state, pubsub); the WorkManager is the worker runtime's data plane.

flowchart TB
    WM[WorkManager]
    subgraph Engines
        E1[DotNetDllEngine<br/>in-process]
        E2[PythonEngine<br/>subprocess]
        E3[NativeDllEngine<br/>in-process]
        E4[CSharpSourceEngine<br/>in-process Roslyn]
    end
    WM --> E1
    WM --> E2
    WM --> E3
    WM --> E4
    E1 --> W1[Worker DLL]
    E2 --> W2[Python worker]
    E3 --> W3[Native .so]
    E4 --> W4[C# source]

virtufin-workers — the reference workers

The example workers, used as smoke tests, integration tests, and as starting points for new strategies. Ships with Binance orderbook, IBKR ticker, FX feed, and a "Hello World" worker in each supported language.

virtufin-openspec — the spec

The single source of truth for every cross-cutting contract on the platform. Specs are merged via the OpenSpec workflow (propose / continue / apply / verify / archive). All four of the services above link back to the relevant spec page.

flowchart LR
    SPEC[virtufin-openspec<br/>specs/*.md]
    API[API gateway] -.implements.-> SPEC
    WSM[WebSocketManager] -.implements.-> SPEC
    WM[WorkManager] -.implements.-> SPEC
    WK[Workers] -.implements.-> SPEC