Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
An Introduction to the                  LMAX Disruptor                           Trisha Gee, Developer at LMAX Exchange   ...
Laptop Setup... Go!Tuesday, 25 September 12
The Disruptor?Tuesday, 25 September 12
The Workshop                   • Introduction to the Disruptor                   • Simplest Case                   • Perfo...
What is The Disruptor?                  • Very fast message passing                  • Data structure and work flow without...
So...?Tuesday, 25 September 12
The Magic RingBufferTuesday, 25 September 12
The Magic RingBufferTuesday, 25 September 12
The Magic RingBufferTuesday, 25 September 12
The Magic RingBufferTuesday, 25 September 12
The Magic RingBufferTuesday, 25 September 12
The Magic RingBufferTuesday, 25 September 12
The Events are BucketsTuesday, 25 September 12
I’ve got a RingBuffer!                   • Erm.... how do I poke things into it?Tuesday, 25 September 12
The PublisherTuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
...so now I want to read                   • The Disruptor provides nice batching                           behaviour for ...
BatchEventProcessorTuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
The ProblemTuesday, 25 September 12
Tower Defence?Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Exercise One                           One publisher, one event handlerTuesday, 25 September 12
Our ProblemTuesday, 25 September 12
Simplest DisruptorTuesday, 25 September 12
TODO                   • Print status of the enemy when the tower                           sees it                   • Pr...
Task Breakdown                   • Wire up the EventTranslator &                           EventHandler, using the Disrupt...
Exercise One Goals                   1. Understand the roles of Translators and                      Event Handlers       ...
Performance vs a                                Queue                  Mac Air, 1.7GHz Core i5:               run 0: Block...
Exercise Two                           One publisher, two parallel event handlersTuesday, 25 September 12
Let’s log all the enemiesTuesday, 25 September 12
Parallel ProcessorsTuesday, 25 September 12
• Make each enemy unique                   • Write the details of each enemy generated                           into a te...
Task Breakdown                   • Add randomness to enemy (e.g. give them a                           speed to travel at)...
Exercise Two Goals                   1. Understand that EventHandlers can                      process in parallel        ...
Exercise Three                             Diamond DependenciesTuesday, 25 September 12
Recording the ResultsTuesday, 25 September 12
Sequence BarriersTuesday, 25 September 12
Managing DependenciesTuesday, 25 September 12
• Don’t use the Disruptor Wizard for                           configuration                   • Record results of the game...
Task Breakdown                   • Remove use of Disruptor.java and wire up                           manually (mechanitis...
Exercise Three Goals                   1. Understand sequence barriers                   2. Understand different dependenc...
Exercise Four                               Playtime!!Tuesday, 25 September 12
Slow Consumers?Tuesday, 25 September 12
The Real WorldTuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Ticket PurchasingTuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Tuesday, 25 September 12
Other Uses                   • Queue replacement                   • Single-threading your code                   • Filter...
QuestionsTuesday, 25 September 12
Upcoming SlideShare
Loading in …5
×

Workshop: Introduction to the Disruptor

28,498 views

Published on

Trisha Gee of LMAX ran a workshop at Strange Loop 2012 giving a hands on set of exercises demonstrating the syntax of the Disruptor

Published in: Technology, Business
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/irt2 } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/irt2 } ......................................................................................................................... Download doc Ebook here { https://soo.gd/irt2 } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Copas Url to Download eBook === http://zakuratest.com/8460658716-Los-Extranjeros-De-Mi-Real-25-Aos-Con-Ellos.html
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • If you want to download or read this book, copy link or url below in the New tab ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ...................................ALL FOR EBOOKS................................................. Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Workshop: Introduction to the Disruptor

  1. An Introduction to the LMAX Disruptor Trisha Gee, Developer at LMAX Exchange @trisha_gee mechanitis.blogspot.comTuesday, 25 September 12
  2. Laptop Setup... Go!Tuesday, 25 September 12
  3. The Disruptor?Tuesday, 25 September 12
  4. The Workshop • Introduction to the Disruptor • Simplest Case • Performance Results • Going Parallel • The Real World • QuestionsTuesday, 25 September 12
  5. What is The Disruptor? • Very fast message passing • Data structure and work flow without contention • Allows you to go truly parallelTuesday, 25 September 12
  6. So...?Tuesday, 25 September 12
  7. The Magic RingBufferTuesday, 25 September 12
  8. The Magic RingBufferTuesday, 25 September 12
  9. The Magic RingBufferTuesday, 25 September 12
  10. The Magic RingBufferTuesday, 25 September 12
  11. The Magic RingBufferTuesday, 25 September 12
  12. The Magic RingBufferTuesday, 25 September 12
  13. The Events are BucketsTuesday, 25 September 12
  14. I’ve got a RingBuffer! • Erm.... how do I poke things into it?Tuesday, 25 September 12
  15. The PublisherTuesday, 25 September 12
  16. Tuesday, 25 September 12
  17. Tuesday, 25 September 12
  18. Tuesday, 25 September 12
  19. Tuesday, 25 September 12
  20. Tuesday, 25 September 12
  21. Tuesday, 25 September 12
  22. ...so now I want to read • The Disruptor provides nice batching behaviour for freeTuesday, 25 September 12
  23. BatchEventProcessorTuesday, 25 September 12
  24. Tuesday, 25 September 12
  25. Tuesday, 25 September 12
  26. Tuesday, 25 September 12
  27. Tuesday, 25 September 12
  28. Tuesday, 25 September 12
  29. Tuesday, 25 September 12
  30. Tuesday, 25 September 12
  31. Tuesday, 25 September 12
  32. Tuesday, 25 September 12
  33. Tuesday, 25 September 12
  34. Tuesday, 25 September 12
  35. Tuesday, 25 September 12
  36. Tuesday, 25 September 12
  37. Tuesday, 25 September 12
  38. The ProblemTuesday, 25 September 12
  39. Tower Defence?Tuesday, 25 September 12
  40. Tuesday, 25 September 12
  41. Tuesday, 25 September 12
  42. Tuesday, 25 September 12
  43. Tuesday, 25 September 12
  44. Tuesday, 25 September 12
  45. Exercise One One publisher, one event handlerTuesday, 25 September 12
  46. Our ProblemTuesday, 25 September 12
  47. Simplest DisruptorTuesday, 25 September 12
  48. TODO • Print status of the enemy when the tower sees it • Print status of enemy after the tower shoots it • Shoot all enemiesTuesday, 25 September 12
  49. Task Breakdown • Wire up the EventTranslator & EventHandler, using the Disruptor class • Implement shootAt • Implement respawn & isDead • Get unit tests to pass • (check out mechanitis.examples.disruptor)Tuesday, 25 September 12
  50. Exercise One Goals 1. Understand the roles of Translators and Event Handlers 2. Understand how to wire up a simple Disruptor configuration 3. Understand how to get events flowing through the DisruptorTuesday, 25 September 12
  51. Performance vs a Queue Mac Air, 1.7GHz Core i5: run 0: BlockingQueue=3,390,060 Disruptor=69,108,500 ops/sec run 1: BlockingQueue=5,229,851 Disruptor=71,123,755 ops/sec run 2: BlockingQueue=4,303,481 Disruptor=65,530,799 ops/sec Disruptor - Time Taken: 3,242 millis Disruptor - Time Taken: 3,319 millis Disruptor - Time Taken: 4,045 millis Queue - Time Taken: 30,022 millis Queue - Time Taken: 31,823 millis Queue - Time Taken: 29,280 millisTuesday, 25 September 12
  52. Exercise Two One publisher, two parallel event handlersTuesday, 25 September 12
  53. Let’s log all the enemiesTuesday, 25 September 12
  54. Parallel ProcessorsTuesday, 25 September 12
  55. • Make each enemy unique • Write the details of each enemy generated into a text fileTuesday, 25 September 12
  56. Task Breakdown • Add randomness to enemy (e.g. give them a speed to travel at) • Wire in the EnemyLogger • Implement describeTo in enemyTuesday, 25 September 12
  57. Exercise Two Goals 1. Understand that EventHandlers can process in parallel 2. Understand how to wire up EventHandlers in parallel 3. Understand the caveats to going parallel - single writer principalTuesday, 25 September 12
  58. Exercise Three Diamond DependenciesTuesday, 25 September 12
  59. Recording the ResultsTuesday, 25 September 12
  60. Sequence BarriersTuesday, 25 September 12
  61. Managing DependenciesTuesday, 25 September 12
  62. • Don’t use the Disruptor Wizard for configuration • Record results of the game to a different text file • Optional: add variability to TurretTuesday, 25 September 12
  63. Task Breakdown • Remove use of Disruptor.java and wire up manually (mechanitis.examples.disruptor) • Wire in ResultHandler • Add missing things from Enemy classTuesday, 25 September 12
  64. Exercise Three Goals 1. Understand sequence barriers 2. Understand different dependency configurations 3. Understand wiring up without the wizardTuesday, 25 September 12
  65. Exercise Four Playtime!!Tuesday, 25 September 12
  66. Slow Consumers?Tuesday, 25 September 12
  67. The Real WorldTuesday, 25 September 12
  68. Tuesday, 25 September 12
  69. Tuesday, 25 September 12
  70. Tuesday, 25 September 12
  71. Ticket PurchasingTuesday, 25 September 12
  72. Tuesday, 25 September 12
  73. Tuesday, 25 September 12
  74. Tuesday, 25 September 12
  75. Tuesday, 25 September 12
  76. Tuesday, 25 September 12
  77. Tuesday, 25 September 12
  78. Tuesday, 25 September 12
  79. Other Uses • Queue replacement • Single-threading your code • Filtering • Coalescing • Dependency graphsTuesday, 25 September 12
  80. QuestionsTuesday, 25 September 12

×