SlideShare une entreprise Scribd logo
1  sur  121
Why Reactive Architecture Will
Take Over the World
Steve Pember
GReach, 2014
A Few Questions
Have you ever...
Wondered why your company’s
codebase is all in one repo?
Have you ever...
thought “why are there so many
#@$!% tables in this database?”
Have you ever...
Dreaded executing
the unit test suite?
Have you ever...
Gone through a major
refactoring of your app?
Have you ever...
Gone on an ‘whale hunt’ on the codebase just
to add a new feature?
With “Traditional” Monolithic
Architecture,
You Can Reach MVP quickly.
The entirety of the application’s
functionality
is in one convenient location.
But that’s it.
Won’t scale?
WAIT!
...Sure, but there’s more to it.
Normal?
Architecture choice is more
important than any framework
Architecture Choice is More
Important Than Any
Framework*
*And We all Know that Only JVM Frameworks /
Languages would even be considered
Enter SOA
... which creates faster, leaner
code ...
... which results in rapid long-term
development time...
... and easier code
maintainability...
... which saves you Money.
Scale micro services instead of
whole systems
Each service can be written with
the methods and technologies
best suited to it
Separation of Concerns is a Good
Thing.
Also, it’s fun! l
However.
There’s some non-trivial upfront
time investing in a service
communication format.
Intra-Service communication has
a cost, particularly if it’s
synchronous.
Becoming Reactive
4 Principles of Reactive
Event-Driven
Scalable
Resilient
Responsive
No One correct Reactive
Architecture
“An application must be reactive
from top to bottom.”
-The Reactive Manifesto
Small, event-based services
Inter-service communication via
asynchronous Events
Message Brokers
Route Messages asynchronously
through a message queue when
data needs processing
RESTful Messages and Events...
... Consumers only operate on
data in the Message.
Add additional nodes to handle
load without additional
configuration
Plus Additional Decoupling on…
But which Broker to pick?
Rabbit MQ
Language Agnostic (additional decoupling)
Message Persistence
Message Recovery
A Few Examples
https://blog.twitter.com/2013/new-tweets-per-second-record-and-how
Change was Needed
Monolithic: 200-300 requests/
sec /host
Reactive: 10 - 20K requests / sec /
host
During the 2010 World Cup,
Twitter hit a record of 3283 TPS
Average 5700 TPS
Dynamically scale to 143,199
TPS…
With 5x - 12x fewer machines than
before
What about
NodeJS?
Node Has Increased Popularity of
Event-Based Programming
JS Is Not A Great Server-Side
Language
• Toy Garbage Collection
• No Proper Package Imports (for now)
• Quirky Interpreter
• Tricky scoping rules
• No Numerical Precision
Groovylang has the power to
compete
Build More Event-Based Apps on
the JVM
Spread Awareness
An Anti-Case Study
Source: https://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/
Source: https://www.paypal-engineering.com/2013/11/22/node-js-at-paypal/
2X FASTER!!! ….
Architecture choice is more
important than any framework
Don’t be like PayPal
Be Like Netflix
Thank You!
Image CreditsComplexity (pipes): http://www.flickr.com/photos/bhophoto/384574407/
Simple Pipeline: http://tierracos.com/our-companies/tierra-pipeline/
Highway: http://farnorthdallas.advocatemag.com/wp-content/uploads/2013/04/882349_500402383328407_539732406_o.jpg
Homer & doughnuts: http://thechurchillreview.blogspot.com/2012/10/feeling-terror-too-young-aka-kiddie.html
Tom Brady: http://stamperdad.wordpress.com/category/tom-brady/
Telephone Exchange Operator: http://fineartamerica.com/featured/telephone-exchange-1920s-granger.html
People in Queue: http://www.guardian.co.uk/money/2010/mar/23/dole-queue-jobseekers-online
Cookie Monster: http://muppet.wikia.com/wiki/Cookie_Monster_Through_the_Years
Scrooge McDuck: http://smallbusiness.uprinting.com/how-pennies-are-hurting-small-business/
Too Many Cooks: http://www.ecommercesystems.com/featured-articles/cooks-kitchen-driving-ecommerce-business/
Clustered Macs: http://www.uiowa.edu/mihpclab/micg.html
Resuscitate: http://www.dailymail.co.uk/health/article-2034160/Do-resuscitate-Theyre-fateful-words-meaning-doctors-wont-try-save-you-
collapse-hospital.html
Iron Man: http://images.wikia.com/marvelmovies
Mail Sorting: http://riversidechamber.files.wordpress.com
Twitter Logo & app chart: https://blog.twitter.com/engineering
Modern Server Farm: http://bookriot.com/2013/03/26/book-less-libraries-and-other-contemporary-realities/
Grey World: http://upload.wikimedia.org/wikipedia/commons/d/d0/BlankMap-World-1ce.png
Monolith: http://sofakingwetarrededd.blogspot.com/2012_12_01_archive.html
Star Trek: http://www.gifbin.com/984064
Reactive Manifesto: http://www.reactivemanifesto.org/
Cheetah: http://www.livescience.com/21944-usain-bolt-vs-cheetah-animal-olympics.html
Buzzword Bingo: http://www.amsterdamadblog.com/columns/buzzword-bingo/
Businessman meditating: http://www.huffingtonpost.co.uk/2013/07/09/meditation-successful-businessmen_n_3567694.html
Chaos Monkey: http://luckyrobot.com/netflix-chaos-monkey-keeps-movies-streaming/
NodeJS: http://misclassblog.com/interactive-web-development/node-js/
Turtles: http://people.wcsu.edu/pinout/herpetology/tcarolinei/29366343.EasternBoxTurtle2.jpg,
http://www.huffingtonpost.com/2013/04/26/24-tiny-turtles-who-need-a-reality-check_n_3134793.html,
http://www.ecology.com/2012/05/23/world-turtle-day/

