SlideShare a Scribd company logo
1 of 64
Download to read offline
Riccardo Terrell – Prague Lambda Meetup 2015
Actor Model in F#
and Akka.Net
“Although threads seem to be a small step from sequential computation, in fact, they represent a
huge step. They discard the most essential and appealing properties of sequential computation:
understandability, predictability, and determinism. Threads, as a model of computation, are wildly
nondeterministic, and the job of the programmer becomes one of pruning that non-determinism.”
— Edward A. Lee
(The Problem with Threads, Berkeley 2006))
Agenda
Vector Check - What kind of World is out there?
Reactive Manifesto
Actor model - What & Why
F# Agent
Akka.Net in Action
Akka.NET F# API
Code & Code
Goals - Plan of the talk
The free lunch is over,
we are facing new
challenges in today’s
Programming World
Today, applications must
be built with concurrency
in mind
(possibly from the beginning)
Actor is the best a great
concurrent programming
model that solves
problems for Scalling Up
& Out
Hottest technology trends
Cloud Computing
Reactive Application
Real Time Notification
NoSql
Big Data
Scalable
Maintainable & Readable
Reliable & Testable
Composable & Reusable
Concurrent
5
“In today's world, the demand for distributed systems has exploded. As customer
expectations such as an immediate response, no failure, and access anywhere increase,
companies have come to realize that distributed computing is the only viable solution.”
- Reactive Application Development (Manning)
“Modern applications must embrace these changes by incorporating this behavior into
their DNA”.
- Reactive Application Development (Manning)
The World is changed
“In today's world, the demand for distributed systems has exploded. As customer expectations
such as an immediate response, no failure, and access anywhere increase, companies have
come to realize that distributed computing is the only viable solution.”
- Reactive Application Development (Manning)
“Modern applications must embrace these changes by incorporating this behavior into their
DNA”.
- Reactive Application Development (Manning)
We are in a multicore
cloud distributed era
The Problems...
It is hard to build correct highly concurrent systems
It is hard to build truly scalable systems that scale
up and out
It is hard to build resiliant & fault-tolerant systems
that self-heal
Reactive Manifesto
http://www.reactivemanifesto.org
Responsive
Message-Driven
Resilient
Elastic
Reactive Manifesto
http://www.reactivemanifesto.org
Responsive
Message-Driven
Resilient
Elastic
The system responds in a timely manner if at all
possible. Responsiveness is the cornerstone of usability
and utility, but more than that, responsiveness means that
problems may be detected quickly and dealt with
effectively. Responsive systems focus on providing rapid
and consistent response times, establishing reliable
upper bounds so they deliver a consistent quality of
service. This consistent behavior in turn simplifies error
handling, builds end user confidence, and encourages
further interaction.
Reactive Manifesto
http://www.reactivemanifesto.org
Responsive
Message-Driven
Resilient
Elastic
Reactive Systems rely on asynchronous message-
passing to establish a boundary between components
that ensures loose coupling, isolation, location
transparency, and provides the means to delegate
errors as messages. Employing explicit message-passing
enables load management, elasticity, and flow control
by shaping and monitoring the message queues in the
system and applying back-pressure when necessary.
Location transparent messaging as a means of
communication makes it possible for the management of
failure to work with the same constructs and semantics
across a cluster or within a single host. 
Reactive Manifesto
http://www.reactivemanifesto.org
Responsive
Message-Driven
Resilient
Elastic
The system stays responsive in the face of failure. This
applies not only to highly-available, mission critical
systems — any system that is not resilient will be
unresponsive after a failure. Resilience is achieved by
replication, containment, isolation and delegation.
Failures are contained within each component, isolating
components from each other and thereby ensuring that
parts of the system can fail and recover without
compromising the system as a whole. Recovery of each
component is delegated to another (external)
component and high-availability is ensured by
replication where necessary. The client of a component is
not burdened with handling its failures.
Reactive Manifesto
http://www.reactivemanifesto.org
Responsive
Message-Driven
Resilient
Elastic
The system stays responsive under varying workload.
Reactive Systems can react to changes in the input rate
by increasing or decreasing the resources allocated to
service these inputs. This implies designs that have no
contention points or central bottlenecks, resulting in the
ability to shard or replicate components and distribute
inputs among them. Reactive Systems support predictive,
as well as Reactive, scaling algorithms by providing
relevant live performance measures. They achieve
elasticity in a cost-effective way on commodity hardware
and software platforms.
Moore’s law - The Concurrency challenge
200 300 400 500
1000
1800
2530
3200
3600
2200
2930 3000
3200 3330 3330
3150 3200 3150 3150 3150
1 1 1 1 1 1 1 1 1 2 2 4 4
8 8
16 16
32 32
64
0
10
20
30
40
50
60
70
0
500
1000
1500
2000
2500
3000
3500
4000
1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
MHZ, Cores per year
Mhz Cores
Modern computers come with multiple processors, each equipped with
multiple cores, but the single processor is slower than it used to be!
The free lunch is over
There is a problem…
the free lunch is over
q Programs are not doubling in speed
every couple of years for free anymore
q We need to start writing code to take
advantage of many cores
The issue is Shared of Memory
¨  Shared Memory Concurrency
¨  Data Race / Race Condition
¨  Works in sequential single threaded
environment
¨  Not fun in a multi-threaded
environment
¨  Not fun trying to parallelize
¨  Locking, blocking, call-back hell
The new reality : Amdahl’s law
The speed-up of a program using
multiple processors in parallel
computing is limited by the sequential
fraction of the program.
For example if 95% of the program can
be parallelized, the theoretical maximum
speedup using parallel computing would
be 20 times, no matter how many
processors are used
The Solution is Immutability and Isolation
IMMUTABILITY +
ISOLATION =
------------------------------------------------
BEST CONCURRENT MODEL PROGRAMMING
Immutability OR Isolation
What is an Actor?
The Actor model is a model of concurrent computation
using actors which is characterized by dynamic creation
of actors, inclusion of actor addresses in messages, and
interaction only through direct asynchronous message
passing with no restriction on message arrival order.
[Wikipedia]
What is an Actor?
¤  Processing
¤  Storage – State
¤  Communication only by messages
¤  Share Nothing
¤  Message are passed by value
¤  Lightweight object.
¤  Running on it’s own thread.
¤  No shared state.
¤  Messages are kept in mailbox and
processed in order.
¤  Massive scalable and lightening
fast because of the small call
stack.
Carl Hewitt’s Actor Model
”An island of sanity in a sea of concurrency”
”Shared nothing”, ”Black box”
”Location transparent”, ”Distributable by design”
Actor Model Three axioms:
1.  Send messages to other Actors
- One Actor is not Actor -
2.  Create other Actor
3.  Decide how to handle next message
Ericson AXD 301 Switch - 1996
99.9999999
percent
uptime
What problems an Actor can solve?
Distributed System
Asynchronous
High Performance
Akka provides high-level abstractions for concurrency
and parallelism.
Multiple servers are capable of handling requests from
clients in case any one of them is unavailable for any
reason. The code throughout the application must NOT
focus only on the details of sending and receiving remote
messages. The code must be declarative and not full of
details about how an operation is to be done, but
explaining what is to be done.
Akka gives us that ability by making the location of
actors transparent across nodes.
Distributed System
Asynchronous
High Performance
Akka provides an Asynchronous, non-blocking and highly
performant event-driven programming model.
Asynchrony can have benefits both within a single
machine and across a distributed architecture. In a single
node, it is entirely possible to have tremendous
throughput by organizing logic to be synchronous and
pipelined. With asynchronous programming, we are
attempting to solve the problem of not pinning threads of
execution to a particular core, but instead allowing all
threads access in a varying model of fairness.
Asynchronicity provides a way for the hardware to be
able to utilize cores to the fullest by staging work for
execution.
What problems an Actor can solve?
Distributed System
Asynchronous
High Performance
Akka has the ability to handle tremendous loads very
fast while at the same time being fault tolerant. Building
a distributed system that is extremely fast but incapable
of managing failure is virtually useless: failures happen,
particularly in a distributed context (network partitions,
node failures, etc.), and resilient systems are able deal
with them. But no one wants to create a resilient system
without being able to support reasonably fast execution.
Very lightweight event-driven processes
Scalable System - if my system is fast for a single user
but slow when the system is under heavy load
What problems an Actor can solve?
Reactive Manifesto & Actor Model
Responsive
Message-Driven
Resilient
Elastic
Event Driven
Communication by messages
Fault tolerant by Supervision
Clustering and Remoting across multiple machines
F# MailboxProcessor – aka Agent
¨  F# really shines in the area of
distributed computing
¤  Language features such as Async Workflow
and MailboxProcessor (a.k.a. agent) open
the doors for computing that focuses on
message passing concurrency
Asynchronous Workflows
¤  Software is often I/O-bound, it provides notable
performance benefits
n  Connecting to the Database
n  Leveraging web services
n  Working with data on disk
¤  Network and disk speeds increasing slower
¤  Not Easy to predict when the operation will complete (no-
deterministic)
¨  Easy transition from synchronous
¤  Wrap in asynchronous workflow with the async keyword, use let! for async
calls and add return
¤  No need of explicit callback
¤  Easy to debug
¨  Supports loops, recursion, exceptions, cancellation, resource management
¨  Operation complete in the same scope
let	
  getLength	
  url	
  =	
  	
  	
  
	
  	
  let	
  wc	
  =	
  new	
  WebClient()	
  
	
  	
  let	
  	
  data	
  =	
  wc.DownloadString(url)	
  
	
  	
  data.Length	
  	
  	
  
