SlideShare a Scribd company logo
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 Extensions (Rx)
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)
• Asynchronous Message-Driven
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 Asynchronously Across Boundaries
THIRDCHANNEL
Reactive Streams / Extensions
• Originally out of Microsoft
• Brought to JVM
• Designed to Handle Messages Asynchronously Across Boundaries
• Composable
THIRDCHANNEL
Reactive Streams / Extensions
• Originally out of Microsoft
• Brought to JVM
• Designed to Handle Messages Asynchronously Across Boundaries
• Composable
• Hot / Cold
THIRDCHANNEL
Reactive Streams / Extensions
• Originally out of Microsoft
• Brought to JVM
• Designed to Handle Messages Asynchronously Across Boundaries
• Composable
• Hot / Cold
• Backpressure
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 Streams on Top of Actor Model
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 embodies reactive
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 items, with back pressure
• “Pulling” vs “Pushing”
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/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/

More Related Content

What's hot

Frontcon Riga - GraphQL Will Do To REST What JSON Did To XML
Frontcon Riga - GraphQL Will Do To REST What JSON Did To XMLFrontcon Riga - GraphQL Will Do To REST What JSON Did To XML
Frontcon Riga - GraphQL Will Do To REST What JSON Did To XML
Roy Derks
 
The tale of 100 cve's
The tale of 100 cve'sThe tale of 100 cve's
The tale of 100 cve's
Prajal Kulkarni
 
Finding CPAN adoption candidates
Finding CPAN adoption candidatesFinding CPAN adoption candidates
Finding CPAN adoption candidates
neilbowers
 
DevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback LoopsDevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback Loops
Andreas Grabner
 
Postman API Development Platform
Postman API Development PlatformPostman API Development Platform
Postman API Development Platform
Postman
 
RxJS - The Basics & The Future
RxJS - The Basics & The FutureRxJS - The Basics & The Future
RxJS - The Basics & The Future
Tracy Lee
 
How to debug slow lambda response times
How to debug slow lambda response timesHow to debug slow lambda response times
How to debug slow lambda response times
Yan Cui
 
Web and App Performance: Top Problems to avoid to keep you out of the News
Web and App Performance: Top Problems to avoid to keep you out of the NewsWeb and App Performance: Top Problems to avoid to keep you out of the News
Web and App Performance: Top Problems to avoid to keep you out of the News
Andreas Grabner
 
OOP 2016 - Building Software That Eats The World
OOP 2016 - Building Software That Eats The WorldOOP 2016 - Building Software That Eats The World
OOP 2016 - Building Software That Eats The World
Andreas Grabner
 
Categorical Quantum Computing
Categorical Quantum ComputingCategorical Quantum Computing
Categorical Quantum Computing
Joe Mathes
 
London WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance ProblemsLondon WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance Problems
Andreas Grabner
 
Reactive programming and Hystrix fault tolerance by Max Myslyvtsev
Reactive programming and Hystrix fault tolerance by Max MyslyvtsevReactive programming and Hystrix fault tolerance by Max Myslyvtsev
Reactive programming and Hystrix fault tolerance by Max Myslyvtsev
JavaDayUA
 
Erlang - Dive Right In
Erlang - Dive Right InErlang - Dive Right In
Erlang - Dive Right In
vorn
 
OnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform BuildOnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform Build
David Rosen
 
Capgemini - Project industrialization with apache spark
Capgemini - Project industrialization with apache sparkCapgemini - Project industrialization with apache spark
Capgemini - Project industrialization with apache spark
Jean-Baptiste Martin
 
How to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance TipsHow to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance Tips
Andreas Grabner
 
Python Through the Back Door: Netflix Presentation at CodeMash 2014
Python Through the Back Door: Netflix Presentation at CodeMash 2014Python Through the Back Door: Netflix Presentation at CodeMash 2014
Python Through the Back Door: Netflix Presentation at CodeMash 2014
royrapoport
 
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and TestersHugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Andreas Grabner
 
