SlideShare una empresa de Scribd logo
1 de 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/

Más contenido relacionado

La actualidad más candente

La actualidad más candente (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
 

Similar a 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 interop
ITCamp
 
Node.js Enterprise Middleware
Node.js Enterprise MiddlewareNode.js Enterprise Middleware
Node.js Enterprise Middleware
Behrad Zari
 
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
 
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
Maarten 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 project
Maarten 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 Denali
ITCamp
 
MvvmCross Introduction
MvvmCross IntroductionMvvmCross Introduction
MvvmCross Introduction
Stuart Lodge
 
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
JAXLondon_Conference
 

Similar a 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
 

Más de Steve Pember

Surviving in a Microservices Environment
Surviving in a Microservices EnvironmentSurviving in a Microservices Environment
Surviving in a Microservices Environment
Steve 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
 
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
 
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
Steve Pember
 

Más 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
 

Último

CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
anilsa9823
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 

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

Notas del editor

  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: