SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Downloaden Sie, um offline zu lesen
Anatomy of a
Reactive Application
Reactive Programming Enthusiasts Denver
Meet-up Kick-Off
Mark Wilson
Demo Application
Intended to Illustrate some concepts of Reactive
Programming, Introduce:

Scala
Akka
Play!
but the demo is mostly about Non-Blocking
Amdahl’s Law
“… Therefore it is important that the entire solution is
asynchronous and non-blocking. ” - Reactive Manifesto
Futures
A Future is an object holding a value which
may become available at some point.
!
•

A Future is either completed or not completed

•

A completed Future is either:
•

successful (value)

•

or failed (exception)

!
!

import scala.concurrent.ExecutionContext.Implicits.global	
import scala.concurrent._	
val fs: Future[String] = Future { “a” + “b” }	
fs.onComplete {	
case Success(x) => println(x)	
case Failure(e) => throw e	
}
The Fish Store
1. Play GET and POST, non-blocking
2. Akka Actors processing a delivery
Start from the start a most simple web page
Actor
From the book “Akka Concurrency”
by Derek Wyatt
Web Tier (Play)
An open source web application framework, written in
Scala and Java, which follows the model–view–
controller architectural pattern.

Stateless: horizontally scalable
Aims to allow concurrency throughout
the application
Fits with REST/ powerful javascript
Akka
Using the Actor Model we raise the abstraction level and
provide a better platform to build correct, concurrent, and
scalable applications. - akka docs

From the
book “Akka
Concurrency”
by Derek
Wyatt
pipeTo
import akka.pattern.pipe	

!
val future: Future[Any] = someFunctionReturningFuture()	
future pipeTo sender // sends to sender as Future[Any]	

!
// is roughly equivalent to	

!
val mysender = sender // final def sender(): ActorRef	
future.onComplete {	
case Success(x) => mysender ! x	
case Failure(e) => mysender ! akka.actor.Status.Failure(e)	
}	

!
// if sender doesn't handle Failure(e) it is logged as unhandled
Akka More..
Configuration
Akka Test Kit
Akka Extensions
Akka Traits { Stash, ActorLogging }
TypedActor
Akka Events { EventBus, EventStream } - Pub/sub behavior
Akka Scheduler - sending a message to an actor on a schedule.
Super vision/Fault Tolerance { Resume, Restart, Stop, Escalate }
Data Flows - special lib for writing futures: flow { “hi” } onComplete println
Pipeline - sequential processing within an actor
Remote Actors - utilizing actors on remote machines (or clustered machines)
“It is better to fail in originality
than to succeed in imitation.”

–Herman Melville
Up Next?
!

March 2014
RPED Chunk-O-Thon One
March 2014

Collective 3 minute presentations
Open participation
Topics span Reactive Applications
Examples:
Working examples / Shared learning exercise
Well formed problem/question for the group
Weird, funny or unexpected behavior
Realtime UI tricks
Other interesting stuff you come up with
Submissions must be available 1 week prior to meeting
There will be prizes!

Weitere ähnliche Inhalte

Was ist angesagt?

stackconf 2020 | Real Continuous Deployment of JVM applications by Nicolas Fr...
stackconf 2020 | Real Continuous Deployment of JVM applications by Nicolas Fr...stackconf 2020 | Real Continuous Deployment of JVM applications by Nicolas Fr...
stackconf 2020 | Real Continuous Deployment of JVM applications by Nicolas Fr...NETWAYS
 
Actor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka FundamentalsActor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka FundamentalsNgoc Dao
 
Async and Await on the Server
Async and Await on the ServerAsync and Await on the Server
Async and Await on the ServerDoug Jones
 
Dynamically Composing Collection Operations through Collection Promises
Dynamically Composing Collection Operations through Collection PromisesDynamically Composing Collection Operations through Collection Promises
Dynamically Composing Collection Operations through Collection PromisesMarcus Denker
 
Reflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond SmalltakReflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond SmalltakMarcus Denker
 
