SlideShare ist ein Scribd-Unternehmen logo
1 von 54
http://www.nytimes.com/2011/08/27/business/as-trade-volumes-soar-exchanges-cash-in.html
http://www.nytimes.com/2011/08/27/business/as-trade-volumes-soar-exchanges-cash-in.html
http://www.bloomberg.com/news/2012-01-23/stock-trading-is-lowest-in-u-s-since-2008.html
http://www.tabbgroup.com/PublicationDetail.aspx?PublicationID=346
Buy        Sell
50, $12   60, $10

60, $11   100, $11

30, $10   30, $12
Price: $10

Buy                     Sell
50, $12                60, $10

60, $11                100, $11

30, $10                30, $12
Price: $10

Buy                     Sell
60, $11                10, $10

30, $10                100, $11

                       30, $12
Price: $10

Buy                     Sell
60, $11                10, $10

30, $10                100, $11

                       30, $12
Price: $10

Buy                     Sell
50, $11                100, $11

30, $10                30, $12
Price: $11

Buy                     Sell
50, $11                100, $11

30, $10                30, $12
Price: $11

Buy                    Sell
30, $10                50, $11

                       30, $12
Not Validated               Validated               Processed




                Validator               Processor
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
Queue (Lack of) Fairness


            50               Buy   Sell
                                   100
            60




Consumer         Consumer
 Thread 1         Thread 2
Queue (Lack of) Fairness


                             Buy   Sell
            50
                                   100




   60


Consumer         Consumer
 Thread 1         Thread 2
Queue (Lack of) Fairness
 Can you tell which order will be executed 1st?


                             Buy          Sell
                                          100




   60          50


Consumer    Consumer
 Thread 1    Thread 2
Validator   Processor
Processor thread pool per segment

Symbol=A-H    Symbol=I-S    Symbol=T-Z




Validator      Processor     Processor
Single Processor thread pool, pick random segment

      Symbol=A-H      Symbol=I-S     Symbol=T-Z




                      Processor
Single processor thread per segment

 Symbol=A-H    Symbol=I-S     Symbol=T-Z




 Processor      Processor      Processor
Shared thread pool, mark segments under processing (CAS)


                        Segment 1   Segment 2   Segment 3
Segment 1

Segment 2

Segment 3




                                    Processor
Shared thread pool, mark segments under processing (CAS)


                        Segment 1   Segment 2   Segment 3
Segment 1   X

Segment 2

Segment 3




                                    Processor
Shared thread pool, mark segments under processing (CAS)


                        Segment 1   Segment 2   Segment 3
Segment 1   X

Segment 2

Segment 3   X




                                    Processor
Shared thread pool, mark segments under processing (CAS)


                        Segment 1   Segment 2   Segment 3
Segment 1

Segment 2

Segment 3   X




                                    Processor
Segments are created and removed as needed




                          Processor
Segments are created and removed as needed

                    “GOOG”
“GOOG”




                             Processor
Segments are created and removed as needed

                    “GOOG”
“GOOG”




                             Processor
Segments are created and removed as needed

                   “GOOG”   “AAPL”
GOOG

AAPL




                            Processor
Segments are created and removed as needed

                   “GOOG”   “AAPL”      “AMZN”
GOOG    X

AAPL

AMZN




                            Processor
http://martinfowler.com/articles/lmax.html
http://www.nytimes.com/2011/08/27/business/as-trade-
volumes-soar-exchanges-cash-in.html
http://disruptor.googlecode.com/files/Disruptor-1.0.pdf
http://www.gigaspaces.com/wiki/display/XAP9/FIFO+Grouping

Weitere ähnliche Inhalte

Ähnlich wie Trade and Event Processing at a Massive Scale - QCon NY 2012

Bottlenecks, Bottlenecks, and more Bottlenecks: Lessons Learned from 2 Years ...
Bottlenecks, Bottlenecks, and more Bottlenecks: Lessons Learned from 2 Years ...Bottlenecks, Bottlenecks, and more Bottlenecks: Lessons Learned from 2 Years ...
Bottlenecks, Bottlenecks, and more Bottlenecks: Lessons Learned from 2 Years ...
Enkitec
 