Baking-In Transparency
Baking-In TransparencyBaking-In Transparency
Baking-In Transparency
Matt Simmons
 
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and HowBoston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
Andreas Grabner
 

What's hot (20)

Frontcon Riga - GraphQL Will Do To REST What JSON Did To XML
Frontcon Riga - GraphQL Will Do To REST What JSON Did To XMLFrontcon Riga - GraphQL Will Do To REST What JSON Did To XML
Frontcon Riga - GraphQL Will Do To REST What JSON Did To XML
 
The tale of 100 cve's
The tale of 100 cve'sThe tale of 100 cve's
The tale of 100 cve's
 
Finding CPAN adoption candidates
Finding CPAN adoption candidatesFinding CPAN adoption candidates
Finding CPAN adoption candidates
 
DevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback LoopsDevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback Loops
 
Postman API Development Platform
Postman API Development PlatformPostman API Development Platform
Postman API Development Platform
 
RxJS - The Basics & The Future
RxJS - The Basics & The FutureRxJS - The Basics & The Future
RxJS - The Basics & The Future
 
How to debug slow lambda response times
How to debug slow lambda response timesHow to debug slow lambda response times
How to debug slow lambda response times
 
Web and App Performance: Top Problems to avoid to keep you out of the News
Web and App Performance: Top Problems to avoid to keep you out of the NewsWeb and App Performance: Top Problems to avoid to keep you out of the News
Web and App Performance: Top Problems to avoid to keep you out of the News
 
OOP 2016 - Building Software That Eats The World
OOP 2016 - Building Software That Eats The WorldOOP 2016 - Building Software That Eats The World
OOP 2016 - Building Software That Eats The World
 
Categorical Quantum Computing
Categorical Quantum ComputingCategorical Quantum Computing
Categorical Quantum Computing
 
London WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance ProblemsLondon WebPerf Meetup: End-To-End Performance Problems
London WebPerf Meetup: End-To-End Performance Problems
 
Reactive programming and Hystrix fault tolerance by Max Myslyvtsev
Reactive programming and Hystrix fault tolerance by Max MyslyvtsevReactive programming and Hystrix fault tolerance by Max Myslyvtsev
Reactive programming and Hystrix fault tolerance by Max Myslyvtsev
 
Erlang - Dive Right In
Erlang - Dive Right InErlang - Dive Right In
Erlang - Dive Right In
 
OnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform BuildOnAndroidConf 2013: Accelerating the Android Platform Build
OnAndroidConf 2013: Accelerating the Android Platform Build
 
Capgemini - Project industrialization with apache spark
Capgemini - Project industrialization with apache sparkCapgemini - Project industrialization with apache spark
Capgemini - Project industrialization with apache spark
 
How to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance TipsHow to keep you out of the News: Web and End-to-End Performance Tips
How to keep you out of the News: Web and End-to-End Performance Tips
 
Python Through the Back Door: Netflix Presentation at CodeMash 2014
Python Through the Back Door: Netflix Presentation at CodeMash 2014Python Through the Back Door: Netflix Presentation at CodeMash 2014
Python Through the Back Door: Netflix Presentation at CodeMash 2014
 
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and TestersHugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
Hugs instead of Bugs: Dreaming of Quality Tools for Devs and Testers
 
Baking-In Transparency
Baking-In TransparencyBaking-In Transparency
Baking-In Transparency
 
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and HowBoston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
Boston DevOps Days 2016: Implementing Metrics Driven DevOps - Why and How
 

Similar to Groovy Options for Reactive Applications - Greach 2015

RxJS and Reactive Programming - Modern Web UI - May 2015
RxJS and Reactive Programming - Modern Web UI - May 2015RxJS and Reactive Programming - Modern Web UI - May 2015
RxJS and Reactive Programming - Modern Web UI - May 2015
Ben Lesh
 