Anatomy of Async Workflows
¨  Easy transition from synchronous
¤  Wrap in asynchronous workflow with the async keyword, use let! for async
calls and add return
¤  No need of explicit callback
¤  Easy to debug
¨  Supports loops, recursion, exceptions, cancellation, resource management
¨  Operation complete in the same scope
let	
  getLength	
  url	
  =	
  async	
  {	
  
	
  	
  let	
  wc	
  =	
  new	
  WebClient()	
  
	
  	
  let	
  	
  data	
  =	
  wc.DownloadString(url)	
  
	
  	
  data.Length	
  }	
  
Anatomy of Async Workflows
¨  Easy transition from synchronous
¤  Wrap in asynchronous workflow with the async keyword, use let! for async
calls and add return
¤  No need of explicit callback
¤  Easy to debug
¨  Supports loops, recursion, exceptions, cancellation, resource management
¨  Operation complete in the same scope
let	
  getLength	
  url	
  =	
  async	
  {	
  
	
  	
  let	
  wc	
  =	
  new	
  WebClient()	
  
	
  	
  let	
  	
  data	
  =	
  wc.DownloadString(url)	
  
	
  	
  return	
  data.Length	
  }	
  
Anatomy of Async Workflows
¨  Easy transition from synchronous
¤  Wrap in asynchronous workflow with the async keyword, use let! for async
calls and add return
¤  No need of explicit callback
¤  Easy to debug
¨  Supports loops, recursion, exceptions, cancellation, resource management
¨  Operation complete in the same scope
let	
  getLength	
  url	
  =	
  async	
  {	
  
	
  	
  let	
  wc	
  =	
  new	
  WebClient()	
  
	
  	
  let!	
  data	
  =	
  wc.AsyncDownloadString(url)	
  
	
  	
  return	
  data.Length	
  }	
  
Anatomy of Async Workflows
Asynchronous Workflows
let	
  openFileAsynchronous	
  :	
  Async<unit>	
  
	
  	
  async	
  {	
  use	
  	
  fs	
  =	
  new	
  	
  FileStream(@"C:Program	
  Files...,	
  …)	
  
	
   	
  	
  	
  	
  	
  	
  let	
  	
  data	
  =	
  Array.create	
  (int	
  fs.Length)	
  0uy	
  
	
   	
  	
  	
  	
  	
  	
  let!	
  	
  bytesRead	
  =	
  fs.AsyncRead(data,	
  0,	
  data.Length)	
  
	
   	
  	
  	
  	
  	
  	
  do	
  	
  printfn	
  "Read	
  Bytes:	
  %i,	
  First	
  bytes	
  were:	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  %i	
  %i	
  %i	
  ..."	
  bytesRead	
  data.[1]	
  data.[2]	
  data.[3]	
  }	
  
