Skip to content

Exchange architecture #8

@spencerbug

Description

@spencerbug

Current thread structure:

Thread 1: Input queue. (Orders like add, modify and cancel)
Receives incoming orders via AMQP and puts them on a FIFO buffer for the matching engine to read atomically

Thread 2: Matching Engine
Reads from input queue, then performs an order execution, then writes transpired events (add, modify, cancel, and executions) to the output queue. Every so often it will perform a garbage collect to clear memory from the tree/cache

Thread 3: Output queue
Takes events written to the output queue and publishes them via UDP broadcasts

We need to have locks and/or atomics on these to make this happen

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions