SlideShare ist ein Scribd-Unternehmen logo
1 von 72
Downloaden Sie, um offline zu lesen
BUILDING
APPLICATIONS
WITH AKKA.NET
ANTHONY BROWN
@BRUINBROWN93
Hi, i’m Anthony
university student
me@anthonyjbrown.co.uk
@bruinbrown93
moore’s law
now we need
concurrency…
…but concurrency is hard
MULTITHREADING
THEORY
PRACTICE
CHECK OUT
MY MULTITHREADED CODE
HOW MANY THREADS
DOES IT TAKE TO CHANGE A LIGHTBULB?
application requirements
have changed
Credit: http://www.theawl.com/wp-content/uploads/2010/08/Screen-shot-2010-08-17-at-2.11.10-PM.png
Common language to define
new style of architecture
Reactive
systems
RESPONSIVE
RESILIENT ELASTIC
MESSAGE PASSING
responsive
users want the best possible experience
reactive applications react
to the world around them
Message driven
architecture
decouples components
the actor
model
concurrency
model
STORAGE
isolate mutable state
processing
reacting to changes
Communication
messaging as a requirement
an actor is
A mailbox behaviour state
an actor can…
set it’s behaviour
for the next message
an actor can…
send a finite number
of messages
an actor can…
spawn a finite
number of actors
looking at the
original
erlang
99.9999999% uptime
erlang example
introducing the
akka.net way
step 1
define an actor
class	
  GreetingActor	
  :	
  ReceiveActor	
  
{	
  
	
  	
  	
  	
  public	
  GreetingActor()	
  
	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  Receive<string>(	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  s	
  =>	
  Console.WriteLine(“Hello	
  ”	
  +	
  s));	
  
	
  	
  	
  	
  }	
  
}
step 2
create an actor
var	
  system	
  =	
  ActorSystem.Create(“GreeterSystem”);	
  
var	
  greeterActor	
  =	
  system.ActorOf<GreeterActor>();
greeteractor isn’t
something you can call
normally
it’s a reference to an actor
where is my
actual actor?
AKKA.net
root actor
your
actors
Addressable like a file
system or web site
akka://Greetersystem/user/parent/child
step 3
send a message
greeter.Tell(“DDDSW”);
step 4
change behaviour
Visual studio
based demo
resilience in
reactive systems
WE want
applications to
ISOLATE ERRORS
SELF HEAL
your users don’t
want to see THIS
Service aService B
supervisor
Request
Response
user error
error action
scalability in
reactive systems
scale up has a
ceiling
scale out doesn't
and it’s easy
if you share nothing
how do we handle
increased load?
pools of actors
visual studio
based demo
how do we use
akka.net
the internet of
things
what is the Iot?
pointless
A security nightmare
i really don’t want to be facebook
friends with my toaster
managing farms
some things we
saw
actors are cheap
DON’t worry about having too many
Always take back
pressure seriously
LIBRARIES LIKE POLLY HELP
LET IT CRASH
don’t worry about catching all
exceptions
message passing is
harder to debug
use akka.testkit to comprehensively
test
understand message
delivery guarantees
at most once is default
at least once is an option
IN conclusion
akka.net gives us
lots
Auto-scaling
Service discovery
SELF HEALING
CLUSTERING SUPPORT
CQRS
MESSAGE PASSING LOCATION TRANSPARENCY
CONFIGURATION
MAKES IT EASIER TO
build reactive systems
understand the
difficulties
where next?
WANT TO
contribute?
github.com/akkadotnet/akka.net
gitter.im/akkadotnet/akka.net
want some help?
https://petabridge.com
HTTPS://github.com/petabridge/akka-bootcamp
read the book
http://manning.com/brown2
coming later this year
Q&A

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and Akka
Yung-Lin Ho
 
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and SupervisorsElixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Benjamin Tan
 

Was ist angesagt? (20)

Discovering the Service Fabric's actor model
Discovering the Service Fabric's actor modelDiscovering the Service Fabric's actor model
Discovering the Service Fabric's actor model
 
Akka framework
Akka frameworkAkka framework
Akka framework
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and Akka
 
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and SupervisorsElixir – Peeking into Elixir's Processes, OTP and Supervisors
Elixir – Peeking into Elixir's Processes, OTP and Supervisors
 
How Elixir helped us scale our Video User Profile Service for the Olympics
How Elixir helped us scale our Video User Profile Service for the OlympicsHow Elixir helped us scale our Video User Profile Service for the Olympics
How Elixir helped us scale our Video User Profile Service for the Olympics
 
Workflow as code with Azure Durable Functions
Workflow as code with Azure Durable FunctionsWorkflow as code with Azure Durable Functions
Workflow as code with Azure Durable Functions
 
Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!
 
Stateful patterns in Azure Functions
Stateful patterns in Azure FunctionsStateful patterns in Azure Functions
Stateful patterns in Azure Functions
 
The quest for global design principles - PHP Benelux 2016
The quest for global design principles - PHP Benelux 2016The quest for global design principles - PHP Benelux 2016
The quest for global design principles - PHP Benelux 2016
 
Actor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder MeetupActor Patterns and NATS - Boulder Meetup
Actor Patterns and NATS - Boulder Meetup
 
Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!Empower every Azure Function to achieve more!!
Empower every Azure Function to achieve more!!
 