¤  Async defines a block of code we would like to run asynchronously
¤  We use let! instead of let
n  let! binds asynchronously, the computation in the async block waits until the let!
completes
n  While it is waiting it does not block
n  No program or OS thread is blocked
F# MailboxProcessor – aka Agent
F# Agent – Few problems
¨  F# agents do not work across process boundaries
¤  only within the same process.
¨  F# agent are not referenced by address but by explicit
instance
¨  No build in durable mailboxes
¨  F# agent doesn’t have any routing and supervision
functionality out of the box
What is Akka.Net
“Akka is a toolkit and runtime for building highly concurrent,
distributed, and resilient message-driven applications on the JVM.”
- Typesafe
Akka.NET is a port of the popular Java/Scala framework Akka
to .NET.
Multi-Threads vs Multi Actors
1 MB per thread (4 Mb in 64 bit) vs 2.7 million Actors per
Gigabyte
VS
How Actors Recover from Failure?
How do you keep your actor system from falling apart when
things go wrong?
The short answer is Supervision (parental supervision)
How can the Supervision resolve the error?
There are two factors that determine how a failure is resolved:
- How the child failed
- Parent's SupervisionStrategy
Supervision
Supervision
Supervision
Supervision
Supervision
Supervision
Supervision
Akka.Net Remoting
q  Distributed by Default Mentality
q  Provides a unified programming model
q  Employees referential or location transparency
q  Local and remote use the same API
q  Distinguished by configuration, allowing a succinct way to code
message-driven applications
Going Scalable!
Location Transparency
What location transparency means is that whenever you send a
message to an actor, you don't need to know where they are within
an actor system, which might span hundreds of computers. You just
have to know that actors' address.
Going Scalabale : Remote Actors
Going Scalabale : Remote Actors
Akka.Net + F# API = Hotswap
Hotswap is the ability to change the behavior of an Actor at runtime
without shutdown the system.
F# uses <@ Code Quotations @> to deploy some behavior to a
remote Actor
Akka.Net Routing
¨  Messages can be sent via a router to efficiently route them to
destination actors, known as its routees. A Router can be used inside
or outside of an actor, and you can manage the routees yourselves
or use a self contained router actor with configuration capabilities.
¨  On the surface routers look like normal actors, but they are actually
implemented differently. Routers are designed to be extremely
efficient at receiving messages and passing them quickly on to
routees.
Akka.Net Routing Strategies
¨  Broadcast router will as the name implies,
broadcast any message to all of its routees
12
12
12
12
Router Routee2
Routee3
Routee1
Akka.Net Routing Strategies
¨  RoundRobin-Pool router uses round-robin to select a connection. For
concurrent calls, round robin is just a best effort.
12
1
2
3
34
4
Router
Routee1
Routee2
Routee3
Akka.Net Routing Strategies
¨  RoundRobin-Group router uses round-robin to select a connection.
For concurrent calls, round robin is just a best effort.
Router
Routee1
Routee2
Routee3
Routee1
Routee2
Routee3
Remote1
Remote2
Router
Router
Typed & Untyped Actor
TypedActors have a static interface, and the invocations of the methods on that
interface is transformed into message sends
UntypedActors can receive any message and defines only one abstract method
TypedActors vs. UntypedActors
Advantage Downside
TypedActors you have a static
contract, and don't need to define
your own messages
TypedActors places some limitations
on what you can do and what you
can’t
F# & Akka.NET
To install Akka.NET Distributed Actor Framework
Install-Package Akka
Install-Package Akka.Remote
F# API support
Install-Package Akka.FSharp
Actor Best Practices
Single Responsibility Principle Keep the actors focused on a single kind of work, and in doing so,
allow yourself to use them flexibly and to compose them
Specific Supervisors Akka only permits one strategy for each supervisor, there is no way
to delineate between actors of one grouping for which OneForOne
is the restart strategy you want, and another grouping for which
AllForOne is the preferred restart strategy.
Keep the Error Kernel Simple build layers of failure handling that isolate failure deep in the tree
so that as few actors as possible are affected by something going
wrong. Never be afraid to introduce layers of actors if it makes
your supervisor hierarchy more clear and explicit.
Prefer the fire and forget when you can – Tell don’t ask
Avoid Premature optimization – Leave routing for last and think Synchronous first
Actor Pros & Cons
Pros Cons
Easier to reason about
Higher abstraction level
Easier to avoid
Race conditions
Deadlocks
Thread Starvation
Live locks
Distributed computing
Actors don’t work well when
The shared of state is needed
to achieve global consensus
(Transaction)
Synchronous behavior is
required
It is not always trivial to break the
problem into smaller problems
Summary
The free lunch is over,
we are facing new
challenges in today’s
Programming World
Today Applications must
be built for concurrency
in mind
(possibly from the begining)
Actor is the best a great
concurrent programming
model that solves
problems for Scalling Up
& Out
Q & A ?
The tools we use have a profound (and devious!) influence on our thinking habits,
and, therefore, on our thinking abilities.
-- Edsger Dijkstra
References
¨  https://reactivemanifetso.com
¨  http://www.gettakka.net
¨  http://petabridge.com
Online resources
¨  www.fsharp.org Information & community
www.tryfsharp.org Interactive F# tutorials
How to reach me
github.com/rikace/AkkaActorModel
meetup.com/DC-fsharp
@DCFsharp @TRikace
rterrell@microsoft.com
How to reach me
github.com/DCFsharp
meetup.com/DC-fsharp/
@DCFsharp
rterrell@microsoft.com

More Related Content

What's hot

Why Actor-Based Systems Are The Best For Microservices
Why Actor-Based Systems Are The Best For MicroservicesWhy Actor-Based Systems Are The Best For Microservices
Why Actor-Based Systems Are The Best For MicroservicesYaroslav Tkachenko
 
Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster OpenCredo
 
Being RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data PersistenceBeing RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data PersistenceDavid Hoerster
 
Stream Collections - Scala Days
Stream Collections - Scala DaysStream Collections - Scala Days
Stream Collections - Scala DaysGreg Silin
 
20160609 nike techtalks reactive applications tools of the trade
20160609 nike techtalks reactive applications   tools of the trade20160609 nike techtalks reactive applications   tools of the trade
20160609 nike techtalks reactive applications tools of the tradeshinolajla
 
Reactive applications with Akka.Net - DDD East Anglia 2015
Reactive applications with Akka.Net - DDD East Anglia 2015Reactive applications with Akka.Net - DDD East Anglia 2015
Reactive applications with Akka.Net - DDD East Anglia 2015Anthony Brown
 
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 2016Matthias Noback
 
From Zero to the Actor Model (With Akka.Net) - CodeMash2017 - Tamir Dresher
From Zero to the Actor Model (With Akka.Net) - CodeMash2017 - Tamir DresherFrom Zero to the Actor Model (With Akka.Net) - CodeMash2017 - Tamir Dresher
From Zero to the Actor Model (With Akka.Net) - CodeMash2017 - Tamir DresherTamir Dresher
 
Akka and Kubernetes: Reactive From Code To Cloud
Akka and Kubernetes: Reactive From Code To CloudAkka and Kubernetes: Reactive From Code To Cloud
Akka and Kubernetes: Reactive From Code To CloudLightbend
 
Handling Data in Mega Scale Systems
Handling Data in Mega Scale SystemsHandling Data in Mega Scale Systems
Handling Data in Mega Scale SystemsDirecti Group
 
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)Matthias Noback
 
Stuff About CQRS
Stuff About CQRSStuff About CQRS
Stuff About CQRSthinkddd
 
Akka Cluster in Production
Akka Cluster in ProductionAkka Cluster in Production
Akka Cluster in Productionbilyushonak
 
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET ActorsFull-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actorspetabridge
 
A year with event sourcing and CQRS
A year with event sourcing and CQRSA year with event sourcing and CQRS
A year with event sourcing and CQRSSteve Pember
 
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and moreTypesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and moreLegacy Typesafe (now Lightbend)
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and AkkaYung-Lin Ho
 
Reactive Java: Promises and Streams with Reakt (JavaOne talk 2016)
Reactive Java: Promises and Streams with Reakt  (JavaOne talk 2016)Reactive Java: Promises and Streams with Reakt  (JavaOne talk 2016)
Reactive Java: Promises and Streams with Reakt (JavaOne talk 2016)Rick Hightower
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the TrenchesYan Cui
 