Columnar processing for SQL-on-Hadoop: The best is yet to come
Columnar processing for SQL-on-Hadoop: The best is yet to comeColumnar processing for SQL-on-Hadoop: The best is yet to come
Columnar processing for SQL-on-Hadoop: The best is yet to come
Wang Zuo
 
Finding root blocker in oracle database
Finding root blocker in oracle databaseFinding root blocker in oracle database
Finding root blocker in oracle database
Mohsen B
 

Ähnlich wie Trade and Event Processing at a Massive Scale - QCon NY 2012 (11)

MongoDB: How it Works
MongoDB: How it WorksMongoDB: How it Works
MongoDB: How it Works
 
Accelerating Particle Image Velocimetry using Hybrid Architectures
Accelerating Particle Image Velocimetry using Hybrid ArchitecturesAccelerating Particle Image Velocimetry using Hybrid Architectures
Accelerating Particle Image Velocimetry using Hybrid Architectures
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
IronSmalltalk
IronSmalltalkIronSmalltalk
IronSmalltalk
 
Bottlenecks, Bottlenecks, and more Bottlenecks: Lessons Learned from 2 Years ...
Bottlenecks, Bottlenecks, and more Bottlenecks: Lessons Learned from 2 Years ...Bottlenecks, Bottlenecks, and more Bottlenecks: Lessons Learned from 2 Years ...
Bottlenecks, Bottlenecks, and more Bottlenecks: Lessons Learned from 2 Years ...
 
Columnar processing for SQL-on-Hadoop: The best is yet to come
Columnar processing for SQL-on-Hadoop: The best is yet to comeColumnar processing for SQL-on-Hadoop: The best is yet to come
Columnar processing for SQL-on-Hadoop: The best is yet to come
 
Talk: The Present and Future of Pharo
Talk: The Present and Future of PharoTalk: The Present and Future of Pharo
Talk: The Present and Future of Pharo
 
Denker - Pharo: Present and Future - 2009-07-14
Denker - Pharo: Present and Future - 2009-07-14Denker - Pharo: Present and Future - 2009-07-14
Denker - Pharo: Present and Future - 2009-07-14
 
Finding root blocker in oracle database
Finding root blocker in oracle databaseFinding root blocker in oracle database
Finding root blocker in oracle database
 
Apache con 2011 gd
Apache con 2011 gdApache con 2011 gd
Apache con 2011 gd
 
Clonedigger-Python
Clonedigger-PythonClonedigger-Python
Clonedigger-Python
 

Mehr von Uri Cohen

Oscon 2013 - Lessons from building an open source community
Oscon 2013 - Lessons from building an open source community Oscon 2013 - Lessons from building an open source community
Oscon 2013 - Lessons from building an open source community
Uri Cohen
 
Cassandra summit - Big Data Apps on the cloud
Cassandra summit - Big Data Apps on the cloud Cassandra summit - Big Data Apps on the cloud
Cassandra summit - Big Data Apps on the cloud
Uri Cohen
 

Mehr von Uri Cohen (20)

Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...Orchestration tool roundup  - OpenStack Israel summit - kubernetes vs. docker...
Orchestration tool roundup - OpenStack Israel summit - kubernetes vs. docker...
 
Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014 Cloudify workshop at CCCEU 2014
Cloudify workshop at CCCEU 2014
 
GigaSpaces XAP for Financial Services
GigaSpaces XAP for Financial Services GigaSpaces XAP for Financial Services
GigaSpaces XAP for Financial Services
 
In Memory Data Grids, Demystified!
In Memory Data Grids, Demystified! In Memory Data Grids, Demystified!
In Memory Data Grids, Demystified!
 
App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14
App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14
App Centric Devops - CloudStack 2014 Collaboration Conference #CCNA14
 
