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.

Flight of the Flux: A Look at Reactor Execution Model

83 views

Published on

SpringOne Platform 2018
Flight of the Flux: A Look at Reactor Execution Model - Simon Baslé, Pivotal

Published in: Software
  • Be the first to comment

  • Be the first to like this

Flight of the Flux: A Look at Reactor Execution Model

  1. 1. Flight of the Flux Simon Basl�, Reactor Staff Software Engineer at Pivotal @simonbasle a look at Reactor's execution model
  2. 2. What we'll learn
  3. 3. Nothing happens until you subscribe, Assembly time vs Execution time
  4. 4. Nothing happens until you subscribe, Assembly time vs Execution time Cold or Hot?
  5. 5. Nothing happens until you subscribe, Assembly time vs Execution time Cold or Hot? Concurrent agnostic
  6. 6. Cold or Hot? Concurrent agnostic Schedulers, PublishOn vs SubscribeOn Nothing happens until you subscribe, Assembly time vs Execution time
  7. 7. Cold or Hot? Concurrent agnostic Schedulers, PublishOn vs SubscribeOn Work Stealing Nothing happens until you subscribe, Assembly time vs Execution time
  8. 8. Cold or Hot? Concurrent agnostic Schedulers, PublishOn vs SubscribeOn Work Stealing Operator Fusion Nothing happens until you subscribe, Assembly time vs Execution time
  9. 9. Cold or Hot? Concurrent agnostic Schedulers, PublishOn vs SubscribeOn Work Stealing Operator Fusion Nothing happens until you subscribe, Assembly time vs Execution time
  10. 10. Unless otherwise indicated, these slides are � 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Disclaimer
  11. 11. Unless otherwise indicated, these slides are � 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ This is a condensed version of a 50min talk We'll go fast, skip over Reactor basics and do some live coding instead :) 12
  12. 12. Unless otherwise indicated, these slides are � 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Live Coding
  13. 13. Unless otherwise indicated, these slides are � 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Work Stealing
  14. 14. so where do (most) operators run, again?
  15. 15. publishOn
  16. 16. what is work stealing?
  17. 17. 1 operator that combines data coming from 2 threads
  18. 18. shared queue, drain loop
  19. 19. offer
  20. 20. offer work
  21. 21. offer offer work
  22. 22. offer offer work steal exit
  23. 23. offer offer work steal exit work
  24. 24. offer offer work steal exit work exit
  25. 25. Unless otherwise indicated, these slides are � 2013 -2018 Pivotal Software, Inc. and licensed under a Creative Commons Attribution-NonCommercial license: http://creativecommons.org/licenses/by -nc/3.0/ Operator Fusion
  26. 26. macro fusion
  27. 27. a.then(b).then(c).then(d)
  28. 28. a.then(b,c,d)
  29. 29. micro fusion
  30. 30. a.map(->).map(->).filter(->)
  31. 31. a.map(->).map(->).filter(->)
  32. 32. a.map(->).map(->).filter(->) bounded queues (for backpressure)
  33. 33. a.map(->).map(->).filter(->)
  34. 34. a.map(->).map(->).filter(->) single transverse bounded queue
  35. 35. Thanks ! @simonbasl e Questions?
  36. 36. > Stay Connected. Join the community in our Gitter channel: reactor/reactor Enjoy the rest of the conference! #springon e @s1 p

×