Introduction to akka actors with java 8
Introduction to akka actors with java 8Introduction to akka actors with java 8
Introduction to akka actors with java 8Johan Andrén
 

What's hot (20)

Why Actor-Based Systems Are The Best For Microservices
Why Actor-Based Systems Are The Best For MicroservicesWhy Actor-Based Systems Are The Best For Microservices
Why Actor-Based Systems Are The Best For Microservices
 
Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster Spring Boot Microservices vs Akka Actor Cluster
Spring Boot Microservices vs Akka Actor Cluster
 
Being RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data PersistenceBeing RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data Persistence
 
Stream Collections - Scala Days
Stream Collections - Scala DaysStream Collections - Scala Days
Stream Collections - Scala Days
 
20160609 nike techtalks reactive applications tools of the trade
20160609 nike techtalks reactive applications   tools of the trade20160609 nike techtalks reactive applications   tools of the trade
20160609 nike techtalks reactive applications tools of the trade
 
Reactive applications with Akka.Net - DDD East Anglia 2015
Reactive applications with Akka.Net - DDD East Anglia 2015Reactive applications with Akka.Net - DDD East Anglia 2015
Reactive applications with Akka.Net - DDD East Anglia 2015
 
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
 
From Zero to the Actor Model (With Akka.Net) - CodeMash2017 - Tamir Dresher
From Zero to the Actor Model (With Akka.Net) - CodeMash2017 - Tamir DresherFrom Zero to the Actor Model (With Akka.Net) - CodeMash2017 - Tamir Dresher
From Zero to the Actor Model (With Akka.Net) - CodeMash2017 - Tamir Dresher
 
Akka and Kubernetes: Reactive From Code To Cloud
Akka and Kubernetes: Reactive From Code To CloudAkka and Kubernetes: Reactive From Code To Cloud
Akka and Kubernetes: Reactive From Code To Cloud
 
Handling Data in Mega Scale Systems
Handling Data in Mega Scale SystemsHandling Data in Mega Scale Systems
Handling Data in Mega Scale Systems
 
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
 
Stuff About CQRS
Stuff About CQRSStuff About CQRS
Stuff About CQRS
 
Akka Cluster in Production
Akka Cluster in ProductionAkka Cluster in Production
Akka Cluster in Production
 
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET ActorsFull-Stack, Message-oriented Programming w/ Akka.NET Actors
Full-Stack, Message-oriented Programming w/ Akka.NET Actors
 
A year with event sourcing and CQRS
A year with event sourcing and CQRSA year with event sourcing and CQRS
A year with event sourcing and CQRS
 
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and moreTypesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and more
 
Introduction to Actor Model and Akka
Introduction to Actor Model and AkkaIntroduction to Actor Model and Akka
Introduction to Actor Model and Akka
 
Reactive Java: Promises and Streams with Reakt (JavaOne talk 2016)
Reactive Java: Promises and Streams with Reakt  (JavaOne talk 2016)Reactive Java: Promises and Streams with Reakt  (JavaOne talk 2016)
Reactive Java: Promises and Streams with Reakt (JavaOne talk 2016)
 
AWS Lambda from the Trenches
AWS Lambda from the TrenchesAWS Lambda from the Trenches
AWS Lambda from the Trenches
 
Introduction to akka actors with java 8
Introduction to akka actors with java 8Introduction to akka actors with java 8
Introduction to akka actors with java 8
 

Viewers also liked

Actor Clustering with Docker Containers and Akka.Net in F#
Actor Clustering with Docker Containers and Akka.Net in F#Actor Clustering with Docker Containers and Akka.Net in F#
Actor Clustering with Docker Containers and Akka.Net in F#Riccardo Terrell
 
Melanie Gonzalez and Manali Joshi
Melanie Gonzalez and  Manali Joshi Melanie Gonzalez and  Manali Joshi
Melanie Gonzalez and Manali Joshi youth_nex
 
Lesson four events during the fitrah
Lesson four   events during the fitrahLesson four   events during the fitrah
Lesson four events during the fitrahEbrahim Ismail
 
Technical dictionary of electricity
Technical dictionary of electricityTechnical dictionary of electricity
Technical dictionary of electricityMarcos Alexander
 
The life of a volleyball player
The life of a volleyball playerThe life of a volleyball player
The life of a volleyball playerrubina1230
 
Best Practices in Managing e-resources
Best Practices in Managing e-resourcesBest Practices in Managing e-resources
Best Practices in Managing e-resourcesslimkm
 
Noni K. Gaylord-Harden, Ph.D. - “Shifting the Narrative on Development in You...
Noni K. Gaylord-Harden, Ph.D. - “Shifting the Narrative on Development in You...Noni K. Gaylord-Harden, Ph.D. - “Shifting the Narrative on Development in You...
Noni K. Gaylord-Harden, Ph.D. - “Shifting the Narrative on Development in You...youth_nex
 
Learning the city powerpointfrom am v3
Learning the city powerpointfrom am v3Learning the city powerpointfrom am v3
Learning the city powerpointfrom am v3youth_nex
 
Lesson 15 - first journey to syria, monk buhaira and the pact of virtous
Lesson 15 -  first journey to syria, monk buhaira and the pact of virtousLesson 15 -  first journey to syria, monk buhaira and the pact of virtous
Lesson 15 - first journey to syria, monk buhaira and the pact of virtousEbrahim Ismail
 
Witch is it? A2 Media Presentation
Witch is it? A2 Media PresentationWitch is it? A2 Media Presentation
Witch is it? A2 Media Presentationhayleigh282
 
The New European PV Legislation: Issues and Challenges
The New European PV Legislation: Issues and ChallengesThe New European PV Legislation: Issues and Challenges
The New European PV Legislation: Issues and ChallengesSara Dunlap
 
Lareau_Slides
Lareau_SlidesLareau_Slides
Lareau_Slidesyouth_nex
 
How Community Colleges Are Using Social Media: 2013 Case Study
How Community Colleges Are Using Social Media: 2013 Case StudyHow Community Colleges Are Using Social Media: 2013 Case Study
How Community Colleges Are Using Social Media: 2013 Case StudyLeigh-Anne Lawrence
 
Using Social Media for Sales Success
Using Social Media for Sales SuccessUsing Social Media for Sales Success
Using Social Media for Sales SuccessLeigh-Anne Lawrence
 
Empirical Experiment on Navigation with Social Tags
Empirical Experiment on Navigation with Social TagsEmpirical Experiment on Navigation with Social Tags
Empirical Experiment on Navigation with Social TagsStefan Schweiger
 
TV VS Internet, Friends or Foes?
TV VS Internet, Friends or Foes?TV VS Internet, Friends or Foes?
TV VS Internet, Friends or Foes?Christophe Rufin
 
Gloria Rockhold MA, M.Ed. - "Relationship-Building" The Corner Stone"
Gloria Rockhold MA, M.Ed. - "Relationship-Building" The Corner Stone"Gloria Rockhold MA, M.Ed. - "Relationship-Building" The Corner Stone"
Gloria Rockhold MA, M.Ed. - "Relationship-Building" The Corner Stone"youth_nex
 

