3 ms·
I assume your live subscribers are external people over the internet? The trading platforms I've worked on tend to order things into a single stream that you c
by tikkabhuna 5y ago
I assume your live subscribers are external people over the internet?
The trading platforms I've worked on tend to order things into a single stream that you can act upon. This helps with testing, race conditions, auditability. You will want to be able to replay an exact series of events to recreate conditions.
LMAX Disruptor[1] and Aeron[2] are two open source examples of something widely used, either using the libraries themselves or as concepts.
Some things that trading systems (generally?) need which you may not, which might simplify your architecture:
- Every message must be delivered and in order. UDP is usually used over TCP, as the platform will likely want more control over handling missed messages.
- It will be common to have read/write applications that need to add a message as a response. Writing is difficult as you need to be quick, otherwise a subsequent message from another application might invalidate your message.
Do subscribers need older data? How do dropped packets impact the system? Can they just be forgotten? What latency requirements do you have? Do subscribers also write to the same stream?
- [1] https://lmax-exchange.github.io/disruptor/ https://lmax-exchange.github.io/disruptor/
- [2] https://github.com/real-logic/aeron https://github.com/real-logic/aeron
- adampk 5y agoThis is great thank you much appreciated!