SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
Boston Reactive
Software Meetup
Introduction to Reactive
Presented by
!

Steven Pember

Principal Consultant , Technical Architect at Cantina

David Fox

Principal Consultant , Technical Architect at Cantina

!2
What is Reactive?

!3
What is Reactive?
A buzzword

!4
What is Reactive?
A popular (comp) science buzzword

!5
The Reactive Manifesto
Written by Jonas Bonér with
contributions by Erik Meijer,
Martin Odersky, Greg Young,
Martin Thompson, Roland Kuhn,
James Ward and Guillaume Bort.

!6
tl;dr

1. WAY more traffic than just a few years ago
2. Users expect immediate response
3. Need 100% uptime
4. Large amounts of data
5. Need better models of concurrency
6. Old models like servlet showing their age

!7
The Four Traits
These are the traits they use to
describe this class of software.

!8
The Four Traits
Note how they play off one
another to form a cohesive whole

!9
changeable

The Missing Traits
There should really be a couple
more traits…

!10
changeable

The Missing Traits
There should really be a couple
more traits…

managable

!11
Reactive Technologies
not just from Typesafe!

!12
These are all “Reactive” technologies

!13
These are all “Reactive” technologies
Reactive isn’t about particular technologies,
it’s a holistic view of application architecture to support
the needs of the current generation of applications

!14
As developers, we need to see the whole picture
of the application, from the front-end to the back-end. It’s
not enough to just use a “reactive framework”.

!15
Spray Framework
HTTP for Akka Actors

!16
Akka

•

De-facto Actor implementation for Scala

•

Replaced Scala’s actor implementation

•

Team wanted to keep Scala smaller

•

Better as a separate framework

•

Used as basis of Play and Spray and many
other frameworks

!17
Actor
Model

•

Invented in 1973 by Carl Hewitt, Peter
Bishop, and Richard Steiger at MIT's AI lab

•

A design pattern for concurrency

•

Encapsulates state and behavior

•

Alleviates the need for locks

•

Allows work to be scheduled fairly

!18
How do actors work?

!19
Actor Receives Message
Message is placed into the
actor’s mailbox

!20
Actor Scheduled
The actor system’s scheduler
schedules the actor to run in a
thread.
!

The actor processes a message
according to its behavior

!21
Execution Complete
The actor state is modified.
!

The scheduler will continue to
fairly schedule the actor to run
while its mailbox has messages.

!22
Akka’s actors also have supervision
strategies for failure

!23
Supervision

•

By default, when an actor crashes, it will
simply be restarted by the system
!

•

Other strategies can be employed such as:
• Resume keeping state
• Resume clearing state
• Terminate the actor permanently
• Escalate, failing the supervising actor

!24
Other
Features

•
•
•
•

Finite state machine mixin
Typed actor proxy for integration with nonactor-based code
Location transparency / clustering
Support for event/command sourcing

!25
What Are the Drawbacks?
•
•
•

Programming with actors is more difficult
Type safety is lost
Not as easy to compose

!26
Promises
&
Futures

•

Synchronization constructs/patterns

•

Allow use of values which will be eventually
available at a later point in time

•

Terms sometimes used interchangeably

•

A promise is a container to write a value to

•

A future is a handle used to read that value

!27
Spray Framework
Live coding demo

!28
Cantina is a digital agency that plans, 

designs and builds connected experiences 

and product innovations.

!29

Weitere ähnliche Inhalte

Andere mochten auch

Health, powerpoint janissa jackosn merritt 4th
Health, powerpoint janissa jackosn merritt 4thHealth, powerpoint janissa jackosn merritt 4th
Health, powerpoint janissa jackosn merritt 4th
Eden Grove Academy
 

Andere mochten auch (10)

Introduction to Reactive
Introduction to ReactiveIntroduction to Reactive
Introduction to Reactive
 
Bridging the gap
Bridging the gap Bridging the gap
Bridging the gap
 
компас
компаскомпас
компас
 
La magia dello scanner
La magia dello scannerLa magia dello scanner
La magia dello scanner
 
Health, powerpoint janissa jackosn merritt 4th
Health, powerpoint janissa jackosn merritt 4thHealth, powerpoint janissa jackosn merritt 4th
Health, powerpoint janissa jackosn merritt 4th
 
Storia1 il principe, la principessa e il drago cattivo
Storia1 il principe, la principessa e il drago cattivoStoria1 il principe, la principessa e il drago cattivo
Storia1 il principe, la principessa e il drago cattivo
 
романтизъм
романтизъмромантизъм
романтизъм
 
Continuità
ContinuitàContinuità
Continuità
 
Cantina Web Content Management (WCM) Webinar
Cantina Web Content Management (WCM) WebinarCantina Web Content Management (WCM) Webinar
Cantina Web Content Management (WCM) Webinar
 