Viewers also liked (20)

Actor Clustering with Docker Containers and Akka.Net in F#
Actor Clustering with Docker Containers and Akka.Net in F#Actor Clustering with Docker Containers and Akka.Net in F#
Actor Clustering with Docker Containers and Akka.Net in F#
 
Melanie Gonzalez and Manali Joshi
Melanie Gonzalez and  Manali Joshi Melanie Gonzalez and  Manali Joshi
Melanie Gonzalez and Manali Joshi
 
Lesson four events during the fitrah
Lesson four   events during the fitrahLesson four   events during the fitrah
Lesson four events during the fitrah
 
Technical dictionary of electricity
Technical dictionary of electricityTechnical dictionary of electricity
Technical dictionary of electricity
 
The life of a volleyball player
The life of a volleyball playerThe life of a volleyball player
The life of a volleyball player
 
Mi familia
Mi familiaMi familia
Mi familia
 
Best Practices in Managing e-resources
Best Practices in Managing e-resourcesBest Practices in Managing e-resources
Best Practices in Managing e-resources
 
Noni K. Gaylord-Harden, Ph.D. - “Shifting the Narrative on Development in You...
Noni K. Gaylord-Harden, Ph.D. - “Shifting the Narrative on Development in You...Noni K. Gaylord-Harden, Ph.D. - “Shifting the Narrative on Development in You...
Noni K. Gaylord-Harden, Ph.D. - “Shifting the Narrative on Development in You...
 
Learning the city powerpointfrom am v3
Learning the city powerpointfrom am v3Learning the city powerpointfrom am v3
Learning the city powerpointfrom am v3
 
Lesson 15 - first journey to syria, monk buhaira and the pact of virtous
Lesson 15 -  first journey to syria, monk buhaira and the pact of virtousLesson 15 -  first journey to syria, monk buhaira and the pact of virtous
Lesson 15 - first journey to syria, monk buhaira and the pact of virtous
 
Witch is it? A2 Media Presentation
Witch is it? A2 Media PresentationWitch is it? A2 Media Presentation
Witch is it? A2 Media Presentation
 
The New European PV Legislation: Issues and Challenges
The New European PV Legislation: Issues and ChallengesThe New European PV Legislation: Issues and Challenges
The New European PV Legislation: Issues and Challenges
 
Lareau_Slides
Lareau_SlidesLareau_Slides
Lareau_Slides
 
How Community Colleges Are Using Social Media: 2013 Case Study
How Community Colleges Are Using Social Media: 2013 Case StudyHow Community Colleges Are Using Social Media: 2013 Case Study
How Community Colleges Are Using Social Media: 2013 Case Study
 
Using Social Media for Sales Success
Using Social Media for Sales SuccessUsing Social Media for Sales Success
Using Social Media for Sales Success
 
Empirical Experiment on Navigation with Social Tags
Empirical Experiment on Navigation with Social TagsEmpirical Experiment on Navigation with Social Tags
Empirical Experiment on Navigation with Social Tags
 
Tahneek lesson 7
Tahneek   lesson 7Tahneek   lesson 7
Tahneek lesson 7
 
TV VS Internet, Friends or Foes?
TV VS Internet, Friends or Foes?TV VS Internet, Friends or Foes?
TV VS Internet, Friends or Foes?
 
Gloria Rockhold MA, M.Ed. - "Relationship-Building" The Corner Stone"
Gloria Rockhold MA, M.Ed. - "Relationship-Building" The Corner Stone"Gloria Rockhold MA, M.Ed. - "Relationship-Building" The Corner Stone"
Gloria Rockhold MA, M.Ed. - "Relationship-Building" The Corner Stone"
 
2012 Outside-In Holiday Infographic
2012 Outside-In Holiday Infographic2012 Outside-In Holiday Infographic
2012 Outside-In Holiday Infographic
 

Similar to Actor model in F# and Akka.NET

Reactive Architecture
Reactive ArchitectureReactive Architecture
Reactive ArchitectureKnoldus Inc.
 
Reactive: Programming -> Systems -> Architecture
Reactive: Programming -> Systems -> ArchitectureReactive: Programming -> Systems -> Architecture
Reactive: Programming -> Systems -> ArchitectureAleksey Izmailov
 
Designing distributed systems
Designing distributed systemsDesigning distributed systems
Designing distributed systemsMalisa Ncube
 
Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained  Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained Markus Eisele
 
Orleans: Cloud Computing for Everyone - SOCC 2011
Orleans: Cloud Computing for Everyone - SOCC 2011Orleans: Cloud Computing for Everyone - SOCC 2011
Orleans: Cloud Computing for Everyone - SOCC 2011Jorgen Thelin
 
A New Way Of Distributed Or Cloud Computing
A New Way Of Distributed Or Cloud ComputingA New Way Of Distributed Or Cloud Computing
A New Way Of Distributed Or Cloud ComputingAshley Lovato
 
Next generation of frontend architectures
Next generation of frontend architecturesNext generation of frontend architectures
Next generation of frontend architecturesluca mezzalira
 
Stateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudStateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudMarkus Eisele
 
Орхан Гасимов: "Reactive Applications in Java with Akka"
Орхан Гасимов: "Reactive Applications in Java with Akka"Орхан Гасимов: "Reactive Applications in Java with Akka"
Орхан Гасимов: "Reactive Applications in Java with Akka"Anna Shymchenko
 
High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017Rick Hightower
 
Building a High-Performance Reactive Microservices Architecture
Building a High-Performance Reactive Microservices ArchitectureBuilding a High-Performance Reactive Microservices Architecture
Building a High-Performance Reactive Microservices ArchitectureCognizant
 
Stephane Lapointe & Alexandre Brisebois: Développer des microservices avec Se...
Stephane Lapointe & Alexandre Brisebois: Développer des microservices avec Se...Stephane Lapointe & Alexandre Brisebois: Développer des microservices avec Se...
Stephane Lapointe & Alexandre Brisebois: Développer des microservices avec Se...MSDEVMTL
 
Event Driven Software Architecture Pattern
Event Driven Software Architecture PatternEvent Driven Software Architecture Pattern
Event Driven Software Architecture Patternjeetendra mandal
 
Gluecon Monitoring Microservices and Containers: A Challenge
Gluecon Monitoring Microservices and Containers: A ChallengeGluecon Monitoring Microservices and Containers: A Challenge
Gluecon Monitoring Microservices and Containers: A ChallengeAdrian Cockcroft
 
Migrating from Java EE to cloud-native Reactive systems
Migrating from Java EE to cloud-native Reactive systemsMigrating from Java EE to cloud-native Reactive systems
Migrating from Java EE to cloud-native Reactive systemsMarkus Eisele
 