A gentle introduction into AKKA and the actor model
A gentle introduction into AKKA and the actor modelA gentle introduction into AKKA and the actor model
A gentle introduction into AKKA and the actor modelMykhailo Kotsur
 
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of XamarinC# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of XamarinXamarin
 
End to-end async and await
End to-end async and awaitEnd to-end async and await
End to-end async and awaitvfabro
 
Reflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond SmalltakReflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond SmalltakMarcus Denker
 
Asynchronous JavaScript Programming with Callbacks & Promises
Asynchronous JavaScript Programming with Callbacks & PromisesAsynchronous JavaScript Programming with Callbacks & Promises
Asynchronous JavaScript Programming with Callbacks & PromisesHùng Nguyễn Huy
 
Reflection in Pharo5
Reflection in Pharo5Reflection in Pharo5
Reflection in Pharo5Marcus Denker
 
Herding a Cat with Antlers - Catalyst 5.80
Herding a Cat with Antlers - Catalyst 5.80Herding a Cat with Antlers - Catalyst 5.80
Herding a Cat with Antlers - Catalyst 5.80Tomas Doran
 
Async in .NET
Async in .NETAsync in .NET
Async in .NETRTigger
 
DRAKON Visual Language: Tutorial. Part 2
DRAKON Visual Language: Tutorial. Part 2DRAKON Visual Language: Tutorial. Part 2
DRAKON Visual Language: Tutorial. Part 2Stepan Mitkin
 
High Performance Serverless Functions in Scala
High Performance Serverless Functions in ScalaHigh Performance Serverless Functions in Scala
High Performance Serverless Functions in ScalaJason Swartz
 
RxSwift for Beginners - how to avoid a headache of reactive programming
RxSwift for Beginners - how to avoid a headache of reactive programmingRxSwift for Beginners - how to avoid a headache of reactive programming
RxSwift for Beginners - how to avoid a headache of reactive programmingMaciej Kołek
 
Asynchronous handlers in asp.net
Asynchronous handlers in asp.netAsynchronous handlers in asp.net
Asynchronous handlers in asp.netAbhishek Sur
 

Was ist angesagt? (20)

Variables in Pharo5
Variables in Pharo5Variables in Pharo5
Variables in Pharo5
 
stackconf 2020 | Real Continuous Deployment of JVM applications by Nicolas Fr...
stackconf 2020 | Real Continuous Deployment of JVM applications by Nicolas Fr...stackconf 2020 | Real Continuous Deployment of JVM applications by Nicolas Fr...
stackconf 2020 | Real Continuous Deployment of JVM applications by Nicolas Fr...
 
Actor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka FundamentalsActor-based concurrency and Akka Fundamentals
Actor-based concurrency and Akka Fundamentals
 
Async and Await on the Server
Async and Await on the ServerAsync and Await on the Server
Async and Await on the Server
 
Dynamically Composing Collection Operations through Collection Promises
Dynamically Composing Collection Operations through Collection PromisesDynamically Composing Collection Operations through Collection Promises
Dynamically Composing Collection Operations through Collection Promises
 
Reflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond SmalltakReflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond Smalltak
 
A gentle introduction into AKKA and the actor model
A gentle introduction into AKKA and the actor modelA gentle introduction into AKKA and the actor model
A gentle introduction into AKKA and the actor model
 
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of XamarinC# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
 
End to-end async and await
End to-end async and awaitEnd to-end async and await
End to-end async and await
 
Reflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond SmalltakReflection in Pharo: Beyond Smalltak
Reflection in Pharo: Beyond Smalltak
 
Intro to javascript (4 week)
Intro to javascript (4 week)Intro to javascript (4 week)
Intro to javascript (4 week)
 
Asynchronous JavaScript Programming with Callbacks & Promises
Asynchronous JavaScript Programming with Callbacks & PromisesAsynchronous JavaScript Programming with Callbacks & Promises
Asynchronous JavaScript Programming with Callbacks & Promises
 
Reflection in Pharo5
Reflection in Pharo5Reflection in Pharo5
Reflection in Pharo5
 