Reactive All the Way Down the Stack
Reactive All the Way Down the StackReactive All the Way Down the Stack
Reactive All the Way Down the Stack
Steve Pember
 
Patterns of the Lambda Architecture -- 2015 April - Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April - Hadoop Summit, EuropePatterns of the Lambda Architecture -- 2015 April - Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April - Hadoop Summit, Europe
Flip Kromer
 
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
DataStax
 
MODELS 2019: Querying and annotating model histories with time-aware patterns
MODELS 2019: Querying and annotating model histories with time-aware patternsMODELS 2019: Querying and annotating model histories with time-aware patterns
MODELS 2019: Querying and annotating model histories with time-aware patterns
Antonio García-Domínguez
 
Dev Games!
Dev Games!Dev Games!
Dev Games!
Adam Haley
 
Which Freaking Database Should I Use?
Which Freaking Database Should I Use?Which Freaking Database Should I Use?
Which Freaking Database Should I Use?
Great Wide Open
 
Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)
Betclic Everest Group Tech Team
 
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Codemotion
 
Beyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor ProgrammingBeyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor Programming
Fabio Tiriticco
 
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, EuropePatterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
Flip Kromer
 
Reactive Programming or Reactive Systems? (spoiler: both)
Reactive Programming or Reactive Systems? (spoiler: both)Reactive Programming or Reactive Systems? (spoiler: both)
Reactive Programming or Reactive Systems? (spoiler: both)
Fabio Tiriticco
 
Reactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-JavaReactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-Java
Kasun Indrasiri
 
Reactive java programming for the impatient
Reactive java programming for the impatientReactive java programming for the impatient
Reactive java programming for the impatient
Grant Steinfeld
 
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven SystemsGo Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Jonas Bonér
 
Designing Fault Tolerant Microservices
Designing Fault Tolerant MicroservicesDesigning Fault Tolerant Microservices
Designing Fault Tolerant Microservices
Orkhan Gasimov
 
Reactive solutions using java 9 and spring reactor
Reactive solutions using java 9 and spring reactorReactive solutions using java 9 and spring reactor
Reactive solutions using java 9 and spring reactor
OrenEzer1
 
High performance network programming on the jvm oscon 2012
High performance network programming on the jvm   oscon 2012 High performance network programming on the jvm   oscon 2012
High performance network programming on the jvm oscon 2012
Erik Onnen
 
Working With Concurrency In Java 8
Working With Concurrency In Java 8Working With Concurrency In Java 8
Working With Concurrency In Java 8
Heartin Jacob
 
Springone2gx 2014 Reactive Streams and Reactor
Springone2gx 2014 Reactive Streams and ReactorSpringone2gx 2014 Reactive Streams and Reactor
Springone2gx 2014 Reactive Streams and Reactor
Stéphane Maldini
 

Similar to Groovy Options for Reactive Applications - Greach 2015 (20)

RxJS and Reactive Programming - Modern Web UI - May 2015
RxJS and Reactive Programming - Modern Web UI - May 2015RxJS and Reactive Programming - Modern Web UI - May 2015
RxJS and Reactive Programming - Modern Web UI - May 2015
 
Reactive All the Way Down the Stack
Reactive All the Way Down the StackReactive All the Way Down the Stack
Reactive All the Way Down the Stack
 
Patterns of the Lambda Architecture -- 2015 April - Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April - Hadoop Summit, EuropePatterns of the Lambda Architecture -- 2015 April - Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April - Hadoop Summit, Europe
 
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
 
MODELS 2019: Querying and annotating model histories with time-aware patterns
MODELS 2019: Querying and annotating model histories with time-aware patternsMODELS 2019: Querying and annotating model histories with time-aware patterns
MODELS 2019: Querying and annotating model histories with time-aware patterns
 
Dev Games!
Dev Games!Dev Games!
Dev Games!
 