Migrating From Java EE To Cloud-Native Reactive Systems
Migrating From Java EE To Cloud-Native Reactive SystemsMigrating From Java EE To Cloud-Native Reactive Systems
Migrating From Java EE To Cloud-Native Reactive SystemsLightbend
 
Embracing Failure - AzureDay Rome
Embracing Failure - AzureDay RomeEmbracing Failure - AzureDay Rome
Embracing Failure - AzureDay RomeAlberto Acerbis
 
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016DevOpsDays Tel Aviv
 
Fundamentals Of Transaction Systems - Part 1: Causality banishes Acausality ...
Fundamentals Of Transaction Systems - Part 1: Causality banishes Acausality ...Fundamentals Of Transaction Systems - Part 1: Causality banishes Acausality ...
Fundamentals Of Transaction Systems - Part 1: Causality banishes Acausality ...Valverde Computing
 

Similar to Actor model in F# and Akka.NET (20)

Reactive Architecture
Reactive ArchitectureReactive Architecture
Reactive Architecture
 
Reactive: Programming -> Systems -> Architecture
Reactive: Programming -> Systems -> ArchitectureReactive: Programming -> Systems -> Architecture
Reactive: Programming -> Systems -> Architecture
 
Designing distributed systems
Designing distributed systemsDesigning distributed systems
Designing distributed systems
 
Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained  Reactive Integrations - Caveats and bumps in the road explained
Reactive Integrations - Caveats and bumps in the road explained
 
Orleans: Cloud Computing for Everyone - SOCC 2011
Orleans: Cloud Computing for Everyone - SOCC 2011Orleans: Cloud Computing for Everyone - SOCC 2011
Orleans: Cloud Computing for Everyone - SOCC 2011
 
A New Way Of Distributed Or Cloud Computing
A New Way Of Distributed Or Cloud ComputingA New Way Of Distributed Or Cloud Computing
A New Way Of Distributed Or Cloud Computing
 
Next generation of frontend architectures
Next generation of frontend architecturesNext generation of frontend architectures
Next generation of frontend architectures
 
Stateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the CloudStateful on Stateless - The Future of Applications in the Cloud
Stateful on Stateless - The Future of Applications in the Cloud
 
Орхан Гасимов: "Reactive Applications in Java with Akka"
Орхан Гасимов: "Reactive Applications in Java with Akka"Орхан Гасимов: "Reactive Applications in Java with Akka"
Орхан Гасимов: "Reactive Applications in Java with Akka"
 
High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017High-speed, Reactive Microservices 2017
High-speed, Reactive Microservices 2017
 
Building a High-Performance Reactive Microservices Architecture
Building a High-Performance Reactive Microservices ArchitectureBuilding a High-Performance Reactive Microservices Architecture
Building a High-Performance Reactive Microservices Architecture
 
Sharing-akka-pub
Sharing-akka-pubSharing-akka-pub
Sharing-akka-pub
 
Stephane Lapointe & Alexandre Brisebois: Développer des microservices avec Se...
Stephane Lapointe & Alexandre Brisebois: Développer des microservices avec Se...Stephane Lapointe & Alexandre Brisebois: Développer des microservices avec Se...
Stephane Lapointe & Alexandre Brisebois: Développer des microservices avec Se...
 
Event Driven Software Architecture Pattern
Event Driven Software Architecture PatternEvent Driven Software Architecture Pattern
Event Driven Software Architecture Pattern
 
Gluecon Monitoring Microservices and Containers: A Challenge
Gluecon Monitoring Microservices and Containers: A ChallengeGluecon Monitoring Microservices and Containers: A Challenge
Gluecon Monitoring Microservices and Containers: A Challenge
 
Migrating from Java EE to cloud-native Reactive systems
Migrating from Java EE to cloud-native Reactive systemsMigrating from Java EE to cloud-native Reactive systems
Migrating from Java EE to cloud-native Reactive systems
 
Migrating From Java EE To Cloud-Native Reactive Systems
Migrating From Java EE To Cloud-Native Reactive SystemsMigrating From Java EE To Cloud-Native Reactive Systems
Migrating From Java EE To Cloud-Native Reactive Systems
 
Embracing Failure - AzureDay Rome
Embracing Failure - AzureDay RomeEmbracing Failure - AzureDay Rome
Embracing Failure - AzureDay Rome
 
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
Event-driven Infrastructure - Mike Place, SaltStack - DevOpsDays Tel Aviv 2016
 
Fundamentals Of Transaction Systems - Part 1: Causality banishes Acausality ...
Fundamentals Of Transaction Systems - Part 1: Causality banishes Acausality ...Fundamentals Of Transaction Systems - Part 1: Causality banishes Acausality ...
Fundamentals Of Transaction Systems - Part 1: Causality banishes Acausality ...
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
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
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

