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

  • View
    2.503

  • Download
    0

  • Category

    Software

Preview:

Citation preview

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

© 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

© 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.

© 2016 Forrester Research, Inc. Reproduction Prohibited 5

What a modern application looks like

© 2016 Forrester Research, Inc. Reproduction Prohibited 6

Source: How To Capture The Benefits Of Microservice Design

Microservices aid modern applications

© 2016 Forrester Research, Inc. Reproduction Prohibited 7

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

Microservices can extend workloads

© 2016 Forrester Research, Inc. Reproduction Prohibited 8

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

Microservices vs. traditional applications

© 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

© 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.

© 2016 Forrester Research, Inc. Reproduction Prohibited 11

Microservice platforms are emerging

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

© 2016 Forrester Research, Inc. Reproduction Prohibited 12

Remember 1973?

© 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."

© 2016 Forrester Research, Inc. Reproduction Prohibited 14

Erlang took Actors into the real world

© 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

© 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

© 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?

© 2016 Forrester Research, Inc. Reproduction Prohibited 18

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

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

›C++ - CAF

© 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

© 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

© 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)

© 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

© 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