SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Downloaden Sie, um offline zu lesen
Go Reactive 
Event-Driven, Scalable, Resilient & Responsive Systems 
Mirco Dotta 
@mircodotta
The Four Reactive Traits 
Reactive 
Applications 
2 
http://reactivemanifesto.org/
Starting Point: 
The User
The User browser
browser 
frontend 
server 
internal 
service storage 
internal 
service 
DB 
external 
service
Responsiveness 
! 
always available 
interactive 
(near) real-time
Bounded Latency 
6
Bounded Latency 
• fan-out in parallel and aggregate 
6
Bounded Latency 
• fan-out in parallel and aggregate 
6 
A B C
Bounded Latency 
• fan-out in parallel and aggregate 
6 
A 
B 
C
Bounded Latency 
• fan-out in parallel and aggregate 
6 
A 
B 
C 
e
Bounded Latency 
• fan-out in parallel and aggregate 
• use circuit breakers for graceful degradation 
7
Bounded Latency 
• fan-out in parallel and aggregate 
• use circuit breakers for graceful degradation 
7 
do work 
fail fast
Bounded Latency 
• fan-out in parallel and aggregate 
• use circuit breakers for graceful degradation 
• use bounded queues, measure flow rates 
8
Bounded Latency 
• fan-out in parallel and aggregate 
• use circuit breakers for graceful degradation 
• use bounded queues, measure flow rates 
8 
Use Bounded Queues: 
! 
Latency = QueueLength • ProcessingTime 
! 
(for reasonably stable average processing time)
Bounded Latency 
• fan-out in parallel and aggregate 
• use circuit breakers for graceful degradation 
• use bounded queues, measure flow rates 
8 
Use Bounded Queues: 
! 
Latency = QueueLength • ProcessingTime 
! 
(for reasonably stable average processing time) 
m
Resilience 
! 
Responsive in the Face of Failure
Handle Failure 
• software will fail 
• hardware will fail 
• humans will fail 
• system still needs to respond ➟ resilience 
10
Distribute! 
11
Asynchronous Failure 
• parallel fan-out & distribution 
➟ asynchronous execution 
• compartmentalization & isolation 
• no response? ➟ timeout events 
• someone else’s exception? ➟ supervision 
12
Asynchronous Failure 
• parallel fan-out & distribution 
➟ asynchronous execution 
• compartmentalization & isolation 
• no response? ➟ timeout events 
• someone else’s exception? ➟ supervision 
12
Asynchronous Failure 
• parallel fan-out & distribution 
➟ asynchronous execution 
• compartmentalization & isolation 
• no response? ➟ timeout events 
• someone else’s exception? ➟ supervision 
12 
Request 
Response 
Failure
Asynchronous Failure 
• parallel fan-out & distribution 
➟ asynchronous execution 
driven 
message-• compartmentalization & isolation 
• no response? ➟ timeout events 
• someone else’s exception? ➟ supervision 
12 
Request 
Response 
Failure
Asynchronous Failure 
• parallel fan-out & distribution 
➟ asynchronous execution 
• compartmentalization & isolation 
• no response? ➟ timeout events 
• someone else’s exception? ➟ supervision 
• location transparency ➟ seamless resilience 
12
Elasticity 
! 
Responsive in the Face of Changing Load
Handle Load 
14
Handle Load 
14
Handle Load 
• partition incoming work for distribution 
• share nothing 
• scale capacity up and down on demand 
• supervise and adapt 
• location transparency 
➟ seamless scalability 
14
Handle Load 
• partition incoming work for distribution 
• share nothing 
• scale capacity up and down on demand 
• supervise and adapt 
• location transparency 
➟ seamless scalability 
14 
m
… this has some interesting consequences!
Consequences 
• distribution & scalability 
➟ loss of strong consistency 
• CAP theorem? — not as relevant as you think 
• eventual consistency 
➟ gossip, heartbeats, dissemination of change 
! 
16
Consequences 
• distribution & scalability 
➟ loss of strong consistency 
• CAP theorem? — not as relevant as you think 
• eventual consistency 
➟ gossip, heartbeats, dissemination of change 
! 
16 
m
Corollary 
• Reactive needs to be applied all the way down 
17
But what about us, 
the developers?
Step 1: Take a Leap of Faith 
• thread-based models have made us defensive 
• “don’t let go of your thread!” 
• “asynchrony is suspicious” 
• “better return strict value, even if that needs blocking” 
19
Step 1: Take a Leap of Faith 
• thread-based models have made us defensive 
• “don’t let go of your thread!” 
• “asynchrony is suspicious” 
• “better return strict value, even if that needs blocking” 
• it is okay to write a method that returns a Future! 
19
Step 2: Rethink the Architecture 
• break out of the synchronous blocking prison 
• focus on communication & protocols 
• asynchronous program flow 
➟ no step-through debugging 
➟ tracing and monitoring 
• loose coupling 
20
Step 3: Profit! 
• clean business logic, 
separate from failure handling 
• distributable units of work 
• effortless parallelization 
21
Step 3: Profit! 
• clean business logic, 
separate from failure handling 
• distributable units of work 
• effortless parallelization 
• less assumptions ➟ lower maintenance cost 
21
Summary
The Four Reactive Traits 
Reactive 
Applications 
23 
http://reactivemanifesto.org/
All credit for this great slidedeck goes to Roland Kuhn (@rolandkuhn), 
while any inaccuracy is mine. 
©Typesafe 2014 – All Rights Reserved