Which Freaking Database Should I Use?
Which Freaking Database Should I Use?Which Freaking Database Should I Use?
Which Freaking Database Should I Use?
 
Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)Mini training - Reactive Extensions (Rx)
Mini training - Reactive Extensions (Rx)
 
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
 
Beyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor ProgrammingBeyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor Programming
 
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, EuropePatterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
Patterns of the Lambda Architecture -- 2015 April -- Hadoop Summit, Europe
 
Reactive Programming or Reactive Systems? (spoiler: both)
Reactive Programming or Reactive Systems? (spoiler: both)Reactive Programming or Reactive Systems? (spoiler: both)
Reactive Programming or Reactive Systems? (spoiler: both)
 
Reactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-JavaReactive Programming in Java 8 with Rx-Java
Reactive Programming in Java 8 with Rx-Java
 
Reactive java programming for the impatient
Reactive java programming for the impatientReactive java programming for the impatient
Reactive java programming for the impatient
 
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven SystemsGo Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
Go Reactive: Building Responsive, Resilient, Elastic & Message-Driven Systems
 
Designing Fault Tolerant Microservices
Designing Fault Tolerant MicroservicesDesigning Fault Tolerant Microservices
Designing Fault Tolerant Microservices
 
Reactive solutions using java 9 and spring reactor
Reactive solutions using java 9 and spring reactorReactive solutions using java 9 and spring reactor
Reactive solutions using java 9 and spring reactor
 
High performance network programming on the jvm oscon 2012
High performance network programming on the jvm   oscon 2012 High performance network programming on the jvm   oscon 2012
High performance network programming on the jvm oscon 2012
 
Working With Concurrency In Java 8
Working With Concurrency In Java 8Working With Concurrency In Java 8
Working With Concurrency In Java 8
 
Springone2gx 2014 Reactive Streams and Reactor
Springone2gx 2014 Reactive Streams and ReactorSpringone2gx 2014 Reactive Streams and Reactor
Springone2gx 2014 Reactive Streams and Reactor
 

More from Steve Pember

Spring I_O 2024 - Flexible Spring with Event Sourcing.pptx
Spring I_O 2024 - Flexible Spring with Event Sourcing.pptxSpring I_O 2024 - Flexible Spring with Event Sourcing.pptx
Spring I_O 2024 - Flexible Spring with Event Sourcing.pptx
Steve Pember
 
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Steve Pember
 
SACon 2019 - Surviving in a Microservices Environment
SACon 2019 - Surviving in a Microservices EnvironmentSACon 2019 - Surviving in a Microservices Environment
SACon 2019 - Surviving in a Microservices Environment
Steve Pember
 
Surviving in a Microservices environment -abridged
Surviving in a Microservices environment -abridgedSurviving in a Microservices environment -abridged
Surviving in a Microservices environment -abridged
Steve Pember
 
Gradle Show and Tell
Gradle Show and TellGradle Show and Tell
Gradle Show and Tell
Steve Pember
 
Greach 2018: Surviving Microservices
Greach 2018: Surviving MicroservicesGreach 2018: Surviving Microservices
Greach 2018: Surviving Microservices
Steve Pember
 
Event storage in a distributed system
Event storage in a distributed systemEvent storage in a distributed system
Event storage in a distributed system
Steve Pember
 
Harnessing Spark and Cassandra with Groovy
Harnessing Spark and Cassandra with GroovyHarnessing Spark and Cassandra with Groovy
Harnessing Spark and Cassandra with Groovy
Steve Pember
 
Surviving in a microservices environment
Surviving in a microservices environmentSurviving in a microservices environment
Surviving in a microservices environment
Steve Pember
 
Surviving in a Microservices Environment
Surviving in a Microservices EnvironmentSurviving in a Microservices Environment
Surviving in a Microservices Environment
Steve Pember
 
A year with event sourcing and CQRS
A year with event sourcing and CQRSA year with event sourcing and CQRS
A year with event sourcing and CQRS
Steve Pember
 