Herding a Cat with Antlers - Catalyst 5.80
Herding a Cat with Antlers - Catalyst 5.80Herding a Cat with Antlers - Catalyst 5.80
Herding a Cat with Antlers - Catalyst 5.80
 
Going Serverless
Going ServerlessGoing Serverless
Going Serverless
 
Async in .NET
Async in .NETAsync in .NET
Async in .NET
 
DRAKON Visual Language: Tutorial. Part 2
DRAKON Visual Language: Tutorial. Part 2DRAKON Visual Language: Tutorial. Part 2
DRAKON Visual Language: Tutorial. Part 2
 
High Performance Serverless Functions in Scala
High Performance Serverless Functions in ScalaHigh Performance Serverless Functions in Scala
High Performance Serverless Functions in Scala
 
RxSwift for Beginners - how to avoid a headache of reactive programming
RxSwift for Beginners - how to avoid a headache of reactive programmingRxSwift for Beginners - how to avoid a headache of reactive programming
RxSwift for Beginners - how to avoid a headache of reactive programming
 
Asynchronous handlers in asp.net
Asynchronous handlers in asp.netAsynchronous handlers in asp.net
Asynchronous handlers in asp.net
 

Andere mochten auch

Build your reactive web application with Vert.x
Build your reactive web application with Vert.xBuild your reactive web application with Vert.x
Build your reactive web application with Vert.xCodemotion
 
Flash Platform Ovierview
Flash Platform OvierviewFlash Platform Ovierview
Flash Platform Ovierviewluca mezzalira
 
Evolution of front end architectures
Evolution of front end architecturesEvolution of front end architectures
Evolution of front end architecturesluca mezzalira
 
Data Science as a Commodity: Use MADlib, R, & other OSS Tools for Data Scienc...
Data Science as a Commodity: Use MADlib, R, & other OSS Tools for Data Scienc...Data Science as a Commodity: Use MADlib, R, & other OSS Tools for Data Scienc...
Data Science as a Commodity: Use MADlib, R, & other OSS Tools for Data Scienc...Sarah Aerni
 
Cycle.js a reactive framework
Cycle.js  a reactive frameworkCycle.js  a reactive framework
Cycle.js a reactive frameworkluca mezzalira
 
Next generation of frontend architectures
Next generation of frontend architecturesNext generation of frontend architectures
Next generation of frontend architecturesluca mezzalira
 

Andere mochten auch (6)

Build your reactive web application with Vert.x
Build your reactive web application with Vert.xBuild your reactive web application with Vert.x
Build your reactive web application with Vert.x
 
Flash Platform Ovierview
Flash Platform OvierviewFlash Platform Ovierview
Flash Platform Ovierview
 
Evolution of front end architectures
Evolution of front end architecturesEvolution of front end architectures
Evolution of front end architectures
 
Data Science as a Commodity: Use MADlib, R, & other OSS Tools for Data Scienc...
Data Science as a Commodity: Use MADlib, R, & other OSS Tools for Data Scienc...Data Science as a Commodity: Use MADlib, R, & other OSS Tools for Data Scienc...
Data Science as a Commodity: Use MADlib, R, & other OSS Tools for Data Scienc...
 
Cycle.js a reactive framework
Cycle.js  a reactive frameworkCycle.js  a reactive framework
Cycle.js a reactive framework
 
Next generation of frontend architectures
Next generation of frontend architecturesNext generation of frontend architectures
Next generation of frontend architectures
 

Ähnlich wie Anatomy of a Reactive Application

Akka Futures and Akka Remoting
Akka Futures  and Akka RemotingAkka Futures  and Akka Remoting
Akka Futures and Akka RemotingKnoldus Inc.
 
Building Stateful Microservices With Akka
Building Stateful Microservices With AkkaBuilding Stateful Microservices With Akka
Building Stateful Microservices With AkkaYaroslav Tkachenko
 