Weitere ähnliche Inhalte

Ähnlich wie Go Reactive Systems Event-Driven Scalable Resilient Responsive

What is Reactive programming?
What is Reactive programming?What is Reactive programming?
What is Reactive programming?Kevin Webber
 
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...DataStax
 
Working With Concurrency In Java 8
Working With Concurrency In Java 8Working With Concurrency In Java 8
Working With Concurrency In Java 8Heartin Jacob
 
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
 
CAP Theorem - Theory, Implications and Practices
CAP Theorem - Theory, Implications and PracticesCAP Theorem - Theory, Implications and Practices
CAP Theorem - Theory, Implications and PracticesYoav Francis
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityRandy Shoup
 
Building a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for DockerBuilding a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for DockerTomas Doran
 
Building a smarter application Stack by Tomas Doran from Yelp
Building a smarter application Stack by Tomas Doran from YelpBuilding a smarter application Stack by Tomas Doran from Yelp
Building a smarter application Stack by Tomas Doran from YelpdotCloud
 
Building a Smarter Application Stack
Building a Smarter Application StackBuilding a Smarter Application Stack
Building a Smarter Application StackDocker, Inc.
 
Object-oriented design principles
Object-oriented design principlesObject-oriented design principles
Object-oriented design principlesXiaoyan Chen
 
Building on quicksand microservices indicthreads
Building on quicksand microservices  indicthreadsBuilding on quicksand microservices  indicthreads
Building on quicksand microservices indicthreadsIndicThreads
 
Fault tolerant presentation
Fault tolerant presentationFault tolerant presentation
Fault tolerant presentationskadyan1
 
Designing Fault Tolerant Microservices
Designing Fault Tolerant MicroservicesDesigning Fault Tolerant Microservices
Designing Fault Tolerant MicroservicesOrkhan Gasimov
 
Fault Tolerance in Distributed Environment
Fault Tolerance in Distributed EnvironmentFault Tolerance in Distributed Environment
Fault Tolerance in Distributed EnvironmentOrkhan Gasimov
 
Parallel programming in .NET
Parallel programming in .NETParallel programming in .NET
Parallel programming in .NETPeter Csala
 
Scaling Your Architecture for the Long Term
Scaling Your Architecture for the Long TermScaling Your Architecture for the Long Term
Scaling Your Architecture for the Long TermRandy Shoup
 
Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010Christopher Brown
 
Patterns of Distributed Application Design
Patterns of Distributed Application DesignPatterns of Distributed Application Design
Patterns of Distributed Application DesignGlobalLogic Ukraine
 
MongoDB World 2018: Tutorial - MongoDB Meets Chaos Monkey
MongoDB World 2018: Tutorial - MongoDB Meets Chaos MonkeyMongoDB World 2018: Tutorial - MongoDB Meets Chaos Monkey
MongoDB World 2018: Tutorial - MongoDB Meets Chaos MonkeyMongoDB
 
Tiger oracle
Tiger oracleTiger oracle
Tiger oracled0nn9n
 

Ähnlich wie Go Reactive Systems Event-Driven Scalable Resilient Responsive (20)