Deployment Automation on OpenStack with TOSCA and Cloudify
Deployment Automation on OpenStack with TOSCA and CloudifyDeployment Automation on OpenStack with TOSCA and Cloudify
Deployment Automation on OpenStack with TOSCA and Cloudify
 
Cloud stack collabiration conference - It's the app, stupid!
Cloud stack collabiration conference - It's the app, stupid!Cloud stack collabiration conference - It's the app, stupid!
Cloud stack collabiration conference - It's the app, stupid!
 
Changing organizational culture - a sweaty usecase
Changing organizational culture - a sweaty usecaseChanging organizational culture - a sweaty usecase
Changing organizational culture - a sweaty usecase
 
GigaSpaces XAP - Don't Call Me Cache!
GigaSpaces XAP - Don't Call Me Cache!GigaSpaces XAP - Don't Call Me Cache!
GigaSpaces XAP - Don't Call Me Cache!
 
Oscon 2013 - Lessons from building an open source community
Oscon 2013 - Lessons from building an open source community Oscon 2013 - Lessons from building an open source community
Oscon 2013 - Lessons from building an open source community
 
Oscon 2013 -Your OSS Project Is now served
Oscon 2013 -Your OSS Project Is now servedOscon 2013 -Your OSS Project Is now served
Oscon 2013 -Your OSS Project Is now served
 
OpenStack Israel Summit 2013 - It’s the App, Stupid!
OpenStack Israel Summit 2013 - It’s the App, Stupid! OpenStack Israel Summit 2013 - It’s the App, Stupid!
OpenStack Israel Summit 2013 - It’s the App, Stupid!
 
One Does Not Simply Walk Into Devops
One Does Not Simply Walk Into Devops One Does Not Simply Walk Into Devops
One Does Not Simply Walk Into Devops
 
Carrier Paas - CloudStack Collaboration Event 2012
Carrier Paas - CloudStack Collaboration Event 2012Carrier Paas - CloudStack Collaboration Event 2012
Carrier Paas - CloudStack Collaboration Event 2012
 
Your Apps on the Cloud - What it really takes
Your Apps on the Cloud - What it really takes Your Apps on the Cloud - What it really takes
Your Apps on the Cloud - What it really takes
 
Cassandra summit - Big Data Apps on the cloud
Cassandra summit - Big Data Apps on the cloud Cassandra summit - Big Data Apps on the cloud
Cassandra summit - Big Data Apps on the cloud
 
DevOps Meets PaaS - NY Meetup with Chef (OpsCode)
DevOps Meets PaaS - NY Meetup with Chef (OpsCode)DevOps Meets PaaS - NY Meetup with Chef (OpsCode)
DevOps Meets PaaS - NY Meetup with Chef (OpsCode)
 
Big Data Apps on OpenStack
Big Data Apps on OpenStackBig Data Apps on OpenStack
Big Data Apps on OpenStack
 
Real Time Analytics for Big Data - A twitter inspired case study
Real Time Analytics for Big Data - A twitter inspired case studyReal Time Analytics for Big Data - A twitter inspired case study
Real Time Analytics for Big Data - A twitter inspired case study
 
GigaSpaces Cloudify - The PaaS Jailbreaker
GigaSpaces Cloudify - The PaaS Jailbreaker GigaSpaces Cloudify - The PaaS Jailbreaker
GigaSpaces Cloudify - The PaaS Jailbreaker
 

Kürzlich hochgeladen

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 

Trade and Event Processing at a Massive Scale - QCon NY 2012

Hinweis der Redaktion

  1. Algorithmic and high frequency trading
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. Mechanical sympathy
  10. Two principles – data with message, staged processing Locking with every write/takeMechanical sympathy
  11. Mechanical sympathy
  12. Mechanical sympathy
  13. Two principles – data with message, staged processing Locking with every write/takeMechanical sympathy
  14. Mechanical sympathy
  15. Mechanical sympathy
  16. Mechanical sympathy