23

Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

Embed Size (px)

Citation preview

Page 1: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects
Page 2: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

The Benefits Of The Actor Model: A Pragmatic Overview For ArchitectsJeffrey Hammond, Vice President & Principal AnalystJonas Bonér, CTO & Co-founder at Lightbend, Inc.

Sept 15, 2016

Page 3: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 3

US Tech Market Outlook For 2016 And 2017: Cloud And Business Caution Will Slow Growth

Cloud adoption reaches a tipping point

Page 4: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 4

Strategies for moving to the cloud1. Lift-and-shift: re-host existing systems with little or no

modification.

2. Lift-and-extend: re-host system but add substantial modifications to take advantage of cloud platforms and/or services.

3. SaaS substitution: replace a core system with a new SaaS product

4. Full replacement: replace a system with one or more custom services built in the cloud.

5. Hybrid extension: leave a system and its data in place, add new modules and/or data in the cloud.

Page 5: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 5

What a modern application looks like

Page 6: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 6

Source: How To Capture The Benefits Of Microservice Design

Microservices aid modern applications

Page 7: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 7

Source: Microservices Have An Important Role In The Future Of Solution Architecture

Microservices can extend workloads

Page 8: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 8

Source: Microservices Have An Important Role In The Future Of Solution Architecture

Microservices vs. traditional applications

Page 9: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 9

DIY microservices are challenging›Microservices create a dependency-management challenge

›Continuous integration and delivery is difficult to scale

›Microservice composition requires robust API and messaging technologies

› Internet-scale applications on public cloud platforms require new programming patterns and platforms

Page 10: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 10

How are developers moving forward?1. Adapting today's programming models and

platforms to microservice designs.

2. Adopting new programming models on today's platforms.

3. Adopting new programming models and new microservice platforms.

Page 11: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 11

Microservice platforms are emerging

Source: Microservices Have An Important Role In The Future Of Solution Architecture

Page 12: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 12

Remember 1973?

Page 13: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 13

Source: Carl Hewitt, Peter Bishop, and Richard Steiger, "IJCAI'73 Proceedings of the 3rd international joint conference on Artificial intelligence," ACM Digital Library, August 20, 1973

The Actor Model – All the way from 1973The Actor Model envisioned

"the prospect of highly parallel computing machines consisting of dozens, hundreds, or even thousands of independent microprocessors, each with its own local memory and communications processor, communicating via a high-performance communications network."

Page 14: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 14

Erlang took Actors into the real world

Page 15: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 15

Source: http://www.brianstorti.com/the-actor-model/

How the Actor Model worksActors can:

1. Create more actors;

2. Send messages to other actors;

3. Designate what to do with the next message. (i.e. manipulate internal state)

Mailbox

Mailbox

Mailbox

Internal State

Page 16: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 16

The Actor Model and MicroservicesActors:

›Make complex parallel processing tasks simpler

›Provide building blocks for resiliency

›Ease updates of individual actors

›Present a migration path for apps with granular entity models

Page 17: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 17

The challenge w/ Actors in Erlang

HTML/CSS; 12.4%

Java; 10.9%

C++; 9.8%

JavaScript; 9.2%C#; 7.9%

PL/SQL; 6.7%

PHP; 5.1%

C; 4.8%

VB.NET; 4.1%

Basic/VB; 3.5%

COBOL; 2.9%

Python; 2.6%ABAP; 2.4%

Delphi/ObjPascal; 1.9%

Perl; 1.6%Obj-C; 1.5%MATLAB; 1.4% Swift; 1.3%

Ruby; 1.3%CICS; 1.3% RPG; 1.2% Groovy; 0.9%

Source: Forrsights Developer Survey, Q2 2016 n=1815 developers

How do you allocate the time you spend writing code across the following programming languages?

Page 18: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 18

Actor Model frameworks meet popular VMs›JVM – Akka, Quasar

› .NET - Akka.NET, Orleans, Service Fabric

›C++ - CAF

Page 19: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 19

More about Akka› Implementation of the Actor Model on the JVM (Java &

Scala APIs)

› Inspired by the Erlang model for Resilience• Not part of the original Actor Model

• Supervision: Parent monitors the life-cycle of the children

• Akka Cluster ensures unified semantics across nodes as in a local context

›Runtime w/ lots of add-on modules: • Remote & Cluster

• HTTP & IO

• Streams & Integration

• Persistence & FSM

Page 20: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 20

Lagom build on Akka’s Actor Model›High-productivity framework for Microservices

›Opinionated: • Asynchronous by default

• REST, Streaming and Pub/Sub messaging

• WebSockets or HTTP

• Event Sourcing/CQRS for persistence

• Dev Console with hot code reload etc.

• Seamless deploy to production

Page 21: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 21

Example of the Actor Model in action› IOT: Nest (smart home), Samsung (wearable health),

eero (consumer WiFi), Mesh Systems, Quorum (Oil & Gas Service)

› Streaming: iHeart Radio (music), Major League Baseball, HBO (video)

› Personalization: William Hill (gambling), Gilt Group (retail)

› Financial Services: Capital One (auto loans), UniCredit (retail banking)

› Technology: Kafka, Flink, Gearpump (streaming data), Riak (distributed database)

Page 22: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 22

Closing thoughts• Moving to the cloud demands a new

architectural approach

• Microservices mesh well with public cloud concepts

• Microservices /= Containers

• Microservice frameworks abstract developers from lower level plumbing

• Options exists for mainstream programming languages and virtual machines like Java and .NET

Page 23: Benefits Of The Actor Model For Cloud Computing: A Pragmatic Overview For Java Architects

© 2016 Forrester Research, Inc. Reproduction Prohibited 23

ResourcesForrester: How To Capture The Benefits Of Microservices Design

http://reprints.forrester.com/#/assets/2/311/'RES134866'/reports

Lightbend: Reactive Microservices Architecture

http://lightbend.com/reactive-microservices-architecture