What is Reactive programming?
What is Reactive programming?What is Reactive programming?
What is Reactive programming?
 
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
Building Highly Available Apps on Cassandra (Robbie Strickland, Weather Compa...
 
Working With Concurrency In Java 8
Working With Concurrency In Java 8Working With Concurrency In Java 8
Working With Concurrency In Java 8
 
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
 
CAP Theorem - Theory, Implications and Practices
CAP Theorem - Theory, Implications and PracticesCAP Theorem - Theory, Implications and Practices
CAP Theorem - Theory, Implications and Practices
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
 
Building a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for DockerBuilding a smarter application stack - service discovery and wiring for Docker
Building a smarter application stack - service discovery and wiring for Docker
 
Building a smarter application Stack by Tomas Doran from Yelp
Building a smarter application Stack by Tomas Doran from YelpBuilding a smarter application Stack by Tomas Doran from Yelp
Building a smarter application Stack by Tomas Doran from Yelp
 
Building a Smarter Application Stack
Building a Smarter Application StackBuilding a Smarter Application Stack
Building a Smarter Application Stack
 
Object-oriented design principles
Object-oriented design principlesObject-oriented design principles
Object-oriented design principles
 
Building on quicksand microservices indicthreads
Building on quicksand microservices  indicthreadsBuilding on quicksand microservices  indicthreads
Building on quicksand microservices indicthreads
 
Fault tolerant presentation
Fault tolerant presentationFault tolerant presentation
Fault tolerant presentation
 
Designing Fault Tolerant Microservices
Designing Fault Tolerant MicroservicesDesigning Fault Tolerant Microservices
Designing Fault Tolerant Microservices
 
Fault Tolerance in Distributed Environment
Fault Tolerance in Distributed EnvironmentFault Tolerance in Distributed Environment
Fault Tolerance in Distributed Environment
 
Parallel programming in .NET
Parallel programming in .NETParallel programming in .NET
Parallel programming in .NET
 
Scaling Your Architecture for the Long Term
Scaling Your Architecture for the Long TermScaling Your Architecture for the Long Term
Scaling Your Architecture for the Long Term
 
Design for Scale / Surge 2010
Design for Scale / Surge 2010Design for Scale / Surge 2010
Design for Scale / Surge 2010
 
Patterns of Distributed Application Design
Patterns of Distributed Application DesignPatterns of Distributed Application Design
Patterns of Distributed Application Design
 
MongoDB World 2018: Tutorial - MongoDB Meets Chaos Monkey
MongoDB World 2018: Tutorial - MongoDB Meets Chaos MonkeyMongoDB World 2018: Tutorial - MongoDB Meets Chaos Monkey
MongoDB World 2018: Tutorial - MongoDB Meets Chaos Monkey
 
Tiger oracle
Tiger oracleTiger oracle
Tiger oracle
 

Mehr von mircodotta

Scala Past, Present & Future
Scala Past, Present & FutureScala Past, Present & Future
Scala Past, Present & Futuremircodotta
 
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)mircodotta
 
Lightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just RightLightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just Rightmircodotta
 
Akka streams scala italy2015
Akka streams scala italy2015Akka streams scala italy2015
Akka streams scala italy2015mircodotta
 
Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)mircodotta
 
Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)mircodotta
 
Scala: Simplifying Development
Scala: Simplifying DevelopmentScala: Simplifying Development
Scala: Simplifying Developmentmircodotta
 
Managing Binary Compatibility in Scala (Scala Lift Off 2011)
Managing Binary Compatibility in Scala (Scala Lift Off 2011)Managing Binary Compatibility in Scala (Scala Lift Off 2011)
Managing Binary Compatibility in Scala (Scala Lift Off 2011)mircodotta
 
Managing Binary Compatibility in Scala (Scala Days 2011)
Managing Binary Compatibility in Scala (Scala Days 2011)Managing Binary Compatibility in Scala (Scala Days 2011)
Managing Binary Compatibility in Scala (Scala Days 2011)mircodotta
 

Mehr von mircodotta (10)

Scala Past, Present & Future
Scala Past, Present & FutureScala Past, Present & Future
Scala Past, Present & Future
 
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
Lightbend Lagom: Microservices Just Right (Scala Days 2016 Berlin)
 
Lightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just RightLightbend Lagom: Microservices Just Right
Lightbend Lagom: Microservices Just Right
 
Akka streams scala italy2015
Akka streams scala italy2015Akka streams scala italy2015
Akka streams scala italy2015
 
Akka streams
Akka streamsAkka streams
Akka streams
 
Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)Effective Scala (JavaDay Riga 2013)
Effective Scala (JavaDay Riga 2013)
 
Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)Effective Scala (SoftShake 2013)
Effective Scala (SoftShake 2013)
 
Scala: Simplifying Development
Scala: Simplifying DevelopmentScala: Simplifying Development
Scala: Simplifying Development
 
Managing Binary Compatibility in Scala (Scala Lift Off 2011)
Managing Binary Compatibility in Scala (Scala Lift Off 2011)Managing Binary Compatibility in Scala (Scala Lift Off 2011)
Managing Binary Compatibility in Scala (Scala Lift Off 2011)
 
Managing Binary Compatibility in Scala (Scala Days 2011)
Managing Binary Compatibility in Scala (Scala Days 2011)Managing Binary Compatibility in Scala (Scala Days 2011)
Managing Binary Compatibility in Scala (Scala Days 2011)
 

Kürzlich hochgeladen

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 

Kürzlich hochgeladen (20)

A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 