Actor model in F# and Akka.NET

  • 1. Riccardo Terrell – Prague Lambda Meetup 2015 Actor Model in F# and Akka.Net “Although threads seem to be a small step from sequential computation, in fact, they represent a huge step. They discard the most essential and appealing properties of sequential computation: understandability, predictability, and determinism. Threads, as a model of computation, are wildly nondeterministic, and the job of the programmer becomes one of pruning that non-determinism.” — Edward A. Lee (The Problem with Threads, Berkeley 2006))
  • 2. Agenda Vector Check - What kind of World is out there? Reactive Manifesto Actor model - What & Why F# Agent Akka.Net in Action Akka.NET F# API Code & Code
  • 3. Goals - Plan of the talk The free lunch is over, we are facing new challenges in today’s Programming World Today, applications must be built with concurrency in mind (possibly from the beginning) Actor is the best a great concurrent programming model that solves problems for Scalling Up & Out
  • 4. Hottest technology trends Cloud Computing Reactive Application Real Time Notification NoSql Big Data Scalable Maintainable & Readable Reliable & Testable Composable & Reusable Concurrent
  • 5. 5 “In today's world, the demand for distributed systems has exploded. As customer expectations such as an immediate response, no failure, and access anywhere increase, companies have come to realize that distributed computing is the only viable solution.” - Reactive Application Development (Manning) “Modern applications must embrace these changes by incorporating this behavior into their DNA”. - Reactive Application Development (Manning) The World is changed “In today's world, the demand for distributed systems has exploded. As customer expectations such as an immediate response, no failure, and access anywhere increase, companies have come to realize that distributed computing is the only viable solution.” - Reactive Application Development (Manning) “Modern applications must embrace these changes by incorporating this behavior into their DNA”. - Reactive Application Development (Manning) We are in a multicore cloud distributed era
  • 6. The Problems... It is hard to build correct highly concurrent systems It is hard to build truly scalable systems that scale up and out It is hard to build resiliant & fault-tolerant systems that self-heal
  • 8. Reactive Manifesto http://www.reactivemanifesto.org Responsive Message-Driven Resilient Elastic The system responds in a timely manner if at all possible. Responsiveness is the cornerstone of usability and utility, but more than that, responsiveness means that problems may be detected quickly and dealt with effectively. Responsive systems focus on providing rapid and consistent response times, establishing reliable upper bounds so they deliver a consistent quality of service. This consistent behavior in turn simplifies error handling, builds end user confidence, and encourages further interaction.
  • 9. Reactive Manifesto http://www.reactivemanifesto.org Responsive Message-Driven Resilient Elastic Reactive Systems rely on asynchronous message- passing to establish a boundary between components that ensures loose coupling, isolation, location transparency, and provides the means to delegate errors as messages. Employing explicit message-passing enables load management, elasticity, and flow control by shaping and monitoring the message queues in the system and applying back-pressure when necessary. Location transparent messaging as a means of communication makes it possible for the management of failure to work with the same constructs and semantics across a cluster or within a single host. 
  • 10. Reactive Manifesto http://www.reactivemanifesto.org Responsive Message-Driven Resilient Elastic The system stays responsive in the face of failure. This applies not only to highly-available, mission critical systems — any system that is not resilient will be unresponsive after a failure. Resilience is achieved by replication, containment, isolation and delegation. Failures are contained within each component, isolating components from each other and thereby ensuring that parts of the system can fail and recover without compromising the system as a whole. Recovery of each component is delegated to another (external) component and high-availability is ensured by replication where necessary. The client of a component is not burdened with handling its failures.
  • 11. Reactive Manifesto http://www.reactivemanifesto.org Responsive Message-Driven Resilient Elastic The system stays responsive under varying workload. Reactive Systems can react to changes in the input rate by increasing or decreasing the resources allocated to service these inputs. This implies designs that have no contention points or central bottlenecks, resulting in the ability to shard or replicate components and distribute inputs among them. Reactive Systems support predictive, as well as Reactive, scaling algorithms by providing relevant live performance measures. They achieve elasticity in a cost-effective way on commodity hardware and software platforms.
  • 12. Moore’s law - The Concurrency challenge 200 300 400 500 1000 1800 2530 3200 3600 2200 2930 3000 3200 3330 3330 3150 3200 3150 3150 3150 1 1 1 1 1 1 1 1 1 2 2 4 4 8 8 16 16 32 32 64 0 10 20 30 40 50 60 70 0 500 1000 1500 2000 2500 3000 3500 4000 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 MHZ, Cores per year Mhz Cores Modern computers come with multiple processors, each equipped with multiple cores, but the single processor is slower than it used to be!
  • 13. The free lunch is over There is a problem… the free lunch is over q Programs are not doubling in speed every couple of years for free anymore q We need to start writing code to take advantage of many cores
  • 14. The issue is Shared of Memory ¨  Shared Memory Concurrency ¨  Data Race / Race Condition ¨  Works in sequential single threaded environment ¨  Not fun in a multi-threaded environment ¨  Not fun trying to parallelize ¨  Locking, blocking, call-back hell
  • 15. The new reality : Amdahl’s law The speed-up of a program using multiple processors in parallel computing is limited by the sequential fraction of the program. For example if 95% of the program can be parallelized, the theoretical maximum speedup using parallel computing would be 20 times, no matter how many processors are used
  • 16. The Solution is Immutability and Isolation IMMUTABILITY + ISOLATION = ------------------------------------------------ BEST CONCURRENT MODEL PROGRAMMING
  • 18. What is an Actor? The Actor model is a model of concurrent computation using actors which is characterized by dynamic creation of actors, inclusion of actor addresses in messages, and interaction only through direct asynchronous message passing with no restriction on message arrival order. [Wikipedia]
  • 19. What is an Actor? ¤  Processing ¤  Storage – State ¤  Communication only by messages ¤  Share Nothing ¤  Message are passed by value ¤  Lightweight object. ¤  Running on it’s own thread. ¤  No shared state. ¤  Messages are kept in mailbox and processed in order. ¤  Massive scalable and lightening fast because of the small call stack.
  • 20. Carl Hewitt’s Actor Model ”An island of sanity in a sea of concurrency” ”Shared nothing”, ”Black box” ”Location transparent”, ”Distributable by design” Actor Model Three axioms: 1.  Send messages to other Actors - One Actor is not Actor - 2.  Create other Actor 3.  Decide how to handle next message
  • 21. Ericson AXD 301 Switch - 1996 99.9999999 percent uptime
  • 22. What problems an Actor can solve? Distributed System Asynchronous High Performance Akka provides high-level abstractions for concurrency and parallelism. Multiple servers are capable of handling requests from clients in case any one of them is unavailable for any reason. The code throughout the application must NOT focus only on the details of sending and receiving remote messages. The code must be declarative and not full of details about how an operation is to be done, but explaining what is to be done. Akka gives us that ability by making the location of actors transparent across nodes.
  • 23. Distributed System Asynchronous High Performance Akka provides an Asynchronous, non-blocking and highly performant event-driven programming model. Asynchrony can have benefits both within a single machine and across a distributed architecture. In a single node, it is entirely possible to have tremendous throughput by organizing logic to be synchronous and pipelined. With asynchronous programming, we are attempting to solve the problem of not pinning threads of execution to a particular core, but instead allowing all threads access in a varying model of fairness. Asynchronicity provides a way for the hardware to be able to utilize cores to the fullest by staging work for execution. What problems an Actor can solve?
  • 24. Distributed System Asynchronous High Performance Akka has the ability to handle tremendous loads very fast while at the same time being fault tolerant. Building a distributed system that is extremely fast but incapable of managing failure is virtually useless: failures happen, particularly in a distributed context (network partitions, node failures, etc.), and resilient systems are able deal with them. But no one wants to create a resilient system without being able to support reasonably fast execution. Very lightweight event-driven processes Scalable System - if my system is fast for a single user but slow when the system is under heavy load What problems an Actor can solve?
  • 25. Reactive Manifesto & Actor Model Responsive Message-Driven Resilient Elastic Event Driven Communication by messages Fault tolerant by Supervision Clustering and Remoting across multiple machines
  • 26. F# MailboxProcessor – aka Agent ¨  F# really shines in the area of distributed computing ¤  Language features such as Async Workflow and MailboxProcessor (a.k.a. agent) open the doors for computing that focuses on message passing concurrency
  • 27. Asynchronous Workflows ¤  Software is often I/O-bound, it provides notable performance benefits n  Connecting to the Database n  Leveraging web services n  Working with data on disk ¤  Network and disk speeds increasing slower ¤  Not Easy to predict when the operation will complete (no- deterministic)
  • 28. ¨  Easy transition from synchronous ¤  Wrap in asynchronous workflow with the async keyword, use let! for async calls and add return ¤  No need of explicit callback ¤  Easy to debug ¨  Supports loops, recursion, exceptions, cancellation, resource management ¨  Operation complete in the same scope let  getLength  url  =          let  wc  =  new  WebClient()      let    data  =  wc.DownloadString(url)      data.Length       Anatomy of Async Workflows
  • 29. ¨  Easy transition from synchronous ¤  Wrap in asynchronous workflow with the async keyword, use let! for async calls and add return ¤  No need of explicit callback ¤  Easy to debug ¨  Supports loops, recursion, exceptions, cancellation, resource management ¨  Operation complete in the same scope let  getLength  url  =  async  {      let  wc  =  new  WebClient()      let    data  =  wc.DownloadString(url)      data.Length  }   Anatomy of Async Workflows
  • 30. ¨  Easy transition from synchronous ¤  Wrap in asynchronous workflow with the async keyword, use let! for async calls and add return ¤  No need of explicit callback ¤  Easy to debug ¨  Supports loops, recursion, exceptions, cancellation, resource management ¨  Operation complete in the same scope let  getLength  url  =  async  {      let  wc  =  new  WebClient()      let    data  =  wc.DownloadString(url)      return  data.Length  }   Anatomy of Async Workflows
  • 31. ¨  Easy transition from synchronous ¤  Wrap in asynchronous workflow with the async keyword, use let! for async calls and add return ¤  No need of explicit callback ¤  Easy to debug ¨  Supports loops, recursion, exceptions, cancellation, resource management ¨  Operation complete in the same scope let  getLength  url  =  async  {      let  wc  =  new  WebClient()      let!  data  =  wc.AsyncDownloadString(url)      return  data.Length  }   Anatomy of Async Workflows
  • 32. Asynchronous Workflows let  openFileAsynchronous  :  Async<unit>      async  {  use    fs  =  new    FileStream(@"C:Program  Files...,  …)                let    data  =  Array.create  (int  fs.Length)  0uy                let!    bytesRead  =  fs.AsyncRead(data,  0,  data.Length)                do    printfn  "Read  Bytes:  %i,  First  bytes  were:                        %i  %i  %i  ..."  bytesRead  data.[1]  data.[2]  data.[3]  }   ¤  Async defines a block of code we would like to run asynchronously ¤  We use let! instead of let n  let! binds asynchronously, the computation in the async block waits until the let! completes n  While it is waiting it does not block n  No program or OS thread is blocked
  • 34. F# Agent – Few problems ¨  F# agents do not work across process boundaries ¤  only within the same process. ¨  F# agent are not referenced by address but by explicit instance ¨  No build in durable mailboxes ¨  F# agent doesn’t have any routing and supervision functionality out of the box
  • 35. What is Akka.Net “Akka is a toolkit and runtime for building highly concurrent, distributed, and resilient message-driven applications on the JVM.” - Typesafe Akka.NET is a port of the popular Java/Scala framework Akka to .NET.
  • 36. Multi-Threads vs Multi Actors 1 MB per thread (4 Mb in 64 bit) vs 2.7 million Actors per Gigabyte VS
  • 37. How Actors Recover from Failure? How do you keep your actor system from falling apart when things go wrong? The short answer is Supervision (parental supervision) How can the Supervision resolve the error? There are two factors that determine how a failure is resolved: - How the child failed - Parent's SupervisionStrategy
  • 45. Akka.Net Remoting q  Distributed by Default Mentality q  Provides a unified programming model q  Employees referential or location transparency q  Local and remote use the same API q  Distinguished by configuration, allowing a succinct way to code message-driven applications Going Scalable!
  • 46. Location Transparency What location transparency means is that whenever you send a message to an actor, you don't need to know where they are within an actor system, which might span hundreds of computers. You just have to know that actors' address.
  • 47. Going Scalabale : Remote Actors
  • 48. Going Scalabale : Remote Actors
  • 49. Akka.Net + F# API = Hotswap Hotswap is the ability to change the behavior of an Actor at runtime without shutdown the system. F# uses <@ Code Quotations @> to deploy some behavior to a remote Actor
  • 50. Akka.Net Routing ¨  Messages can be sent via a router to efficiently route them to destination actors, known as its routees. A Router can be used inside or outside of an actor, and you can manage the routees yourselves or use a self contained router actor with configuration capabilities. ¨  On the surface routers look like normal actors, but they are actually implemented differently. Routers are designed to be extremely efficient at receiving messages and passing them quickly on to routees.
  • 51. Akka.Net Routing Strategies ¨  Broadcast router will as the name implies, broadcast any message to all of its routees 12 12 12 12 Router Routee2 Routee3 Routee1
  • 52. Akka.Net Routing Strategies ¨  RoundRobin-Pool router uses round-robin to select a connection. For concurrent calls, round robin is just a best effort. 12 1 2 3 34 4 Router Routee1 Routee2 Routee3
  • 53. Akka.Net Routing Strategies ¨  RoundRobin-Group router uses round-robin to select a connection. For concurrent calls, round robin is just a best effort. Router Routee1 Routee2 Routee3 Routee1 Routee2 Routee3 Remote1 Remote2 Router Router
  • 54. Typed & Untyped Actor TypedActors have a static interface, and the invocations of the methods on that interface is transformed into message sends UntypedActors can receive any message and defines only one abstract method TypedActors vs. UntypedActors Advantage Downside TypedActors you have a static contract, and don't need to define your own messages TypedActors places some limitations on what you can do and what you can’t
  • 55. F# & Akka.NET To install Akka.NET Distributed Actor Framework Install-Package Akka Install-Package Akka.Remote F# API support Install-Package Akka.FSharp
  • 56.
  • 57. Actor Best Practices Single Responsibility Principle Keep the actors focused on a single kind of work, and in doing so, allow yourself to use them flexibly and to compose them Specific Supervisors Akka only permits one strategy for each supervisor, there is no way to delineate between actors of one grouping for which OneForOne is the restart strategy you want, and another grouping for which AllForOne is the preferred restart strategy. Keep the Error Kernel Simple build layers of failure handling that isolate failure deep in the tree so that as few actors as possible are affected by something going wrong. Never be afraid to introduce layers of actors if it makes your supervisor hierarchy more clear and explicit. Prefer the fire and forget when you can – Tell don’t ask Avoid Premature optimization – Leave routing for last and think Synchronous first
  • 58. Actor Pros & Cons Pros Cons Easier to reason about Higher abstraction level Easier to avoid Race conditions Deadlocks Thread Starvation Live locks Distributed computing Actors don’t work well when The shared of state is needed to achieve global consensus (Transaction) Synchronous behavior is required It is not always trivial to break the problem into smaller problems
  • 59. Summary The free lunch is over, we are facing new challenges in today’s Programming World Today Applications must be built for concurrency in mind (possibly from the begining) Actor is the best a great concurrent programming model that solves problems for Scalling Up & Out
  • 60. Q & A ? The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities. -- Edsger Dijkstra
  • 62. Online resources ¨  www.fsharp.org Information & community www.tryfsharp.org Interactive F# tutorials
  • 63. How to reach me github.com/rikace/AkkaActorModel meetup.com/DC-fsharp @DCFsharp @TRikace rterrell@microsoft.com
  • 64. How to reach me github.com/DCFsharp meetup.com/DC-fsharp/ @DCFsharp rterrell@microsoft.com