Contenu connexe

Tendances

Cassandra NodeJS driver & NodeJS Paris
Cassandra NodeJS driver & NodeJS ParisCassandra NodeJS driver & NodeJS Paris
Cassandra NodeJS driver & NodeJS ParisDuyhai Doan
 
Introduction to Akka-Streams
Introduction to Akka-StreamsIntroduction to Akka-Streams
Introduction to Akka-Streamsdmantula
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJSUttam Aaseri
 
Deterministic behaviour and performance in trading systems
Deterministic behaviour and performance in trading systemsDeterministic behaviour and performance in trading systems
Deterministic behaviour and performance in trading systemsPeter Lawrey
 
Webinar patterns anti patterns
Webinar patterns anti patternsWebinar patterns anti patterns
Webinar patterns anti patternsconfluent
 
Apache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patternsApache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patternsFlorent Ramiere
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsJelastic Multi-Cloud PaaS
 
Lessons learned from writing over 300,000 lines of infrastructure code
Lessons learned from writing over 300,000 lines of infrastructure codeLessons learned from writing over 300,000 lines of infrastructure code
Lessons learned from writing over 300,000 lines of infrastructure codeYevgeniy Brikman
 
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE Application
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE ApplicationFrom VMs to Containers: Decompose and Migrate Old Legacy JavaEE Application
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE ApplicationJelastic Multi-Cloud PaaS
 
Event driven microservices with vertx and kubernetes
Event driven microservices with vertx and kubernetesEvent driven microservices with vertx and kubernetes
Event driven microservices with vertx and kubernetesAndy Moncsek
 
Perfug 20-11-2019 - Kafka Performances
Perfug 20-11-2019 - Kafka PerformancesPerfug 20-11-2019 - Kafka Performances
Perfug 20-11-2019 - Kafka PerformancesFlorent Ramiere
 
Planning to Fail #phpne13
Planning to Fail #phpne13Planning to Fail #phpne13
Planning to Fail #phpne13Dave Gardner
 
Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster OpenCredo
 
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET ActorsFull-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actorspetabridge
 
The 7 characteristics of container native infrastructure, LinuxCon/ContainerC...
The 7 characteristics of container native infrastructure, LinuxCon/ContainerC...The 7 characteristics of container native infrastructure, LinuxCon/ContainerC...
The 7 characteristics of container native infrastructure, LinuxCon/ContainerC...Casey Bisson
 
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 SystemsJonas Bonér
 
How Yelp does Service Discovery
How Yelp does Service DiscoveryHow Yelp does Service Discovery
How Yelp does Service DiscoveryJohn Billings
 

Tendances (20)

Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
 
Cassandra NodeJS driver & NodeJS Paris
Cassandra NodeJS driver & NodeJS ParisCassandra NodeJS driver & NodeJS Paris
Cassandra NodeJS driver & NodeJS Paris
 
Introduction to Akka-Streams
Introduction to Akka-StreamsIntroduction to Akka-Streams
Introduction to Akka-Streams
 
Podila QCon SF 2016
Podila QCon SF 2016Podila QCon SF 2016
Podila QCon SF 2016
 
Introduction to NodeJS
Introduction to NodeJSIntroduction to NodeJS
Introduction to NodeJS
 
