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

52
WEBINAR Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor Model Hugh McKee (@mckeeh3), Global Solutions Architect

Upload: lightbend

Post on 16-Apr-2017

3.710 views

Category:

Software


0 download

TRANSCRIPT

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

WEBINAR

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

Hugh McKee (@mckeeh3), Global Solutions Architect

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

TimetoValue

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

Accelerated TimetoValue

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

Actors,Humans,andHowWeLive

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

Actormessagesareliketextmessages

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

Actorsbehavelikehumansexchangingtextmessages

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

Noresponsetoyourtext,whatdoyoudo?

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

Noresponsetoatext,sendanothertext

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

Stillnoresponse

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

ActorAsendsamessagetoBand

latergetstheexpectedresponse

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

ActorBneverrespondstomessagefromA

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

ActorAsendsmessagetoBandit

respondsbeforethetimeout

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

NoresponsefromActorBandAgetstimeoutmessage

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

Supervisoractorcreatesworkeractors

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

Workeractorhasproblemandnotifiesitssupervisor

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

Supervisorfixesworkerthathasexperiencedaproblem

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

Supervisoractordelegatestaskstoworkeractors

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

Workeractorsperformtasksasynchronously

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

Ten100ms tasksperformedsynchronouslytake1second

asynchronouslytakeabout100ms tocomplete

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

ActorsandScalingLargeSystems

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

Thesupervisoraddorshedsworkersasthe

loadincreasesanddecreases

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

Anofficeexamplewhereworkerssitatdeskstoperform

tasksonlywhenthedeskhaspower

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

Onedeskhaspower,sotheworkeratthatdeskmay

workonitsassignedtask

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

Messagesaresenttotheofficeandthen

routedtoeachworker

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

Thesystemswapsthepowerbetweendeskstoallowan

evendistributionofwork

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

Backlogformswhenmessagesarrivefasterthanthe

workerscanperformeachtask

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

Inanasynchronoussystem,workersonlyoccupydesks

whentheyhavesomethingtodo

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

Actorsystemsmayruninacluster

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

ActorFailureDetection,

Recovery,

andSelf-Healing

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

Actorsformhierarchies

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

Actorsformhierarchies

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

Actorsformhierarchies

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

Whenanodefails,thesentinelactorsarenotifiedviaan

actorterminatedmessage

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

Circuitbreakerscanbeusedtostoptheflowofmessages

toanactorwhensomethingunusualhappens

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

Actors in an IoT Application

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

Devicemessageroutingacrosstheclusterusingthe

consistenthashingalgorithm

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

RoutingdevicemessagesacrosstheclusterusingDMRs

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

Addendum: Messaging & RPC

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

Messageing HTTPRPC

HTTPReST

Page 41: Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor Model
Page 42: Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor Model
Page 43: Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor Model
Page 44: Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor Model
Page 45: Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor Model
Page 46: Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor Model
Page 47: Distributed Systems Done Right: Why Java Enterprises Are Embracing The Actor Model

orAsynchronousoperation– doesitreallymatter?

IsthisaSynchronousoperation…

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

In summary…

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

Thefourtenetsofreactivesystems

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

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

http://bit.ly/actormodel-OR

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

Build modern systems for the modern worldwww.lightbend.com