Slide 1

Slide 1 text

Reason-able Concurrency with Actors

Slide 2

Slide 2 text

Reasonable “able to think, understand, or form judgments by a logical process.”

Slide 3

Slide 3 text

No content

Slide 4

Slide 4 text

Concurrency

Slide 5

Slide 5 text

What are we here for? (besides beer)

Slide 6

Slide 6 text

What are we here for? Context

Slide 7

Slide 7 text

What are we here for? Context Opinionated Statement

Slide 8

Slide 8 text

What are we here for? Context Opinionated Statement Moralize

Slide 9

Slide 9 text

What are we here for? Context Opinionated Statement Moralize repeat

Slide 10

Slide 10 text

Context

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

Holding things in your head is hard

Slide 14

Slide 14 text

Elixir

Slide 15

Slide 15 text

Elixir “Dynamic, Functional language designed for building scalable and maintainable applications”

Slide 16

Slide 16 text

Elixir Erlang VM

Slide 17

Slide 17 text

Erlang VM Immutable Data Structures Elixir

Slide 18

Slide 18 text

Erlang VM Immutable Data Structures Pattern Matching Elixir

Slide 19

Slide 19 text

Erlang VM Immutable Data Structures Pattern Matching Hygienic Macros Elixir

Slide 20

Slide 20 text

Erlang VM Immutable Data Structures Pattern Matching Hygienic Macros “Green” Processes Elixir

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

#1

Slide 24

Slide 24 text

#1 Elixir is OO

Slide 25

Slide 25 text

#1 Elixir is OO And thats a good thing

Slide 26

Slide 26 text

Object Oriented: the good parts

Slide 27

Slide 27 text

smallTalk-72

Slide 28

Slide 28 text

Message Passing

Slide 29

Slide 29 text

Boundaries

Slide 30

Slide 30 text

Encapsulate Errors

Slide 31

Slide 31 text

Processes FTW.

Slide 32

Slide 32 text

“concurrent processes with no data sharing provide a strong measure of fault isolation. A software error in a concurrent process should not influence processing in the other processes in the system.” - Joe Armstrong

Slide 33

Slide 33 text

“As soon as two processes share any common resource…the possibility exists that a software error in one of the processes will corrupt the shared resource. Since eliminating all such software errors for large software systems is an unsolved problem I think that the only realistic way to build large reliable systems is by partitioning the system into independent parallel processes, and by providing mechanisms for monitoring and restarting these processes” - Joe Armstrong

Slide 34

Slide 34 text

OTP

Slide 35

Slide 35 text

OTP Actors

Slide 36

Slide 36 text

OTP Actors Messages + Mailboxes

Slide 37

Slide 37 text

OTP Actors Messages + Mailboxes Hot code swapping

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

Moralizing

Slide 41

Slide 41 text

State is in your app

Slide 42

Slide 42 text

State Should be small

Slide 43

Slide 43 text

State should be hidden

Slide 44

Slide 44 text

#2

Slide 45

Slide 45 text

#2 Failure

Slide 46

Slide 46 text

#2 Failure Its time to get over it

Slide 47

Slide 47 text

Failures are latent

Slide 48

Slide 48 text

Failures are latent “The complexity of these systems makes it impossible for them to run without multiple flaws being present"

Slide 49

Slide 49 text

Failures are latent “The high consequences of failure lead over time to the construction of multiple layers of defense against failure…The effect of these measures is to provide a series of shields that normally divert operations away from accidents”

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

Supervisors

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

Supervisor Stack

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

Persistance

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

Supervisor Stack Database

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

No content

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

Moralizing

Slide 69

Slide 69 text

Failures Will Happen

Slide 70

Slide 70 text

Failures should be

Slide 71

Slide 71 text

Failures should be Seen

Slide 72

Slide 72 text

Failures should be Seen Isolated

Slide 73

Slide 73 text

Supervise Complexity

Slide 74

Slide 74 text

Supervision Hierarchy

Slide 75

Slide 75 text

Intentional Programming

Slide 76

Slide 76 text

Let it Fail

Slide 77

Slide 77 text

Thanks