Deterministic behaviour and performance in trading systems
Deterministic behaviour and performance in trading systemsDeterministic behaviour and performance in trading systems
Deterministic behaviour and performance in trading systems
 
Webinar patterns anti patterns
Webinar patterns anti patternsWebinar patterns anti patterns
Webinar patterns anti patterns
 
Apache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patternsApache Kafka - Patterns anti-patterns
Apache Kafka - Patterns anti-patterns
 
Automated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE ApplicationsAutomated Scaling of Microservice Stacks for JavaEE Applications
Automated Scaling of Microservice Stacks for JavaEE Applications
 
Kubernetes: My BFF
Kubernetes: My BFFKubernetes: My BFF
Kubernetes: My BFF
 
Lessons learned from writing over 300,000 lines of infrastructure code
Lessons learned from writing over 300,000 lines of infrastructure codeLessons learned from writing over 300,000 lines of infrastructure code
Lessons learned from writing over 300,000 lines of infrastructure code
 
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE Application
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE ApplicationFrom VMs to Containers: Decompose and Migrate Old Legacy JavaEE Application
From VMs to Containers: Decompose and Migrate Old Legacy JavaEE Application
 
Event driven microservices with vertx and kubernetes
Event driven microservices with vertx and kubernetesEvent driven microservices with vertx and kubernetes
Event driven microservices with vertx and kubernetes
 
Perfug 20-11-2019 - Kafka Performances
Perfug 20-11-2019 - Kafka PerformancesPerfug 20-11-2019 - Kafka Performances
Perfug 20-11-2019 - Kafka Performances
 
Planning to Fail #phpne13
Planning to Fail #phpne13Planning to Fail #phpne13
Planning to Fail #phpne13
 
Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster
 
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET ActorsFull-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
 
The 7 characteristics of container native infrastructure, LinuxCon/ContainerC...
The 7 characteristics of container native infrastructure, LinuxCon/ContainerC...The 7 characteristics of container native infrastructure, LinuxCon/ContainerC...
The 7 characteristics of container native infrastructure, LinuxCon/ContainerC...
 
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
 
How Yelp does Service Discovery
How Yelp does Service DiscoveryHow Yelp does Service Discovery
How Yelp does Service Discovery
 

Similaire à Why Reactive Architecture Will Take Over The World (and why we should be wary of NodeJS)

ITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise MiddlewareBehrad Zari
 
Refactoring to Microservices
Refactoring to MicroservicesRefactoring to Microservices
Refactoring to MicroservicesJacinto Limjap
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture corehard_by
 
UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015Christopher Curtin
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivRon Perlmuter
 
How it's made - MyGet (CloudBurst)
How it's made - MyGet (CloudBurst)How it's made - MyGet (CloudBurst)
How it's made - MyGet (CloudBurst)Maarten Balliauw
 
Lunar Way and the Cloud Native "stack"
Lunar Way and the Cloud Native "stack"Lunar Way and the Cloud Native "stack"
Lunar Way and the Cloud Native "stack"Kasper Nissen
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamBrian Benz
 
Running in the Cloud - First Belgian Azure project
Running in the Cloud - First Belgian Azure projectRunning in the Cloud - First Belgian Azure project
Running in the Cloud - First Belgian Azure projectMaarten Balliauw
 
Running in the Cloud - First Belgian Azure project
Running in the Cloud - First Belgian Azure projectRunning in the Cloud - First Belgian Azure project
Running in the Cloud - First Belgian Azure projectMaarten Balliauw
 
ITCamp 2011 - Cristian Lefter - SQL Server code-name Denali
ITCamp 2011 - Cristian Lefter - SQL Server code-name DenaliITCamp 2011 - Cristian Lefter - SQL Server code-name Denali
ITCamp 2011 - Cristian Lefter - SQL Server code-name DenaliITCamp
 
MvvmCross Introduction
MvvmCross IntroductionMvvmCross Introduction
MvvmCross IntroductionStuart Lodge
 
MvvmCross Seminar
MvvmCross SeminarMvvmCross Seminar
MvvmCross SeminarXamarin
 
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve PooleDevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve PooleJAXLondon_Conference
 
Google Cloud Platform and Kubernetes
Google Cloud Platform and KubernetesGoogle Cloud Platform and Kubernetes
Google Cloud Platform and KubernetesKasper Nissen
 
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"Daniel Bryant
 
How to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringHow to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringAndrew Kirkpatrick
 