Richer Data History with Event Sourcing (SpringOne 2GX 2015
Richer Data History with Event Sourcing (SpringOne 2GX 2015Richer Data History with Event Sourcing (SpringOne 2GX 2015
Richer Data History with Event Sourcing (SpringOne 2GX 2015
Steve Pember
 
Gr8conf US 2015 - Intro to Event Sourcing with Groovy
Gr8conf US 2015 - Intro to Event Sourcing with GroovyGr8conf US 2015 - Intro to Event Sourcing with Groovy
Gr8conf US 2015 - Intro to Event Sourcing with Groovy
Steve Pember
 
Advanced Microservices - Greach 2015
Advanced Microservices - Greach 2015Advanced Microservices - Greach 2015
Advanced Microservices - Greach 2015
Steve Pember
 
Richer data-history-event-sourcing
Richer data-history-event-sourcingRicher data-history-event-sourcing
Richer data-history-event-sourcing
Steve Pember
 
Managing a Microservices Development Team (And advanced Microservice concerns)
Managing a Microservices Development Team (And advanced Microservice concerns)Managing a Microservices Development Team (And advanced Microservice concerns)
Managing a Microservices Development Team (And advanced Microservice concerns)
Steve Pember
 
Reactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and GrailsReactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and Grails
Steve Pember
 
Why Reactive Architecture Will Take Over The World (and why we should be wary...
Why Reactive Architecture Will Take Over The World (and why we should be wary...Why Reactive Architecture Will Take Over The World (and why we should be wary...
Why Reactive Architecture Will Take Over The World (and why we should be wary...
Steve Pember
 
Richer Data History in Groovy with Event Sourcing
Richer Data History in Groovy with Event SourcingRicher Data History in Groovy with Event Sourcing
Richer Data History in Groovy with Event Sourcing
Steve Pember
 
Distributed Reactive Architecture: Extending SOA with Events
Distributed Reactive Architecture: Extending SOA with EventsDistributed Reactive Architecture: Extending SOA with Events
Distributed Reactive Architecture: Extending SOA with Events
Steve Pember
 

More from Steve Pember (20)

Spring I_O 2024 - Flexible Spring with Event Sourcing.pptx
Spring I_O 2024 - Flexible Spring with Event Sourcing.pptxSpring I_O 2024 - Flexible Spring with Event Sourcing.pptx
Spring I_O 2024 - Flexible Spring with Event Sourcing.pptx
 
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
Anatomy of a Spring Boot App with Clean Architecture - Spring I/O 2023
 
SACon 2019 - Surviving in a Microservices Environment
SACon 2019 - Surviving in a Microservices EnvironmentSACon 2019 - Surviving in a Microservices Environment
SACon 2019 - Surviving in a Microservices Environment
 
Surviving in a Microservices environment -abridged
Surviving in a Microservices environment -abridgedSurviving in a Microservices environment -abridged
Surviving in a Microservices environment -abridged
 
Gradle Show and Tell
Gradle Show and TellGradle Show and Tell
Gradle Show and Tell
 
Greach 2018: Surviving Microservices
Greach 2018: Surviving MicroservicesGreach 2018: Surviving Microservices
Greach 2018: Surviving Microservices
 
Event storage in a distributed system
Event storage in a distributed systemEvent storage in a distributed system
Event storage in a distributed system
 
Harnessing Spark and Cassandra with Groovy
Harnessing Spark and Cassandra with GroovyHarnessing Spark and Cassandra with Groovy
Harnessing Spark and Cassandra with Groovy
 
Surviving in a microservices environment
Surviving in a microservices environmentSurviving in a microservices environment
Surviving in a microservices environment
 
Surviving in a Microservices Environment
Surviving in a Microservices EnvironmentSurviving in a Microservices Environment
Surviving in a Microservices Environment
 
A year with event sourcing and CQRS
A year with event sourcing and CQRSA year with event sourcing and CQRS
A year with event sourcing and CQRS
 
Richer Data History with Event Sourcing (SpringOne 2GX 2015
Richer Data History with Event Sourcing (SpringOne 2GX 2015Richer Data History with Event Sourcing (SpringOne 2GX 2015
Richer Data History with Event Sourcing (SpringOne 2GX 2015
 
Gr8conf US 2015 - Intro to Event Sourcing with Groovy
Gr8conf US 2015 - Intro to Event Sourcing with GroovyGr8conf US 2015 - Intro to Event Sourcing with Groovy
Gr8conf US 2015 - Intro to Event Sourcing with Groovy
 
Advanced Microservices - Greach 2015
Advanced Microservices - Greach 2015Advanced Microservices - Greach 2015
Advanced Microservices - Greach 2015
 
Richer data-history-event-sourcing
Richer data-history-event-sourcingRicher data-history-event-sourcing
Richer data-history-event-sourcing
 
Managing a Microservices Development Team (And advanced Microservice concerns)
Managing a Microservices Development Team (And advanced Microservice concerns)Managing a Microservices Development Team (And advanced Microservice concerns)
Managing a Microservices Development Team (And advanced Microservice concerns)
 
Reactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and GrailsReactive Microservice Architecture with Groovy and Grails
Reactive Microservice Architecture with Groovy and Grails
 
Why Reactive Architecture Will Take Over The World (and why we should be wary...
Why Reactive Architecture Will Take Over The World (and why we should be wary...Why Reactive Architecture Will Take Over The World (and why we should be wary...
Why Reactive Architecture Will Take Over The World (and why we should be wary...
 
Richer Data History in Groovy with Event Sourcing
Richer Data History in Groovy with Event SourcingRicher Data History in Groovy with Event Sourcing
Richer Data History in Groovy with Event Sourcing
 
Distributed Reactive Architecture: Extending SOA with Events
Distributed Reactive Architecture: Extending SOA with EventsDistributed Reactive Architecture: Extending SOA with Events
Distributed Reactive Architecture: Extending SOA with Events
 

Recently uploaded

zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
YousufSait3
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
mz5nrf0n
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
GohKiangHock
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
Karya Keeper
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
Bert Jan Schrijver
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
Rakesh Kumar R
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
Massimo Artizzu
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
ToXSL Technologies
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
gapen1
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
TaghreedAltamimi
 

Recently uploaded (20)

zOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL DifferenceszOS Mainframe JES2-JES3 JCL-JECL Differences
zOS Mainframe JES2-JES3 JCL-JECL Differences
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
在线购买加拿大英属哥伦比亚大学毕业证本科学位证书原版一模一样
 
SQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure MalaysiaSQL Accounting Software Brochure Malaysia
SQL Accounting Software Brochure Malaysia
 
Project Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdfProject Management: The Role of Project Dashboards.pdf
Project Management: The Role of Project Dashboards.pdf
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
J-Spring 2024 - Going serverless with Quarkus, GraalVM native images and AWS ...
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
What next after learning python programming basics
What next after learning python programming basicsWhat next after learning python programming basics
What next after learning python programming basics
 
Liberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptxLiberarsi dai framework con i Web Component.pptx
Liberarsi dai framework con i Web Component.pptx
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?How Can Hiring A Mobile App Development Company Help Your Business Grow?
How Can Hiring A Mobile App Development Company Help Your Business Grow?
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
如何办理(hull学位证书)英国赫尔大学毕业证硕士文凭原版一模一样
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Lecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptxLecture 2 - software testing SE 412.pptx
Lecture 2 - software testing SE 412.pptx
 

Groovy Options for Reactive Applications - Greach 2015

Editor's Notes

  1. Let’s talk about asynchronous data.
  2. When we say ‘Reactive’, what exactly do we mean? There’s several definitions floating around the internet, all with different meanings. To me, when I hear the term ‘reactive’ I think of 3 things:
  3. first, ‘reactive programming’
  4. Reactive Programming is different from Imperative programming. In Imperative… In reactive… We’ve been working with Reactive programming for years now, even if you don’t know it. especially if you work at all with User Interfaces (e.g. Javascript). UIs are all about reacting to user input.
  5. Second: Reactive Systems.
  6. Third: Reactive Streams or Reactive Extensions I’ll explain more about these in a moment.
  7. while all 3 of these definitions are different they are related.
  8. however, today is about reactive systems and RX I think these concepts are the most exciting and they’re gathering quite a bit of traction
  9. agenda for today: talk about reactive systems go over reactive streams cover a short list of options available to us when working with Groovy
  10. To begin, let’s talk about the need for reactive… straight out of a document called the Reactive Manifesto
  11. <pause> The internet is growing. The number of users on the internet has estimated to grow from 750 million to nearly 3 billion in just 11 years,
  12. Even with this increased demand, users expect their browsing experiences to respond immediately. And they get angry and impatient when sites are slow
  13. Borrowed this slide from ilya grigorik, who introduced (I think) the idea of the 1000ms time to glass challenge… which basically states that your site should render to the screen (or glass) within 1 second of a user interaction. The reason for this is that studies have been done that show that users’s focus and mental concentration goes away when waiting for more than 1 second.
  14. Furthermore, the Scale of the internet is growing tremendously The number of users in 2012 of just one site is equal to the entire internet user base just 6 years before that in 2006. The site is facebook, but still. Just shows you that web sites are facing increasing scaling problems
  15. Applications need to handle as many users as possible… as efficiently as possible Many frameworks and server technologies still use technology and patterns since the beginning of web development. E.g. a thread based approach, where one request consumes one thread for the duration of the request. This is especially a problem in a distributed system environment, where that request may need to communicate with other systems.
  16. Reactive systems have 4 main principles
  17. The source of reactive systems can be traced to a document known as the reactive manifesto, which has gone through several revisions over the past few years… most recent edition is from this past september
  18. In it, the Manifesto declares that there are 4 principles that any application must meet in order to meet customer demand.
  19. First: the application must be responsive
  20. This comes right off of the previous point about speed. Your application, in general, should respond to user interaction as quickly as possible. A more ‘responsive’ application is a pleasing experience to your end user. The faster your application responds to their input, the less time they sit staring at your app, and the happier they’ll be. Also, it’s just important to be fast. Several years ago, an engineer with Amazon named Greg Linden revealed that the company ran experiment where they intentionally slowed down site performance 100ms delay resulted in 1 percent drop in sales. In other words, slowing down their site by a tenth of a second resulted in a considerable loss in revenue. Which makes sense, right? The faster you can take customer’s orders, the more money you make
  21. Next up: you must be resilient
  22. The resilient principle says that we, as software developers, should have the mindset that at any given moment, your code is going to break. Think to yourself: How coupled is my code? -How many of your systems are held together by quick hacks? (I know I’m guilty of this one) - How dependent on other services, domain objects, third party services, etc is my application? - What happens to my system if any one of those go down?
  23. The resilient principle says that we shouldn’t be scared of our application failing… instead we should *embrace* failure
  24. -A Reactive application is resilient to failure. If one component breaks down, the others should be able to take up the slack. if a third party service is unavailable, your app should handle it -Your system should be able to suffer damage and still operate. -For example, imagine an ecommerce application. if the ability to place orders goes down.. while your team is scrambling to fix, the end user should still be able to browse the products and add items to the cart. -They should just see a message that says “Sorry, order placement will be right back”…
  25. Your resilient mantra should be “Independent things fail independently”
  26. third:
  27. Your application should stay responsive under load it should react to changes in workload by increasing or decreasing resources
  28. lastly, Reactive applications are message driven asynchronously This calls for building and using highly concurrent systems However, we humans are not good at Concurrency. Things like Thread safety are very hard. Thus, Reactive systems call for using techniques to abstract the concurrent procedures Recommended to do this in one of two ways:
  29. Event
  30. -Communication within the system should be done via done via asynchronous immutable events, rather than long procedural code. -This naturally promotes highly decoupled code. Sender and recipient can be constructed without having to know - or care - about implementation details of the others. - I think this is a very important point… and is perhaps the most important facet of Reactive programming as the others may come naturally from adopting this single step
  31. Actor system is highly recommended
  32. very complicated Each actor is a small code block that knows to do a specific action actors == function ? actors are not accessed directly, instead actors exist within an ‘Actor System’. you interact with the system instead of the actors directly. The system abstracts the concurrency techniques Actor systems are very scalable. Can be distributed across threads or even additional systems
  33. With an Actor model you do not talk to the actors directly. Instead, you send messages into the system. Actors each have a ‘mailbox’, and know how to address messages to other actors or actor types. The actor system than delivers these messages asynchronously
  34. Both patterns have a few things in common, especially that they are asynchronous. They Key Take away: In a Reactive Application, you must NEVER BLOCK YOUR RESOURCES
  35. pause next up is Reactive streams     - I’m going to refer to them as Streams, but I think Extensions is also valid. 
  36. The idea of reactive extensions came out of Microsoft’s “Cloud Programability team” sometime before 2010. It was designed as an interface for integrating multiple asynchronous data sources in the cloud. Github used it for everything within their GH for Windows app, and decided to build their own version for Mac because they loved the pattern so much Microsoft open sourced it in 2012… perhaps to thwart Github?
  37. a couple years later, several heavy hitters in the JVM area decided to bring Reactive Streams to us.
  38. People from Netflix, Typesafe, Twitter, and many others came together. They made a spec, found at reactive-streams.org to flesh out further how Rx should work.
  39. As of a few days ago, we have several libraries which fully adhere to the spec.
  40. This is a tricky one
  41. both of the subscribers on the branch variable are receiving the same data
  42. Can be a bit intimidating at first
  43. Infamous for having colorful, but often confusing diagrams
  44. and the descriptions can be a little odd, too. I know english, and even that doesn’t help to decipher what that means
  45. … So it’s a Reactive -Stream Based web server. I think there’s a talk on Ratpack at this conf. You all should attend.
  46. lmax ring buffer: LMAX is a financial trading company that is trying to build the fastest trading platform in the world. They open sourced key piece of their technology, called the Disrupter which is based on a ring buffer pattern.
  47. Suppose we had an E-commerce app which included a service which created and processed orders. In this version, we use several additional service collaborators to do things like verifying that we have inventory, charge the user, and send emails if successful or not. Each of those service calls could take a while (checking inventory, sending email, money), which blocks the thread while we wait for each service call. This slows down the request not only for the end user but for any rampaging hordes trying to access our app
  48. Here’s that same method. Where did the rest of the code go? First, note the ‘notify’ with a String-based event
  49. On order:created, we execute the first services job Then we check the inventory for holding, and broadcast a new event based on those results
  50. The moneyService will bill the client if the inventory is good, While the email service will respond either way. -Now, some of might be saying, “But Steve, that code is spread across 3 different slides!”. While, true, which of these would you rather use? Which version do you think is more decoupled? Which would be easier to test? -(Imagine having to mock all these services as collaborators, versus simply creating events)
  51. All this talk about streams and java… you might be wondering “Why didn’t Steve talk about Java 8 Streams?”
  52. Java 8 Streams API      -at first seems great      - built into the language!      - streams api meant for finite iterable objects to pull from      - observables deal with potentially infinite streams the subscribers receive and can offer backpressure
  53.  It’s Demo Time (for those of you viewing this later, the url for sample code is: https://github.com/spember/greach2015-reactive-demos/)