Go Reactive Systems Event-Driven Scalable Resilient Responsive

  • 1. Go Reactive Event-Driven, Scalable, Resilient & Responsive Systems Mirco Dotta @mircodotta
  • 2. The Four Reactive Traits Reactive Applications 2 http://reactivemanifesto.org/
  • 5. browser frontend server internal service storage internal service DB external service
  • 6. Responsiveness ! always available interactive (near) real-time
  • 8. Bounded Latency • fan-out in parallel and aggregate 6
  • 9. Bounded Latency • fan-out in parallel and aggregate 6 A B C
  • 10. Bounded Latency • fan-out in parallel and aggregate 6 A B C
  • 11. Bounded Latency • fan-out in parallel and aggregate 6 A B C e
  • 12. Bounded Latency • fan-out in parallel and aggregate • use circuit breakers for graceful degradation 7
  • 13. Bounded Latency • fan-out in parallel and aggregate • use circuit breakers for graceful degradation 7 do work fail fast
  • 14. Bounded Latency • fan-out in parallel and aggregate • use circuit breakers for graceful degradation • use bounded queues, measure flow rates 8
  • 15. Bounded Latency • fan-out in parallel and aggregate • use circuit breakers for graceful degradation • use bounded queues, measure flow rates 8 Use Bounded Queues: ! Latency = QueueLength • ProcessingTime ! (for reasonably stable average processing time)
  • 16. Bounded Latency • fan-out in parallel and aggregate • use circuit breakers for graceful degradation • use bounded queues, measure flow rates 8 Use Bounded Queues: ! Latency = QueueLength • ProcessingTime ! (for reasonably stable average processing time) m
  • 17. Resilience ! Responsive in the Face of Failure
  • 18. Handle Failure • software will fail • hardware will fail • humans will fail • system still needs to respond ➟ resilience 10
  • 20. Asynchronous Failure • parallel fan-out & distribution ➟ asynchronous execution • compartmentalization & isolation • no response? ➟ timeout events • someone else’s exception? ➟ supervision 12
  • 21. Asynchronous Failure • parallel fan-out & distribution ➟ asynchronous execution • compartmentalization & isolation • no response? ➟ timeout events • someone else’s exception? ➟ supervision 12
  • 22. Asynchronous Failure • parallel fan-out & distribution ➟ asynchronous execution • compartmentalization & isolation • no response? ➟ timeout events • someone else’s exception? ➟ supervision 12 Request Response Failure
  • 23. Asynchronous Failure • parallel fan-out & distribution ➟ asynchronous execution driven message-• compartmentalization & isolation • no response? ➟ timeout events • someone else’s exception? ➟ supervision 12 Request Response Failure
  • 24. Asynchronous Failure • parallel fan-out & distribution ➟ asynchronous execution • compartmentalization & isolation • no response? ➟ timeout events • someone else’s exception? ➟ supervision • location transparency ➟ seamless resilience 12
  • 25. Elasticity ! Responsive in the Face of Changing Load
  • 28. Handle Load • partition incoming work for distribution • share nothing • scale capacity up and down on demand • supervise and adapt • location transparency ➟ seamless scalability 14
  • 29. Handle Load • partition incoming work for distribution • share nothing • scale capacity up and down on demand • supervise and adapt • location transparency ➟ seamless scalability 14 m
  • 30. … this has some interesting consequences!
  • 31. Consequences • distribution & scalability ➟ loss of strong consistency • CAP theorem? — not as relevant as you think • eventual consistency ➟ gossip, heartbeats, dissemination of change ! 16
  • 32. Consequences • distribution & scalability ➟ loss of strong consistency • CAP theorem? — not as relevant as you think • eventual consistency ➟ gossip, heartbeats, dissemination of change ! 16 m
  • 33. Corollary • Reactive needs to be applied all the way down 17
  • 34. But what about us, the developers?
  • 35. Step 1: Take a Leap of Faith • thread-based models have made us defensive • “don’t let go of your thread!” • “asynchrony is suspicious” • “better return strict value, even if that needs blocking” 19
  • 36. Step 1: Take a Leap of Faith • thread-based models have made us defensive • “don’t let go of your thread!” • “asynchrony is suspicious” • “better return strict value, even if that needs blocking” • it is okay to write a method that returns a Future! 19
  • 37. Step 2: Rethink the Architecture • break out of the synchronous blocking prison • focus on communication & protocols • asynchronous program flow ➟ no step-through debugging ➟ tracing and monitoring • loose coupling 20
  • 38. Step 3: Profit! • clean business logic, separate from failure handling • distributable units of work • effortless parallelization 21
  • 39. Step 3: Profit! • clean business logic, separate from failure handling • distributable units of work • effortless parallelization • less assumptions ➟ lower maintenance cost 21
  • 41. The Four Reactive Traits Reactive Applications 23 http://reactivemanifesto.org/
  • 42. All credit for this great slidedeck goes to Roland Kuhn (@rolandkuhn), while any inaccuracy is mine. ©Typesafe 2014 – All Rights Reserved