distributed systems done right: why java enterprises are embracing the actor model

Post on 16-Apr-2017

3.710 Views

Category:

Software

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

WEBINAR

Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor Model

Hugh McKee (@mckeeh3), Global Solutions Architect

TimetoValue

Accelerated TimetoValue

Actors,Humans,andHowWeLive

Actormessagesareliketextmessages

Actorsbehavelikehumansexchangingtextmessages

Noresponsetoyourtext,whatdoyoudo?

Noresponsetoatext,sendanothertext

Stillnoresponse

ActorAsendsamessagetoBand

latergetstheexpectedresponse

ActorBneverrespondstomessagefromA

ActorAsendsmessagetoBandit

respondsbeforethetimeout

NoresponsefromActorBandAgetstimeoutmessage

Supervisoractorcreatesworkeractors

Workeractorhasproblemandnotifiesitssupervisor

Supervisorfixesworkerthathasexperiencedaproblem

Supervisoractordelegatestaskstoworkeractors

Workeractorsperformtasksasynchronously

Ten100ms tasksperformedsynchronouslytake1second

asynchronouslytakeabout100ms tocomplete

ActorsandScalingLargeSystems

Thesupervisoraddorshedsworkersasthe

loadincreasesanddecreases

Anofficeexamplewhereworkerssitatdeskstoperform

tasksonlywhenthedeskhaspower

Onedeskhaspower,sotheworkeratthatdeskmay

workonitsassignedtask

Messagesaresenttotheofficeandthen

routedtoeachworker

Thesystemswapsthepowerbetweendeskstoallowan

evendistributionofwork

Backlogformswhenmessagesarrivefasterthanthe

workerscanperformeachtask

Inanasynchronoussystem,workersonlyoccupydesks

whentheyhavesomethingtodo

Actorsystemsmayruninacluster

ActorFailureDetection,

Recovery,

andSelf-Healing

Actorsformhierarchies

Actorsformhierarchies

Actorsformhierarchies

Whenanodefails,thesentinelactorsarenotifiedviaan

actorterminatedmessage

Circuitbreakerscanbeusedtostoptheflowofmessages

toanactorwhensomethingunusualhappens

Actors in an IoT Application

Devicemessageroutingacrosstheclusterusingthe

consistenthashingalgorithm

RoutingdevicemessagesacrosstheclusterusingDMRs

Addendum: Messaging & RPC

Messageing HTTPRPC

HTTPReST

orAsynchronousoperation– doesitreallymatter?

IsthisaSynchronousoperation…

In summary…

Thefourtenetsofreactivesystems

Upgrade your grey matterGet Hugh’s free O’Reilly book from Lightbend

http://bit.ly/actormodel-OR

Build modern systems for the modern worldwww.lightbend.com

top related