akka - manuelmeyer.net · akka.net scalable, distributed, parallel and fault tolerant. trivadis...

Post on 31-Oct-2019

6 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF

HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH

Akka.NETScalable, distributed, parallel and fault tolerant.

Trivadis Late Lounge, 18.02.2016

Manuel Meyer, ZH-AD

Agenda

1. Erlang

2. Akka

3. Actor Model

4. Akka.NET Principles

Erlang

Erlang

–Parallel

–Highly Available

–Fault-Tolerant

–Hot-Pluggable

–> COPL

–> Build MSSRTS.

Erlang

Prolog

Smalltalk

PLEX

F#

Clojure

Rust

Scala

Opa

Reia

Elixir

Dart

Akka

Erlang QuickSort

Erlang Ping-Pong

Erlang Users

CouchDB

RabbitMQ

SimpleDB (AWS)

Cowboy, Ranch, Bullet, Sheriff

ejabberd

Akka

Akka.NET

Akka.NET

Actor Model

Actor Model

Dr. Carl Hewitt (MIT) 1973

Mathematical Model of concurrent computation

„in the prospect of highly parallel computing machines with thousands of processors“

Great fit for:– Cloud– Internet– Mobile– IoT– Reactive– Everything

Actor Model

Actor Model

Actor Model

Actor = (Computation, Storage, Communication)

Akka Principles

Akka Principals

Everything is an Actor/Shared Nothing/Lightweight Actors

Distributed by Default/Divide and Conquer

Fault Tolerance/Supervision/Error-Kernel Pattern

Loose Coupling/Location Transparency/Dynamics

Akka Principals

Everything is an Actor/Shared Nothing/Lightweight Actors

Distributed by Default/Divide and Conquer

Fault Tolerance/Supervision/Error-Kernel Pattern

Loose Coupling/Location Transparency/Dynamics

Everything is an Actor/Shared Nothing/Lightweight Actors

Actor System

Actors (UntypedActor, ReceiveActor)

Props

Factories

Messages (POCO).

ActorSystem.Create("MyActorSystem");

Everything is an Actor/Shared Nothing/Lightweight Actors

3 Mio Actors per GB of RAM

Passive Actors.

Akka Principals

Everything is an Actor/Shared Nothing/Lightweight Actors

Distributed by Default/Divide and Conquer

Fault Tolerance/Supervision/Error-Kernel Pattern

Loose Coupling/Location Transparency/Dynamics

Distributed by Default/Divide and Conquer

1. Take a lot of work

2. Break it down until it is easy to deal with

3. Respond as needed.

Akka Principals

Everything is an Actor/Shared Nothing/Lightweight Actors

Distributed by Default/Divide and Conquer

Fault Tolerance/Supervision/Error-Kernel Pattern

Loose Coupling/Location Transparency/Dynamics

Fault Tolerance/Supervision/Error-Kernel Pattern

Fault Tolerance/Supervision/Error-Kernel Pattern

Fault Tolerance/Supervision/Error-Kernel Pattern

1. Error in child1

2. Child1 is suspended

3. System sends a Failure msg to Parent1 with exception

4. Parent1 issues a directive to Child1 telling it what to do.

5. Life goes on

Directives: Restart, Stop, Escalate, Resume (ignore)

Strategies: One-for-One, All-for-One, NumberOfRetries.

Akka Principals

Everything is an Actor/Shared Nothing/Lightweight Actors

Distributed by Default/Divide and Conquer

Fault Tolerance/Supervision/Error-Kernel Pattern

Loose Coupling/Location Transparency/Dynamics

Loose Coupling/Location Transparency/Dynamics

IActorReference

ActorPath:

akka.tcp://MyActorSystem@LTMME:9001/user/actorName1

Loose Coupling/Location Transparency/Dynamics

HOCON: Human-Optimized Config Object Notation

Demo:

Akka.NET

Resources

Akka.NET

– http://getakka.net

Petabridge Akka.NET Bootcamp

– https://petabridge.com/bootcamp/

Pluralsight (www.pluralsight.com)

– Akka.NET Fundamentals

– Stateful Reactive Concurrent SPAs with SignalR and Akka.NET

– Improving Message Throughput in Akka.NET

– Concurrent WPF Applications with Akka.NET

Agenda

1. Erlang

2. Akka

3. Actor Model

4. Akka.NET

Thank you!Manuel Meyermanuel.meyer@trivadis.com

top related