Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
THIRDCHANNEL
Reactive Options for Groovy
Steve Pember
CTO, ThirdChannel
@svpember
Greach, 2015
What is ‘Reactive’?
THIRDCHANNEL
Possible Reactive Definitions
• Reactive Programming
Imperative: A = B+C at that moment in time
Reactive: A = B+C whenever B or C change
values
THIRDCHANNEL
Possible Reactive Definitions
• Reactive Programming
• Reactive Systems
THIRDCHANNEL
Possible Reactive Definitions
• Reactive Programming
• Reactive Systems
• Reactive Streams / Reactive Extensi...
All 3 Are Different, But Related
… Today is About Reactive Systems
and Rx
THIRDCHANNEL
Agenda
• Reactive Systems
• Reactive Streams / Reactive Extensions
• Reactive Groovy
• Demos
THIRDCHANNEL
Agenda
• Reactive Systems
The Need For Reactive
(The Reactive Manifesto)
–Johnny Appleseed
“Type a quote here.”
THIRDCHANNEL
–Johnny Appleseed
“Type a quote here.”
–Johnny Appleseed
“Type a quote here.”
Need to Handle As Many Users As
Possible
THIRDCHANNEL
Reactive Systems
• The Need for Reactive
• 4 Reactive Principles
–Johnny Appleseed
“Type a quote here.”
THIRDCHANNEL
THIRDCHANNEL
Reactive Systems
• The Need for Reactive
• 4 Reactive Principles
• Responsive
THIRDCHANNEL
THIRDCHANNEL
Reactive Systems
• The Need for Reactive
• 4 Reactive Principles
• Responsive
• Resilient
–Johnny Appleseed
“Type a quote here.”
Embrace Failure
Independent Things Fail
Independently
THIRDCHANNEL
Reactive Systems
• The Need for Reactive
• 4 Reactive Principles
• Responsive
• Resilient
• Elastic (Scalable)
THIRDCHANNEL
Reactive Systems
• The Need for Reactive
• 4 Reactive Principles
• Responsive
• Resilient
• Elastic (Scalable...
Events
Actors
–Johnny Appleseed
“Type a quote here.”
–Johnny Appleseed
“Type a quote here.”
Never Block
THIRDCHANNEL
Agenda
• Reactive Systems
• Reactive Streams / Reactive Extensions
THIRDCHANNEL
Reactive Streams / Extensions
• Originally out of Microsoft
THIRDCHANNEL
Reactive Streams / Extensions
• Originally out of Microsoft
• Brought to JVM
–Johnny Appleseed
“Type a quote here.”
THIRDCHANNEL
Reactive Streams / Extensions
• Originally out of Microsoft
• Brought to JVM
• Designed to Handle Messages As...
THIRDCHANNEL
Reactive Streams / Extensions
• Originally out of Microsoft
• Brought to JVM
• Designed to Handle Messages As...
THIRDCHANNEL
Reactive Streams / Extensions
• Originally out of Microsoft
• Brought to JVM
• Designed to Handle Messages As...
THIRDCHANNEL
Reactive Streams / Extensions
• Originally out of Microsoft
• Brought to JVM
• Designed to Handle Messages As...
THIRDCHANNEL
THIRDCHANNEL
Agenda
• Reactive Systems
• Reactive Streams / Reactive Extensions
• Groovy Options
THIRDCHANNEL
A Few Groovy Options…
• Akka
THIRDCHANNEL
A Few Groovy Options…
• Akka
• Akka Streams
THIRDCHANNEL
Akka & Akka Streams
• Definition of Reactive System
• Typesafe
• Actor-Based Concurrency
• Implemented Stream...
THIRDCHANNEL
A Few Groovy Options…
• Akka
• Akka Streams
• RxJava / RxGroovy
THIRDCHANNEL
RxJava
• Comes out of Netflix
• Part of reactivex.io
• Reactive Streams on the JVM
THIRDCHANNEL
THIRDCHANNEL
A Few Groovy Options…
• Akka
• Akka Streams
• RxJava / RxGroovy
• Ratpack
THIRDCHANNEL
• HTTP application server
• Non-opinionated
• Built on Reactive Streams, Netty, Java 8, Guava
• Fully embodie...
THIRDCHANNEL
A Few Groovy Options…
• Akka
• Akka Streams
• RxJava / RxGroovy
• Ratpack
• Reactor
THIRDCHANNEL
• Reactive Streams
• Reactor Pattern
• Built on LMAX Ring Buffer / Disrupter
THIRDCHANNEL
VS
THIRDCHANNEL
THIRDCHANNEL
THIRDCHANNEL
What About Java 8 Streams?
THIRDCHANNEL
Java 8 Streams
• Built into the language
• Meant for Finite Iterables
• Observables -> potentially infinite i...
THIRDCHANNEL
Agenda
• Reactive Systems
• Reactive Streams / Reactive Extensions
• Groovy Options
• Demos
Thank You!
Questions?
@svpember
Image Credits
• 1000ms Time To glass:
https://docs.google.com/presentation/d/1IRHyU7_crIiCjl0Gvue0WY3eY_eYvFQvSfwQouW9368/...
Groovy Options for Reactive Applications - Greach 2015
Groovy Options for Reactive Applications - Greach 2015
Groovy Options for Reactive Applications - Greach 2015
Groovy Options for Reactive Applications - Greach 2015
Groovy Options for Reactive Applications - Greach 2015
Groovy Options for Reactive Applications - Greach 2015
Groovy Options for Reactive Applications - Greach 2015
Prochain SlideShare
Chargement dans…5
×

Groovy Options for Reactive Applications - Greach 2015

2 914 vues

Publié le

Performance demands placed on the web applications we build have drastically increased over the past few years. The Reactive approach has gained popularity recently for one simple reason: we need alternative designs and architectures to meet today’s demands. Speed is everything.

Reactive applications and Reactive programming are an alternative to the standard thread-based imperative programming model that can result in flexible, concise code. However, it can be difficult to shift one’s mind to think in Reactive terms. It doesn’t help that the descriptions around the web can be contradictory and the library documentation can be obscure.

In this talk, we’ll explore the concepts of Reactive and Reactive Programming. We’ll demonstrate some of the useful Reactive functions and examine some practical implementations – including how we’re currently using Reactive libraries in production code. Most importantly, we’ll look at some of the open source options available to us in the Groovy community, including Reactor, RxJava, and the Java 8 stream API. If Reactive is new to you, this should be an excellent introduction.

Publié dans : Logiciels
  • Did you try ⇒ www.HelpWriting.net ⇐?. They know how to do an amazing essay, research papers or dissertations.
       Répondre 
    Voulez-vous vraiment ?  Oui  Non
    Votre message apparaîtra ici

Groovy Options for Reactive Applications - Greach 2015

  1. 1. THIRDCHANNEL Reactive Options for Groovy Steve Pember CTO, ThirdChannel @svpember Greach, 2015
  2. 2. What is ‘Reactive’?
  3. 3. THIRDCHANNEL Possible Reactive Definitions • Reactive Programming
  4. 4. Imperative: A = B+C at that moment in time Reactive: A = B+C whenever B or C change values
  5. 5. THIRDCHANNEL Possible Reactive Definitions • Reactive Programming • Reactive Systems
  6. 6. THIRDCHANNEL Possible Reactive Definitions • Reactive Programming • Reactive Systems • Reactive Streams / Reactive Extensions (Rx)
  7. 7. All 3 Are Different, But Related
  8. 8. … Today is About Reactive Systems and Rx
  9. 9. THIRDCHANNEL Agenda • Reactive Systems • Reactive Streams / Reactive Extensions • Reactive Groovy • Demos
  10. 10. THIRDCHANNEL Agenda • Reactive Systems
  11. 11. The Need For Reactive (The Reactive Manifesto)
  12. 12. –Johnny Appleseed “Type a quote here.”
  13. 13. THIRDCHANNEL
  14. 14. –Johnny Appleseed “Type a quote here.”
  15. 15. –Johnny Appleseed “Type a quote here.”
  16. 16. Need to Handle As Many Users As Possible
  17. 17. THIRDCHANNEL Reactive Systems • The Need for Reactive • 4 Reactive Principles
  18. 18. –Johnny Appleseed “Type a quote here.”
  19. 19. THIRDCHANNEL
  20. 20. THIRDCHANNEL Reactive Systems • The Need for Reactive • 4 Reactive Principles • Responsive
  21. 21. THIRDCHANNEL
  22. 22. THIRDCHANNEL Reactive Systems • The Need for Reactive • 4 Reactive Principles • Responsive • Resilient
  23. 23. –Johnny Appleseed “Type a quote here.”
  24. 24. Embrace Failure
  25. 25. Independent Things Fail Independently
  26. 26. THIRDCHANNEL Reactive Systems • The Need for Reactive • 4 Reactive Principles • Responsive • Resilient • Elastic (Scalable)
  27. 27. THIRDCHANNEL Reactive Systems • The Need for Reactive • 4 Reactive Principles • Responsive • Resilient • Elastic (Scalable) • Asynchronous Message-Driven
  28. 28. Events
  29. 29. Actors
  30. 30. –Johnny Appleseed “Type a quote here.”
  31. 31. –Johnny Appleseed “Type a quote here.”
  32. 32. Never Block
  33. 33. THIRDCHANNEL Agenda • Reactive Systems • Reactive Streams / Reactive Extensions
  34. 34. THIRDCHANNEL Reactive Streams / Extensions • Originally out of Microsoft
  35. 35. THIRDCHANNEL Reactive Streams / Extensions • Originally out of Microsoft • Brought to JVM
  36. 36. –Johnny Appleseed “Type a quote here.”
  37. 37. THIRDCHANNEL Reactive Streams / Extensions • Originally out of Microsoft • Brought to JVM • Designed to Handle Messages Asynchronously Across Boundaries
  38. 38. THIRDCHANNEL Reactive Streams / Extensions • Originally out of Microsoft • Brought to JVM • Designed to Handle Messages Asynchronously Across Boundaries • Composable
  39. 39. THIRDCHANNEL Reactive Streams / Extensions • Originally out of Microsoft • Brought to JVM • Designed to Handle Messages Asynchronously Across Boundaries • Composable • Hot / Cold
  40. 40. THIRDCHANNEL Reactive Streams / Extensions • Originally out of Microsoft • Brought to JVM • Designed to Handle Messages Asynchronously Across Boundaries • Composable • Hot / Cold • Backpressure
  41. 41. THIRDCHANNEL
  42. 42. THIRDCHANNEL Agenda • Reactive Systems • Reactive Streams / Reactive Extensions • Groovy Options
  43. 43. THIRDCHANNEL A Few Groovy Options… • Akka
  44. 44. THIRDCHANNEL A Few Groovy Options… • Akka • Akka Streams
  45. 45. THIRDCHANNEL Akka & Akka Streams • Definition of Reactive System • Typesafe • Actor-Based Concurrency • Implemented Streams on Top of Actor Model
  46. 46. THIRDCHANNEL A Few Groovy Options… • Akka • Akka Streams • RxJava / RxGroovy
  47. 47. THIRDCHANNEL RxJava • Comes out of Netflix • Part of reactivex.io • Reactive Streams on the JVM
  48. 48. THIRDCHANNEL
  49. 49. THIRDCHANNEL A Few Groovy Options… • Akka • Akka Streams • RxJava / RxGroovy • Ratpack
  50. 50. THIRDCHANNEL • HTTP application server • Non-opinionated • Built on Reactive Streams, Netty, Java 8, Guava • Fully embodies reactive
  51. 51. THIRDCHANNEL A Few Groovy Options… • Akka • Akka Streams • RxJava / RxGroovy • Ratpack • Reactor
  52. 52. THIRDCHANNEL • Reactive Streams • Reactor Pattern • Built on LMAX Ring Buffer / Disrupter
  53. 53. THIRDCHANNEL
  54. 54. VS
  55. 55. THIRDCHANNEL
  56. 56. THIRDCHANNEL
  57. 57. THIRDCHANNEL
  58. 58. What About Java 8 Streams?
  59. 59. THIRDCHANNEL Java 8 Streams • Built into the language • Meant for Finite Iterables • Observables -> potentially infinite items, with back pressure • “Pulling” vs “Pushing”
  60. 60. THIRDCHANNEL Agenda • Reactive Systems • Reactive Streams / Reactive Extensions • Groovy Options • Demos
  61. 61. Thank You! Questions? @svpember
  62. 62. Image Credits • 1000ms Time To glass: https://docs.google.com/presentation/d/1IRHyU7_crIiCjl0Gvue0WY3eY_eYvFQvSfwQouW9368/present?slide=id.g1e697bbb_0_7 • internet users in the world: http://www.internetlivestats.com/internet-users/ • internet users vs Facebook: https://medium.com/reactive-programming/what-is-reactive-programming-bc9fa7f4a7fc • reactivex logo: https://www.stickermule.com/marketplace/2223-rx-reactive-extensions-logo-4 • cheetah: www.livescience.com/21944-usain-bolt-vs-cheetah-animal-olympics.html • dominoes: https://www.flickr.com/photos/louish/5611657857/sizes/l/in/photostream/ • 300 / Spartans: http://www.300themovie.com/ • latop punch: http://walls4joy.com/wallpaper/730566-angry-laptops-punch • mailman: http://thebrandtstandard.com/2013/02/09/u-s-post-office-to-end-saturday-letter-delivery-this-summer/ • actor system: http://letitcrash.com/post/30585282971/discovering-message-flows-in-actor-systems-with • slow down: http://forthefamily.org/reminder-slow/

×