20131028 BTUG.be - BizTalk Deployment
20131028 BTUG.be - BizTalk Deployment20131028 BTUG.be - BizTalk Deployment
20131028 BTUG.be - BizTalk DeploymentBTUGbe
 

Similaire à Why Reactive Architecture Will Take Over The World (and why we should be wary of NodeJS) (20)

ITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interopITCamp 2011 - Mihai Nadas - Windows Azure interop
ITCamp 2011 - Mihai Nadas - Windows Azure interop
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
 
Refactoring to Microservices
Refactoring to MicroservicesRefactoring to Microservices
Refactoring to Microservices
 
Choosing the right parallel compute architecture
Choosing the right parallel compute architecture Choosing the right parallel compute architecture
Choosing the right parallel compute architecture
 
UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015UnConference for Georgia Southern Computer Science March 31, 2015
UnConference for Georgia Southern Computer Science March 31, 2015
 
Node.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel AvivNode.js meetup at Palo Alto Networks Tel Aviv
Node.js meetup at Palo Alto Networks Tel Aviv
 
How it's made - MyGet (CloudBurst)
How it's made - MyGet (CloudBurst)How it's made - MyGet (CloudBurst)
How it's made - MyGet (CloudBurst)
 
Lunar Way and the Cloud Native "stack"
Lunar Way and the Cloud Native "stack"Lunar Way and the Cloud Native "stack"
Lunar Way and the Cloud Native "stack"
 
Experiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure teamExperiences using CouchDB inside Microsoft's Azure team
Experiences using CouchDB inside Microsoft's Azure team
 
Running in the Cloud - First Belgian Azure project
Running in the Cloud - First Belgian Azure projectRunning in the Cloud - First Belgian Azure project
Running in the Cloud - First Belgian Azure project
 
Running in the Cloud - First Belgian Azure project
Running in the Cloud - First Belgian Azure projectRunning in the Cloud - First Belgian Azure project
Running in the Cloud - First Belgian Azure project
 
Cont0519
Cont0519Cont0519
Cont0519
 
ITCamp 2011 - Cristian Lefter - SQL Server code-name Denali
ITCamp 2011 - Cristian Lefter - SQL Server code-name DenaliITCamp 2011 - Cristian Lefter - SQL Server code-name Denali
ITCamp 2011 - Cristian Lefter - SQL Server code-name Denali
 
MvvmCross Introduction
MvvmCross IntroductionMvvmCross Introduction
MvvmCross Introduction
 
MvvmCross Seminar
MvvmCross SeminarMvvmCross Seminar
MvvmCross Seminar
 
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve PooleDevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
DevOps and the cloud: all hail the (developer) king - Daniel Bryant, Steve Poole
 
Google Cloud Platform and Kubernetes
Google Cloud Platform and KubernetesGoogle Cloud Platform and Kubernetes
Google Cloud Platform and Kubernetes
 
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
JAXLondon 2015 "DevOps and the Cloud: All Hail the (Developer) King"
 
How to get started with Site Reliability Engineering
How to get started with Site Reliability EngineeringHow to get started with Site Reliability Engineering
How to get started with Site Reliability Engineering
 
20131028 BTUG.be - BizTalk Deployment
20131028 BTUG.be - BizTalk Deployment20131028 BTUG.be - BizTalk Deployment
20131028 BTUG.be - BizTalk Deployment
 

Plus de 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 2023Steve 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 EnvironmentSteve Pember
 
Surviving in a Microservices environment -abridged
Surviving in a Microservices environment -abridgedSurviving in a Microservices environment -abridged
Surviving in a Microservices environment -abridgedSteve Pember
 
Gradle Show and Tell
Gradle Show and TellGradle Show and Tell
Gradle Show and TellSteve Pember
 
Greach 2018: Surviving Microservices
Greach 2018: Surviving MicroservicesGreach 2018: Surviving Microservices
Greach 2018: Surviving MicroservicesSteve Pember
 
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 StackSteve Pember
 
Event storage in a distributed system
Event storage in a distributed systemEvent storage in a distributed system
Event storage in a distributed systemSteve Pember
 
Harnessing Spark and Cassandra with Groovy
Harnessing Spark and Cassandra with GroovyHarnessing Spark and Cassandra with Groovy
Harnessing Spark and Cassandra with GroovySteve Pember
 
Surviving in a microservices environment
Surviving in a microservices environmentSurviving in a microservices environment
Surviving in a microservices environmentSteve Pember
 
Surviving in a Microservices Environment
Surviving in a Microservices EnvironmentSurviving in a Microservices Environment
Surviving in a Microservices EnvironmentSteve Pember
 