Back to the futures, actors and pipes: using Akka for large-scale data migration
Back to the futures, actors and pipes: using Akka for large-scale data migrationBack to the futures, actors and pipes: using Akka for large-scale data migration
Back to the futures, actors and pipes: using Akka for large-scale data migrationManuel Bernhardt
 
Akka lsug skills matter
Akka lsug skills matterAkka lsug skills matter
Akka lsug skills matterSkills Matter
 
Scaling Web Apps with Akka
Scaling Web Apps with AkkaScaling Web Apps with Akka
Scaling Web Apps with AkkaMaciej Matyjas
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterKonstantin Tsykulenko
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_groupSkills Matter
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisRuslan Shevchenko
 
Concurrency on the JVM
Concurrency on the JVMConcurrency on the JVM
Concurrency on the JVMVaclav Pech
 
Asynchronous development in JavaScript
Asynchronous development  in JavaScriptAsynchronous development  in JavaScript
Asynchronous development in JavaScriptAmitai Barnea
 
Networks and Types - the Future of Akka @ ScalaDays NYC 2018
Networks and Types - the Future of Akka @ ScalaDays NYC 2018Networks and Types - the Future of Akka @ ScalaDays NYC 2018
Networks and Types - the Future of Akka @ ScalaDays NYC 2018Konrad Malawski
 
From Elixir to Akka (and back) - ElixirConf Mx 2017
From Elixir to Akka (and back) - ElixirConf Mx 2017From Elixir to Akka (and back) - ElixirConf Mx 2017
From Elixir to Akka (and back) - ElixirConf Mx 2017Agustin Ramos
 
Building Massively Scalable application with Akka 2.0
Building Massively Scalable application with Akka 2.0Building Massively Scalable application with Akka 2.0
Building Massively Scalable application with Akka 2.0Knoldus Inc.
 
Scala Future & Promises
Scala Future & PromisesScala Future & Promises
Scala Future & PromisesKnoldus Inc.
 
Advanced akka features
Advanced akka featuresAdvanced akka features
Advanced akka featuresGrzegorz Duda
 

Ähnlich wie Anatomy of a Reactive Application (20)

Akka introtalk HyScala DEC 2016
Akka introtalk HyScala DEC 2016Akka introtalk HyScala DEC 2016
Akka introtalk HyScala DEC 2016
 
Akka Futures and Akka Remoting
Akka Futures  and Akka RemotingAkka Futures  and Akka Remoting
Akka Futures and Akka Remoting
 
Building Stateful Microservices With Akka
Building Stateful Microservices With AkkaBuilding Stateful Microservices With Akka
Building Stateful Microservices With Akka
 
Back to the futures, actors and pipes: using Akka for large-scale data migration
Back to the futures, actors and pipes: using Akka for large-scale data migrationBack to the futures, actors and pipes: using Akka for large-scale data migration
Back to the futures, actors and pipes: using Akka for large-scale data migration
 
Akka lsug skills matter
Akka lsug skills matterAkka lsug skills matter
Akka lsug skills matter
 
Scaling Web Apps with Akka
Scaling Web Apps with AkkaScaling Web Apps with Akka
Scaling Web Apps with Akka
 
Developing distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka ClusterDeveloping distributed applications with Akka and Akka Cluster
Developing distributed applications with Akka and Akka Cluster
 
Akka london scala_user_group
Akka london scala_user_groupAkka london scala_user_group
Akka london scala_user_group
 
Why scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with thisWhy scala is not my ideal language and what I can do with this
Why scala is not my ideal language and what I can do with this
 
Concurrency on the JVM
Concurrency on the JVMConcurrency on the JVM
Concurrency on the JVM
 
Actor Model Akka Framework
Actor Model Akka FrameworkActor Model Akka Framework
Actor Model Akka Framework
 
Basics of Akka
Basics of AkkaBasics of Akka
Basics of Akka
 
Asynchronous development in JavaScript
Asynchronous development  in JavaScriptAsynchronous development  in JavaScript
Asynchronous development in JavaScript
 
Akka (BeJUG)
Akka (BeJUG)Akka (BeJUG)
Akka (BeJUG)
 