Sustainable Agriculture as Solution to Global Challenges
Sustainable Agriculture as Solution to Global ChallengesSustainable Agriculture as Solution to Global Challenges
Sustainable Agriculture as Solution to Global Challenges
 

Ähnlich wie Introduction to Reactive

VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012
Eonblast
 
Software Carpentry for the Geophysical Sciences
Software Carpentry for the Geophysical SciencesSoftware Carpentry for the Geophysical Sciences
Software Carpentry for the Geophysical Sciences
Aron Ahmadia
 
Software Carpentry and the Hydrological Sciences @ AGU 2013
Software Carpentry and the Hydrological Sciences @ AGU 2013Software Carpentry and the Hydrological Sciences @ AGU 2013
Software Carpentry and the Hydrological Sciences @ AGU 2013
Aron Ahmadia
 
YOOX Launch & Learn - Javascript as a programming language
 YOOX Launch & Learn - Javascript as a programming language YOOX Launch & Learn - Javascript as a programming language
YOOX Launch & Learn - Javascript as a programming language
Marco Cedaro
 

Ähnlich wie Introduction to Reactive (20)

Coder sans peur du changement avec la meme pas mal hexagonal architecture
Coder sans peur du changement avec la meme pas mal hexagonal architectureCoder sans peur du changement avec la meme pas mal hexagonal architecture
Coder sans peur du changement avec la meme pas mal hexagonal architecture
 
Extreme Programming (XP): Revisted
Extreme Programming (XP): RevistedExtreme Programming (XP): Revisted
Extreme Programming (XP): Revisted
 
jsDay - Javascript as a programming language
jsDay - Javascript as a programming languagejsDay - Javascript as a programming language
jsDay - Javascript as a programming language
 
VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012
 
PuppetConf 2017: No Server Left Behind - Miguel Di Ciurcio Filho, Instruct
PuppetConf 2017: No Server Left Behind - Miguel Di Ciurcio Filho, InstructPuppetConf 2017: No Server Left Behind - Miguel Di Ciurcio Filho, Instruct
PuppetConf 2017: No Server Left Behind - Miguel Di Ciurcio Filho, Instruct
 
Made for Each Other: Microservices + PaaS
Made for Each Other: Microservices + PaaSMade for Each Other: Microservices + PaaS
Made for Each Other: Microservices + PaaS
 
MongoDB at Scale!
MongoDB at Scale!MongoDB at Scale!
MongoDB at Scale!
 
InfectNet Technical
InfectNet TechnicalInfectNet Technical
InfectNet Technical
 
DevOps 201607
DevOps 201607 DevOps 201607
DevOps 201607
 
Software Carpentry for the Geophysical Sciences
Software Carpentry for the Geophysical SciencesSoftware Carpentry for the Geophysical Sciences
Software Carpentry for the Geophysical Sciences
 
Software Carpentry and the Hydrological Sciences @ AGU 2013
Software Carpentry and the Hydrological Sciences @ AGU 2013Software Carpentry and the Hydrological Sciences @ AGU 2013
Software Carpentry and the Hydrological Sciences @ AGU 2013
 
Test Driven Development - Workshop
Test Driven Development - WorkshopTest Driven Development - Workshop
Test Driven Development - Workshop
 
Stakeholders’ information needs for artifacts and their dependencies in a rea...
Stakeholders’ information needs for artifacts and their dependencies in a rea...Stakeholders’ information needs for artifacts and their dependencies in a rea...
Stakeholders’ information needs for artifacts and their dependencies in a rea...
 
Code refactoring
Code refactoringCode refactoring
Code refactoring
 
Effective development of a finite-element solver at the University
Effective development of a finite-element solver at the UniversityEffective development of a finite-element solver at the University
Effective development of a finite-element solver at the University
 
YOOX Launch & Learn - Javascript as a programming language
 YOOX Launch & Learn - Javascript as a programming language YOOX Launch & Learn - Javascript as a programming language
YOOX Launch & Learn - Javascript as a programming language
 
Implementing Puppet at a South American Government Agency, Challenges and Sol...
Implementing Puppet at a South American Government Agency, Challenges and Sol...Implementing Puppet at a South American Government Agency, Challenges and Sol...
Implementing Puppet at a South American Government Agency, Challenges and Sol...
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes
 
10 Big Ideas from Industry
10 Big Ideas from Industry10 Big Ideas from Industry
10 Big Ideas from Industry
 
Ruby codebases in an entropic universe
Ruby codebases in an entropic universeRuby codebases in an entropic universe
Ruby codebases in an entropic universe
 

Kürzlich hochgeladen

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Kürzlich hochgeladen (20)

Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Introduction to Reactive