Top Banner
@petabridge Petabridge.com Actor Model : The Future of Distributed Programming
59

Akka.NET: The Future of Distributed Programming inqconrio.com/.../the_future_of_distributed_programming_in...2015.pdfActor Model : The Future of Distributed Programming. ... STREAM

May 24, 2018

Download

Documents

vuongliem
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 6: Akka.NET: The Future of Distributed Programming inqconrio.com/.../the_future_of_distributed_programming_in...2015.pdfActor Model : The Future of Distributed Programming. ... STREAM

@petabridge Petabridge.com

Allow our customers to start

conversations with the specific

types of users.

Page 30: Akka.NET: The Future of Distributed Programming inqconrio.com/.../the_future_of_distributed_programming_in...2015.pdfActor Model : The Future of Distributed Programming. ... STREAM

@petabridge Petabridge.com

The New Reality

• Data is trivially

cheap to collect

and store

• Users accept

nothing less than

excellence

• Developers are

expected to deliver

more

Page 39: Akka.NET: The Future of Distributed Programming inqconrio.com/.../the_future_of_distributed_programming_in...2015.pdfActor Model : The Future of Distributed Programming. ... STREAM

@petabridge Petabridge.com

3 Core Actor Abilities

1. Send messages2. Create other actors3. Change behavior

Page 40: Akka.NET: The Future of Distributed Programming inqconrio.com/.../the_future_of_distributed_programming_in...2015.pdfActor Model : The Future of Distributed Programming. ... STREAM

@petabridge Petabridge.com

Benefit 1: actors make it easy

to write asynchronous

applications

Page 41: Akka.NET: The Future of Distributed Programming inqconrio.com/.../the_future_of_distributed_programming_in...2015.pdfActor Model : The Future of Distributed Programming. ... STREAM

@petabridge Petabridge.com

Benefit 2: actor state is always

thread-safe and never needs

locks!

Page 42: Akka.NET: The Future of Distributed Programming inqconrio.com/.../the_future_of_distributed_programming_in...2015.pdfActor Model : The Future of Distributed Programming. ... STREAM

@petabridge Petabridge.com

Actor Thread Safety

• Actor state is never shared directly with

any other object

• Actors share data via message-passing

• All messages are immutable

• Actors process one message at a time

Page 47: Akka.NET: The Future of Distributed Programming inqconrio.com/.../the_future_of_distributed_programming_in...2015.pdfActor Model : The Future of Distributed Programming. ... STREAM

@petabridge Petabridge.com

When actors fail, parents can

restart them into their original

state

Page 48: Akka.NET: The Future of Distributed Programming inqconrio.com/.../the_future_of_distributed_programming_in...2015.pdfActor Model : The Future of Distributed Programming. ... STREAM

@petabridge Petabridge.com

Benefit 4: Actors can be easily

distributed across the network

Page 50: Akka.NET: The Future of Distributed Programming inqconrio.com/.../the_future_of_distributed_programming_in...2015.pdfActor Model : The Future of Distributed Programming. ... STREAM

@petabridge Petabridge.com

But you don’t need to know an

actor’s address.

(We use “Actor References” to

communicate with actors)

Page 55: Akka.NET: The Future of Distributed Programming inqconrio.com/.../the_future_of_distributed_programming_in...2015.pdfActor Model : The Future of Distributed Programming. ... STREAM

@petabridge Petabridge.com

With actor model: write actor

that manages 1 entity, run

1000 of them in parallel