MongoDB .local Houston 2019: REST-less Mobile Apps: Why Offline-first and Syn...
MongoDB .local Houston 2019: REST-less Mobile Apps: Why Offline-first and Syn...MongoDB .local Houston 2019: REST-less Mobile Apps: Why Offline-first and Syn...
MongoDB .local Houston 2019: REST-less Mobile Apps: Why Offline-first and Syn...
 
Azure reactive systems
Azure reactive systemsAzure reactive systems
Azure reactive systems
 
Build Your Own Real-Time Web Service with Elixir Phoenix
Build Your Own Real-Time Web Service with Elixir PhoenixBuild Your Own Real-Time Web Service with Elixir Phoenix
Build Your Own Real-Time Web Service with Elixir Phoenix
 
Grails with swagger
Grails with swaggerGrails with swagger
Grails with swagger
 
IoT in salsa Serverless
IoT in salsa ServerlessIoT in salsa Serverless
IoT in salsa Serverless
 
Troubleshooting EC2- Linux Server Configuration
Troubleshooting EC2- Linux Server ConfigurationTroubleshooting EC2- Linux Server Configuration
Troubleshooting EC2- Linux Server Configuration
 
IoT in salsa serverless
IoT in salsa serverlessIoT in salsa serverless
IoT in salsa serverless
 
Durable Functions vs Logic App : la guerra dei workflow!!
Durable Functions vs Logic App : la guerra dei workflow!!Durable Functions vs Logic App : la guerra dei workflow!!
Durable Functions vs Logic App : la guerra dei workflow!!
 
Stateful pattern con Azure Functions
Stateful pattern con Azure FunctionsStateful pattern con Azure Functions
Stateful pattern con Azure Functions
 

Ähnlich wie Building applications with akka.net

Test slideshow
Test slideshowTest slideshow
Test slideshow
legacye
 
Test slideshow
Test slideshowTest slideshow
Test slideshow
legacye
 
Test slideshow
Test slideshowTest slideshow
Test slideshow
legacye
 
Test slideshow
Test slideshowTest slideshow
Test slideshow
legacye
 
Douglas - Real JavaScript
Douglas - Real JavaScriptDouglas - Real JavaScript
Douglas - Real JavaScript
d0nn9n
 

Ähnlich wie Building applications with akka.net (20)

Developing Actors in Azure with .net
Developing Actors in Azure with .netDeveloping Actors in Azure with .net
Developing Actors in Azure with .net
 
How do I - Networking and Webservices - Transcript.pdf
How do I - Networking and Webservices - Transcript.pdfHow do I - Networking and Webservices - Transcript.pdf
How do I - Networking and Webservices - Transcript.pdf
 
Test slideshow
Test slideshowTest slideshow
Test slideshow
 
Test slideshow
Test slideshowTest slideshow
Test slideshow
 
Test slideshow
Test slideshowTest slideshow
Test slideshow
 
Test slideshow
Test slideshowTest slideshow
Test slideshow
 
Immutable Data and TypeScript in an Ember.js Application
Immutable Data and TypeScript in an Ember.js ApplicationImmutable Data and TypeScript in an Ember.js Application
Immutable Data and TypeScript in an Ember.js Application
 
Evolve Your Code
Evolve Your CodeEvolve Your Code
Evolve Your Code
 
Douglas Crockford - Ajax Security
Douglas Crockford - Ajax SecurityDouglas Crockford - Ajax Security
Douglas Crockford - Ajax Security
 
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
Beyond fault tolerance with actor programming - Fabio Tiriticco - Codemotion ...
 
Beyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor ProgrammingBeyond Fault Tolerance with Actor Programming
Beyond Fault Tolerance with Actor Programming
 
Reactive programming with akka
Reactive programming with akkaReactive programming with akka
Reactive programming with akka
 
Akka.Net & .Net Core - .Net Inside 4° MeetUp
Akka.Net & .Net Core - .Net Inside 4° MeetUpAkka.Net & .Net Core - .Net Inside 4° MeetUp
Akka.Net & .Net Core - .Net Inside 4° MeetUp
 
Douglas - Real JavaScript
Douglas - Real JavaScriptDouglas - Real JavaScript
Douglas - Real JavaScript
 
Magento Developer Talk. Microservice Architecture and Actor Model
Magento Developer Talk. Microservice Architecture and Actor ModelMagento Developer Talk. Microservice Architecture and Actor Model
Magento Developer Talk. Microservice Architecture and Actor Model
 
Distributed Computing
Distributed ComputingDistributed Computing
Distributed Computing
 
JAVA design patterns and Basic OOp concepts
JAVA design patterns and Basic OOp conceptsJAVA design patterns and Basic OOp concepts
JAVA design patterns and Basic OOp concepts
 
I Heard React Was Good
I Heard React Was GoodI Heard React Was Good
I Heard React Was Good
 
Reactive Programming or Reactive Systems? (spoiler: both)
Reactive Programming or Reactive Systems? (spoiler: both)Reactive Programming or Reactive Systems? (spoiler: both)
Reactive Programming or Reactive Systems? (spoiler: both)
 
Design Pattern with Actionscript
Design Pattern with ActionscriptDesign Pattern with Actionscript
Design Pattern with Actionscript
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
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
 
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
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 

Building applications with akka.net