Efficient, low-latency and in-order trade processing has always been at the focus of financial institutions and investment banks. In a world where every millisecond counts, parallelizing the processing as much as possible is essential. This presentation describes the common patterns for parallelism when handling events at massive scale
19. Not Validated Validated Processed
Validator Processor
20.
21. Method Time in msec
Single Thread 300
Single Thread w/ Lock 10.000
2 Threads w/ Lock 224.000
Single Thread w/ CAS 5.700
2 Threads w/ CAS 30.000
Single Thread w/ Volatile
4.700
Write
http://disruptor.googlecode.com/files/Disruptor-1.0.pdf
Much more complicated than this example: Exchange vs Market maker / trader checking the target market is open to take orderschecking the order is valid for that marketchoosing the right matching policy for the type of ordersequencing the order so that each order is matched at the best possible price and matched with the right liquiditycreating and publicizing the trades made as a consequence of the matchupdating prices based on the new trades
Much more complicated than this example: Exchange vs Market maker / trader checking the target market is open to take orderschecking the order is valid for that marketchoosing the right matching policy for the type of ordersequencing the order so that each order is matched at the best possible price and matched with the right liquiditycreating and publicizing the trades made as a consequence of the matchupdating prices based on the new trades
Much more complicated than this example: Exchange vs Market maker / trader checking the target market is open to take orderschecking the order is valid for that marketchoosing the right matching policy for the type of ordersequencing the order so that each order is matched at the best possible price and matched with the right liquiditycreating and publicizing the trades made as a consequence of the matchupdating prices based on the new trades
Much more complicated than this example: Exchange vs Market maker / trader checking the target market is open to take orderschecking the order is valid for that marketchoosing the right matching policy for the type of ordersequencing the order so that each order is matched at the best possible price and matched with the right liquiditycreating and publicizing the trades made as a consequence of the matchupdating prices based on the new trades
Much more complicated than this example: Exchange vs Market maker / trader checking the target market is open to take orderschecking the order is valid for that marketchoosing the right matching policy for the type of ordersequencing the order so that each order is matched at the best possible price and matched with the right liquiditycreating and publicizing the trades made as a consequence of the matchupdating prices based on the new trades
Much more complicated than this example: Exchange vs Market maker / trader checking the target market is open to take orderschecking the order is valid for that marketchoosing the right matching policy for the type of ordersequencing the order so that each order is matched at the best possible price and matched with the right liquiditycreating and publicizing the trades made as a consequence of the matchupdating prices based on the new trades
Much more complicated than this example: Exchange vs Market maker / trader checking the target market is open to take orderschecking the order is valid for that marketchoosing the right matching policy for the type of ordersequencing the order so that each order is matched at the best possible price and matched with the right liquiditycreating and publicizing the trades made as a consequence of the matchupdating prices based on the new trades
Mechanical sympathy
Two principles – data with message, staged processing Locking with every write/takeMechanical sympathy
Mechanical sympathy
Mechanical sympathy
Two principles – data with message, staged processing Locking with every write/takeMechanical sympathy