Networks and Types - the Future of Akka @ ScalaDays NYC 2018
Networks and Types - the Future of Akka @ ScalaDays NYC 2018Networks and Types - the Future of Akka @ ScalaDays NYC 2018
Networks and Types - the Future of Akka @ ScalaDays NYC 2018
 
Scale up your thinking
Scale up your thinkingScale up your thinking
Scale up your thinking
 
From Elixir to Akka (and back) - ElixirConf Mx 2017
From Elixir to Akka (and back) - ElixirConf Mx 2017From Elixir to Akka (and back) - ElixirConf Mx 2017
From Elixir to Akka (and back) - ElixirConf Mx 2017
 
Building Massively Scalable application with Akka 2.0
Building Massively Scalable application with Akka 2.0Building Massively Scalable application with Akka 2.0
Building Massively Scalable application with Akka 2.0
 
Scala Future & Promises
Scala Future & PromisesScala Future & Promises
Scala Future & Promises
 
Advanced akka features
Advanced akka featuresAdvanced akka features
Advanced akka features
 

Kürzlich hochgeladen

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Kürzlich hochgeladen (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Anatomy of a Reactive Application

  • 1. Anatomy of a Reactive Application Reactive Programming Enthusiasts Denver Meet-up Kick-Off Mark Wilson
  • 2. Demo Application Intended to Illustrate some concepts of Reactive Programming, Introduce: Scala Akka Play! but the demo is mostly about Non-Blocking
  • 3. Amdahl’s Law “… Therefore it is important that the entire solution is asynchronous and non-blocking. ” - Reactive Manifesto
  • 4. Futures A Future is an object holding a value which may become available at some point. ! • A Future is either completed or not completed • A completed Future is either: • successful (value) • or failed (exception) ! ! import scala.concurrent.ExecutionContext.Implicits.global import scala.concurrent._ val fs: Future[String] = Future { “a” + “b” } fs.onComplete { case Success(x) => println(x) case Failure(e) => throw e }
  • 5. The Fish Store 1. Play GET and POST, non-blocking 2. Akka Actors processing a delivery Start from the start a most simple web page
  • 6. Actor From the book “Akka Concurrency” by Derek Wyatt
  • 7. Web Tier (Play) An open source web application framework, written in Scala and Java, which follows the model–view– controller architectural pattern. Stateless: horizontally scalable Aims to allow concurrency throughout the application Fits with REST/ powerful javascript
  • 8. Akka Using the Actor Model we raise the abstraction level and provide a better platform to build correct, concurrent, and scalable applications. - akka docs From the book “Akka Concurrency” by Derek Wyatt
  • 9. pipeTo import akka.pattern.pipe ! val future: Future[Any] = someFunctionReturningFuture() future pipeTo sender // sends to sender as Future[Any] ! // is roughly equivalent to ! val mysender = sender // final def sender(): ActorRef future.onComplete { case Success(x) => mysender ! x case Failure(e) => mysender ! akka.actor.Status.Failure(e) } ! // if sender doesn't handle Failure(e) it is logged as unhandled
  • 10. Akka More.. Configuration Akka Test Kit Akka Extensions Akka Traits { Stash, ActorLogging } TypedActor Akka Events { EventBus, EventStream } - Pub/sub behavior Akka Scheduler - sending a message to an actor on a schedule. Super vision/Fault Tolerance { Resume, Restart, Stop, Escalate } Data Flows - special lib for writing futures: flow { “hi” } onComplete println Pipeline - sequential processing within an actor Remote Actors - utilizing actors on remote machines (or clustered machines)
  • 11. “It is better to fail in originality than to succeed in imitation.” –Herman Melville
  • 13. RPED Chunk-O-Thon One March 2014 Collective 3 minute presentations Open participation Topics span Reactive Applications Examples: Working examples / Shared learning exercise Well formed problem/question for the group Weird, funny or unexpected behavior Realtime UI tricks Other interesting stuff you come up with Submissions must be available 1 week prior to meeting There will be prizes!