An introduction to Reactive applications, Reactive Streams, and options for t...
An introduction to Reactive applications, Reactive Streams, and options for t...An introduction to Reactive applications, Reactive Streams, and options for t...
An introduction to Reactive applications, Reactive Streams, and options for t...Steve Pember
 
An Introduction to jOOQ
An Introduction to jOOQAn Introduction to jOOQ
An Introduction to jOOQSteve Pember
 
Reactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovyReactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovySteve 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 CQRSSteve Pember
 
An Introduction to Reactive Application, Reactive Streams, and options for JVM
An Introduction to Reactive Application, Reactive Streams, and options for JVMAn Introduction to Reactive Application, Reactive Streams, and options for JVM
An Introduction to Reactive Application, Reactive Streams, and options for JVMSteve Pember
 
Reactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovyReactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovySteve 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 2015Steve Pember
 
Springone2gx 2015 Reactive Options for Groovy
Springone2gx 2015  Reactive Options for GroovySpringone2gx 2015  Reactive Options for Groovy
Springone2gx 2015 Reactive Options for GroovySteve 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 GroovySteve Pember
 
Gr8conf US 2015: Reactive Options for Groovy
Gr8conf US 2015: Reactive Options for GroovyGr8conf US 2015: Reactive Options for Groovy
Gr8conf US 2015: Reactive Options for GroovySteve Pember
 

Plus de Steve Pember (20)

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
 
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
 
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
 
An introduction to Reactive applications, Reactive Streams, and options for t...
An introduction to Reactive applications, Reactive Streams, and options for t...An introduction to Reactive applications, Reactive Streams, and options for t...
An introduction to Reactive applications, Reactive Streams, and options for t...
 
An Introduction to jOOQ
An Introduction to jOOQAn Introduction to jOOQ
An Introduction to jOOQ
 
Reactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovyReactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of Groovy
 
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
 
An Introduction to Reactive Application, Reactive Streams, and options for JVM
An Introduction to Reactive Application, Reactive Streams, and options for JVMAn Introduction to Reactive Application, Reactive Streams, and options for JVM
An Introduction to Reactive Application, Reactive Streams, and options for JVM
 
Reactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of GroovyReactive Streams and the Wide World of Groovy
Reactive Streams and the Wide World of Groovy
 
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
 
Springone2gx 2015 Reactive Options for Groovy
Springone2gx 2015  Reactive Options for GroovySpringone2gx 2015  Reactive Options for Groovy
Springone2gx 2015 Reactive Options for Groovy
 
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
 
Gr8conf US 2015: Reactive Options for Groovy
Gr8conf US 2015: Reactive Options for GroovyGr8conf US 2015: Reactive Options for Groovy
Gr8conf US 2015: Reactive Options for Groovy
 

Dernier

Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 

Dernier (20)

Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 

Why Reactive Architecture Will Take Over The World (and why we should be wary of NodeJS)

