Practicing at the Cutting Edge

508 views

Published on

Video and slides synchronized, mp3 and slide download available at URL http://bit.ly/1tfbFMp.

Martin Thompson focuses on the evolution of Java and how it contrasts to C/C++, covering the cultural challenges of pushing the limits of performance and how to collaborate with industry experts and organize teams, which often stands at odds with the culture in many organisations. Filmed at qconlondon.com.

Martin Thompson is a high-performance and low-latency specialist, with over two decades working with large scale transactional and big-data systems, in the automotive, gaming, financial, mobile, and CMS domains. He believes in Mechanical Sympathy, which is applying an understanding of the hardware to the creation of software, being fundamental to delivering elegant high-performance solutions.

Published in: Technology, News & Politics
  • Be the first to comment

Practicing at the Cutting Edge

  1. 1. Practicing at the Cutting Edge Learning and Unlearning about Performance Martin Thompson - @mjpt777
  2. 2. InfoQ.com: News & Community Site • 750,000 unique visitors/month • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • News 15-20 / week • Articles 3-4 / week • Presentations (videos) 12-15 / week • Interviews 2-3 / week • Books 1 / month Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations /java-evolution-c-c-plus-plus
  3. 3. Presented at QCon London www.qconlondon.com Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide
  4. 4. Learning and Unlearning
  5. 5. 1. Brief History of Java 2. Evolving Design approach 3. An evolving Hardware platform 4. Changes in Culture
  6. 6. 1. Brief History of Java
  7. 7. 1.0 1396 Java Timeline 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12 In the beginning Java was Oak and Oak was slow 7651.41.31.21.1
  8. 8. How did it all start?
  9. 9. How did Java perform then?
  10. 10. ...but everything must have a beginning
  11. 11. 1.0 1396 Java Timeline 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12 Netscape Navigator 2.0 & IE 3.0 with Applet support 7651.41.31.21.1
  12. 12. Ma, I don’t need to worry about deleting objects any more...
  13. 13. ...but we can distribute rich GUIs without an installer
  14. 14. We could even do multi-threaded apps on Windows 3.11
  15. 15. 1.0 1396 Java Timeline 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12 Symantec and Microsoft JIT Performance Wars 7651.41.31.21.1
  16. 16. Life with early JIT Compilers
  17. 17. ...cross platform GUIs are a real possibility
  18. 18. 1.0 1396 Java Timeline 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12 Generational Garbage Collection Servlets 7651.41.31.21.1
  19. 19. But then came the surprise win
  20. 20. Servlets vs CGI
  21. 21. Graph Theory!
  22. 22. 1.0 1396 Java Timeline 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12 Hotspot Compiler JRockit for x86 7651.41.31.21.1
  23. 23. EJB
  24. 24. 1.0 1396 Java Timeline 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12 Native Threads on Linux + epoll NIO 7651.41.31.21.1
  25. 25. Java Memory Model
  26. 26. 1.0 1396 Java Timeline 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12 Java Util Concurrent + JMM Class Data Sharing 7651.41.31.21.1
  27. 27. Herb decided to write an essay...
  28. 28. The free lunch is over...
  29. 29. Java finds its way into our poor little mobile phones
  30. 30. What about life on the Server?
  31. 31. EJB
  32. 32. EJB
  33. 33. 1.0 1396 Java Timeline 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12 Escape Analysis Register Allocation Split Bytecode Verification 7651.41.31.21.1
  34. 34. What about our hero who freed us from the EJB tar pit?
  35. 35. SQL too difficult?
  36. 36. The world of hardware undergoes big changes!
  37. 37. High Frequency Trading
  38. 38. Milliseconds Matter...
  39. 39. ...Microseconds Matter...
  40. 40. ...right from market open...
  41. 41. ...and especially after a quiet period...
  42. 42. ...it is like being at War
  43. 43. Memory Cliff
  44. 44. SHM, Locks, and Multi-core
  45. 45. Safepoints!!!
  46. 46. 1.0 1396 Java Timeline 97 98 99 00 01 02 03 04 05 06 07 08 09 10 11 12 Tiered Compilation G1 Garbage Collector Compressed Pointers 7651.41.31.21.1
  47. 47. What does the near future hold?
  48. 48. sun.misc.Unsafe
  49. 49. What is everyone excited about?
  50. 50. What about other languages?
  51. 51. Now on with the story...
  52. 52. 2. Evolving Design Approach
  53. 53. GUI Era
  54. 54. Battle for the Desktop
  55. 55. Battle for the Desktop
  56. 56. What was the biggest factor in performance?
  57. 57. People
  58. 58. Comms design is significant to GUIs
  59. 59. Users love responsive interfaces
  60. 60. Modelling
  61. 61. “Big” Data Era
  62. 62. What do the following companies have in common?
  63. 63. Huge product catalogues
  64. 64. PCM Sales Manufacturing Warehousing Logistics Partners e-Procurement Websites Catalogues
  65. 65. Parsing
  66. 66. Data Modelling & Representation
  67. 67. Indexing
  68. 68. Set Theory Rocks!
  69. 69. Databases are very powerful!
  70. 70. Immutable Data Rocks!
  71. 71. JDBC Drivers Suck!!!
  72. 72. Stream Processing Rocks!
  73. 73. public void characters(char[] ch, int start, int length) throws SAXException
  74. 74. public void characters(char[] ch, int start, int length) throws SAXException public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
  75. 75. public String[] split(String regex)
  76. 76. public String[] split(String regex) public Iterable<String> split(String regex)
  77. 77. public String[] split(String regex) public Iterable<String> split(String regex) public void split(String regex, Collection<String> dst)
  78. 78. Modelling
  79. 79. OOP Set Theory Design Paradigms
  80. 80. Transaction Processing Era
  81. 81. Synchronous designs are seriously limited
  82. 82. Staged Event Driven Architecture
  83. 83. The importance of Latency
  84. 84. Latency given Throughput Latency Load
  85. 85. The issues with Concurrency
  86. 86. The Disruptor
  87. 87. The value of Determinism
  88. 88. The value of pure Functions
  89. 89. Modelling
  90. 90. OOP Set Theory Design Paradigms FP
  91. 91. 3. Evolving Hardware Platform
  92. 92. Mechanical Sympathy
  93. 93. All Storage is Tape
  94. 94. Networks are faster than Storage
  95. 95. Memory Access Patterns Matter
  96. 96. What if you could build a HashMap with reified generics and arrays of structures?
  97. 97. Buckets
  98. 98. A1 Bob Hash Buckets Key Value Next
  99. 99. A1 Bob Hash Buckets FF Jim Key Value Next HashKey Value Next
  100. 100. A1 Bob Hash Buckets FF Jim Key Value Next HashKey Value Next C7 Fred HashKey Value Next
  101. 101. Buckets Key Value Hash Next
  102. 102. 0 A1 Bob 4 -1 Buckets Key Value Hash Next
  103. 103. 1 0 A1 Bob 4 -1 Buckets Key Value Hash Next C7 Fred 2 -1
  104. 104. 1 0 A1 Bob 4 2 Buckets Key Value Hash Next C7 Fred 2 -1 FF Jim 4 -1
  105. 105. .Net Dictionary is 10X faster than HashMap for 2GB of data
  106. 106. ObjectLayout PackedObjects Value Types (Arrays 2.064)
  107. 107. “Functional Programming will solve the multi-core problem” - Functional Fanboi
  108. 108. Persistent Data Structures
  109. 109. Market HAMT Ref * HAMT Venue * HAMT Instrument * HAMT Order *
  110. 110. Market HAMT Ref * HAMT Venue * HAMT Instrument * HAMT Order * << CAS Failure? >>
  111. 111. Market HAMT Ref * HAMT Venue * HAMT Instrument * HAMT Order * ModelDepth Threads << CAS Failure? >>
  112. 112. Shared Nothing to Scale Think Transputers but with message passing via SHM
  113. 113. 4. Changes in Culture
  114. 114. Measure Everything
  115. 115. Questions? Blog: http://mechanical-sympathy.blogspot.com/ Twitter: @mjpt777 “It does not matter how intelligent you are, if you guess and that guess cannot be backed up by experimental evidence - then it is still a guess.” - Richard Feynman
  116. 116. Watch the video with slide synchronization on InfoQ.com! http://www.infoq.com/presentations/java- evolution-c-c-plus-plus

×