Notes de l'éditeur

  1. Welcome to “Why Reactive Architecture will take over the world, and why we should be afraid it may be NodeJS”. Another title is “Why I hate Monolithic apps, just like the one I showed you” I’m Steve. Let’s talk about application scalability and complexity
  2. -I won’t try to make anyone guess what this is -I should explain it a bit, as I’ll be following a similar format for other diagrams. -Blue symbol represents some feature - browsing, managing, payments, cart -black box is a single web node or application -cloud is internet
  3. -A few questions, before we begin. -I’d like for you to keep the answers to these in your head as we go along
  4. -or rather, is everything in trunk / master?
  5. -Do you miss Test Driven Development?
  6. whether it be a total overhaul or just a few features. How was it?
  7. And if so, did it take you longer than coding that new feature? Did you have to include other folks to help you? Someone who’d been around for a while that knows the entire codebase? How often does that person get dragged in to help others?
  8. These are all symptoms of a Monolithic application, so If you answered “YES” to any of these, then you probably have a Monolithic app. If you laughed, I’m going to assume that’s a ‘yes’. I feel your pain!
  9. That being said, Monolithic Architecture does have one big draw: it makes it easy for new projects to reach the Minimum Viable Product rapidly.
  10. “convienent”
  11. The Complexity will become enormous. Any gains you think you may have made at the beginning of the project will not continue, particularly once you start to attract users. ..And grow your team. - A monothlic app will not scale!
  12. You may say to yourself, “Wait, Steve!” what do you mean it won’t scale?
  13. I can create multiple nodes of my app and then load balance them...
  14. Add Swimlanes/ master-slave dbs in case that doesn’t work That star is supposed to represent the ‘master’ db
  15. … and suuurrre, you certainly could do those things. But that’s not I what I mean when I say ‘scale’
  16. Can you really look at a class or schema diagram like this and really think, “Yeah, that’s awesome. Nailed it.”? -btw, this was the largest I could find on Google images. I’m sure we’ve all seen the massive versions of this that cover multiple pages, taped to the wall. - If you ever have to tape to the wall, done something wrong
  17. The ability to add new features, fix bugs, or resolve technical debt cannot scale with the size of the application. Throwing more developers at it also will not help, they’ll just get in each others’ way. Be merge conflicts all over the place. - One of the best passive-aggressive statements I’ve seen - Passive aggressively scrawled on the wall: You can’t make a baby in 1 month with 9 women.
  18. -And trying to refactor anything? Forget it. -I’ve seen it happen plenty of times: Your company will start out by creating a team to reimplement a feature or rebuild an application. Sounds good? Eventually, this team will start taking too long. Soon enough, the managers will be screaming for updates or new features on the old app. So, you end up with *two* teams, one maintaining the old app, while the other continues the rebuild AANNND maintains feature parity with the old system.
  19. As the size of your codebase increases, the computational complexity will exponentially increase and will have adverse effects on maintenance. This has been known for some time; there’s been papers written on the subject. Although it’s difficult to accurately measure.
  20. This is such a misguided architecture, it makes you wonder how exactly we collectively ended up here.
  21. I blame it largely at the feet of the large, popular web frameworks, e.g. Rails, Django, Grails. Don’t get me wrong, they have their uses. I loooooove Grails.
  22. But they’re touted as if they’re the magic cure for building your app or product; that your company should be based entirely within a framework. You hear folks say, “Oh, what are you using in your startup?” “Why, We’re a Ruby on Rails shop, obviously!”. I argue that your framework choice is largely irrelevant (unless it’s Grails ;)! ). When people ask you “what technology are you using?” the answer should be something like “Ugh, well, that’s difficult”.
  23. And so we reach the key point of this presentation: The choice you make when designing your architecture is much more valuable than the frameworks or languages you choose.
  24. In fact, that’s so important I’m going to mention it again, but … bigger… this time. Along, of course, with the point that even when choosing our framework, we’d only consider something on the JVM, right?
  25. There have been attempts to mitigate this scalability problem with different architectures. This is nothing knew. One of the most widely used, I’d argue is Service Oriented Architecture, or SOA for short. Is everyone aware of the concept?
  26. -Let’s take our anecdotal design, an e-commerce store.
  27. With SOA, one would break up each feature into an individual component or service, and setup communication between each service over some direct service calls. Eg SOAP or REST. -Note that these calls are traditionally Synchronous over http, so it’s imperative that each node return as quickly as possible
  28. This architecture keeps keeps the individual features easier to manage and keep track of, which reduces overall complexity dramatically as we can examine each service in isolation, rather than one big code base
  29. … as each feature set will be in its own simpler repository
  30. … because with distributed applications like SOA, each node becomes its own concentrated ecosystem. New features can be added with relatively little pain.
  31. And the code is easier to maintain. I highlight this point for a reason. Bugs are vastly easier to discover. Refactoring is highly concentrated and (shouldn’t) disrupt the work of the other services.
  32. and other numbers that managers love
  33. TODO: And it’s easier to ‘scale’ in the traditional sense.
  34. … if Grails is best for one service, fantastic. If Spring is, great. Perhaps this service needs Redis as a database? Great! This other one, Mysql? Perfect!
  35. possibly delete
  36. -organizing the communication and see things flow and respond, it’s magical
  37. However! (There’s always a downside, eh?)
  38. If you embrace SOA you’ll need someone to oversee the team and catch those engineers which are straying from the distributed vision. In other words, you’ll need a service-focused Architect or team of architects to design the system
  39. -find out how each will communicate
  40. Communication between your services can be expensive, especially if it’s synchronous. HTTP calls are relatively slow These calls can block resources on both services that other commands could be using.
  41. * Having a web of interconnected services can also grow out of control. Having to configure service nodes so that each knows where the others are located in the network can be cumbersome to manage.
  42. In other words, SOA (along with the other architecture patterns that have attempted to fix monolithic) do a decent job...
  43. ... we can do better
  44. So what does this have to do with ‘Reactive’? That’s really why we’re here, right? There was a point to that lead in, I assure you.
  45. I should be clear: The term ‘Reactive’ is a buzzword…
  46. Popularized by a company called Typesafe. They are the maintainers of the Play and Akka Frameworks, and they believe that those two (along with Scala) are the embodiment of the Reactive buzzword.
  47. To be Reactive, an application must comprise 4 features:
  48. -
  49. -Communication within the system and actions should be done via 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 about the other. -Furthermore, if you were at my last talk, by using events, we can monitor the *history* of our application.
  50. -The system should be able to quickly stretch and grow based on the demand placed on demand placed on it. Should be able to effectively be replicated on multiple nodes. Dynamic scaling is an optimal use of resources: can scale up quickly when needed, but can scale down when not needed (save $) -Also, like I mentioned earlier, it’s more than just machine deployment, but scalability also is about how easily your developers can maintain your app
  51. -A Reactive application is resilient to failure. If one service node breaks down, the others should be able to take up the slack. If one feature goes down, the others should still operate. -Your system should be able to suffer damage and still operate. -For example, in the ecomm example, if the order placement feature 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.
  52. Your application, in general, should respond to user interaction as quickly as possible. Each service should handle events rapidly. This leads to 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.
  53. Even with all that, there’s no One Correct Reactive architecture.
  54. Rather, Reactive is a mindset or a state of being. It’s a goal that you need to orient your thinking around when you are designing or architecting your individual service nodes and your distributed architecture
  55. The people at Typesafe wrote up this thinking into something they call the ‘Reactive Manifesto’. After this talk, if you like what I’m saying, feel free to go and sign it.
  56. Anyway, The Manifesto does say at one point that.. <read> Building on that, I believe that the best template or pattern to follow in order to make a Reactive application is to take a services-oriented approach each node uses an event-based model to communicate internally each node communicates with each other via Events instead of direct HTTP
  57. So, going back to the original e-commerce example… - how to go reactive?
  58. First of course, is to break up our application into individual components, but this is not good enough. Could still adhere to be resilient and responsive, and it’s certainly more scalable than it was.
  59. Each service should be as small as possible, and be event-driven. The JVM really shines at this.
  60. Some examples in the Groovy world: Grails async Ratpack (which is built on Netty.io) Netflix’s Groovy adapter for RxJava
  61. In other words, extend the idea of having an event driven node or service into the notion of having event-driven communication between services. -And how do we facilitate event based communication between our services?
  62. One method: Message Brokers!
  63. A Basic Overview of Message Brokers -Messages are routed through an EXCHANGE in to one or many queues. -Messages are then plucked off the queue by an attached, waiting Consumer. Or, the first available if multiple are attached.
  64. The key to using the message brokers in our reactive apps is when certain events occur to encapsulate data into individual messages and drop them on some queue or exchange
  65. TODO: Image of Postman / message.
  66. Can spin up or down nodes for targeted scaling of your services as demand dictates.
  67. -Example from before, an e-commerce site -we’ve broken the features into individual applications and spun up one node per each -connected the users’ cart to a queue, and our order processing into another queue
  68. -suppose the cart and order processing start experiencing heavy load - programatically spin up new instances to handle it - Going back into the refactoring discussion -> Can pit different implementations of a service against each other via AB testing
  69. TIME: Asynchronous
  70. LOCATION: Nodes do not care where the other nodes are, only worry about the broker
  71. CARDINALITY: Each service instance does not care about the number of others out there
  72. Why? uses the raw AMQP protocol (as do some of the others I mentioned) the actual broker itself is a lightweight Erlang application Offers two key security features: message persistence and error recovery
  73. And, there’s a fantastic plugin written by Peter Ledbrook and Jeff Brown
  74. Reactive Architectures are in use by several companies, particularly large ones. Although they may not refer to it as being Reactive
  75. -make heavy use of AWS -replicate bundles of services as demand dictates -Netflix is big on resiliency. In order to test their resiliency, they use a custom tool called ‘Chaos Monkey’
  76. Every weekday between 9am and 5pm (a.k.a. “Work Hours), Netflix unleashes this little adorable little guy into their infrastructure, where he goes to work randomly destroying various services.
  77. These services need to prove their strength and stand up to the monkey. Or rather, this allows Netflix to find weaknesses and bugs in their services
  78. …Twitter is another large one, perhaps the biggest example
  79. They had one of the largest, most monolithic Rails deployments in the world. Engineers needed to pull in Global Experts to get anything done on the codebase Spent more time on “Archeological Digs” or “Whale Hunting expeditions” to track down bugs or learn how things worked than on developing new features
  80. Turning point came during 2010 World Cup. Flurry of tweets brought twitter to its knees. Service was unavailable, engineers worked through the night Debated putting a vuvuzella sound effect here.
  81. They shattered their monolithic application into multiple individual applications.. The size of the circles represent the number of deployment nodes of that particular application service -I know I just spoke about Rabbit, but Twitter developed their own tool called Finagle which handles asynchronous communication between nodes
  82. Each application had their own small, determined, dedicated teams.
  83. they switched from the Ruby Virtual Machine to the JVM. Twitter was by no means strangers to the JVM -Search features was written in Java Embraced Event-based programming from the bottom up Went with Netty (as opposed to something like NodeJS), which is an NIO technology for the JVM
  84. When Twitter was Monolithic, they were able to achieve about 200 to 300 requests or tweets per second per application node. After going reactive, they’re up to 10 to 20 thousand. 2 orders or magnitude?
  85. So, as of August 2013, Twitter handles an average of 5700 Tweets per minutes, and under load, can dynamically ramp that number up to 144k without any direct action by staff. I don’t believe they’ve actually reached the capacity of their new system.
  86. With 5x - 12x fewer machines than before! Imagine the savings on server infrastructure!
  87. That’s kind of mind blowing, right? Not Bad, eh? -> Incidentally, JVM advocates and Rails detractors love to talk about how Twitter moved away from Rails to Java. And while that’s true that Java would give better performance, the Architecture choice was vastly more important
  88. So, What does this all have to do with NodeJS?
  89. The event loop is quite good with a high number of low activity connections.
  90. Node has done an excellent job at furthering event-based programming and exposing developers to the concept that might not have otherwise experienced it.
  91. -I actually *like* Javascript. However, I don’t believe it’s actually a ‘good’ language, especially for server side usage:
  92. -garbage collection is horrendous -there’s no proper package or module import rules (this will be coming along in the next few years) -the interpreter has some very strange quirks; -not a great choice for numerical work or precision numbers. There’s only a ‘Number’ Object, that does horrible things to floats. -0.1*0.4. The answer is not 0.4. - Not specifically JS, but the project structure conventions and build tools are still young and immature (compared to JVM) Plus, if you’re like me your start to miss things like static typing
  93. Yet despite these things, NodeJS is becoming increasingly popular. This graph is from a web technology survey site called w3techs, and shows the percentage of all web apps that are powered by NodeJS (according to those that responded to the survey). In the past 6 months, it has gone from powering 0.02% of ALL web apps to powering 0.065% of ALL web apps.
  94. Furthermore it is extremely popular with high traffic websites. There is power in the event loop based model. What NodeJS is showing us, though, is that the standard ‘Thread pool with Single request per thread’ model is antiquated. Which I think shows again that architecture choices is the most important thing.
  95. I firmly believe that what this shows is that the world is seeing the power of Event-based and Reactive architectures. I feel that Groovylang and the JVM in general can compete with and outperform NodeJS. To do that, we as a community should spread awareness
  96. Use tools like Grails async, the Netflix JavaRX Groovy library, and Ratpack (or event Netty), to build event-based Reactive apps. contribute to the community
  97. Tweet, blog about the power of Groovylang and the JVM. Maybe even shout to people about it in the streets.
  98. On this same topic, a quick anti-example of what can happen if we do not do this.
  99. …Paypal
  100. In 2013, PayPal rebuilt their web application which was used to serve up the Home page, a user’s activity feed and a user’s wallet. To mitigate risk of the new system, they built two versions: one using home-grown Java framework based on Spring, which they knew how to integrate and scale with the other systems. The other version used NodeJS. They released this blog post which describes this process and details the results. And slams the JVM
  101. With the new java version of their app, they were able to achieve approximately 1.8 page requests per second for a single user. At 10 users, this speed drops to about 11.5 requests per second (avg response time of 1800 milliseconds)
  102. With the NodeJS application, they were able to achieve 3.3 page requests per second with one user. At 20 concurrent users, they are able to process 24 requests per second. An average response time of 1200 milliseconds
  103. Now they made news because PayPal claimed that they were serving these pages 2x as fast! Just by switching to NodeJS! And yet, these performance numbers are nothing to be truly excited about. Seeing response times of over 1 second under extraordinarily light load? I wouldn’t share that. But I believe this is not the entire story.
  104. todo: slide showing backend services are bottleneck or weak point Front end app is Sonic, bunch of turtles for backend services. -backend services not responsive -synchronous communication blocks
  105. They may be excited about their technology switch, but the overall architecture of their company didn’t change and so performance did not greatly increase.
  106. … They should have embrace the Reactive mindset, as Twitter and Netflix have done. And so, I leave you with this: