Microservices Benefits • Scalability (organizational and technical) • Agility • Resiliency • And also… (easier to understand, easier to deploy, easier to change, easier to experiment, multiple technologies)
The Actor Model • Simpler concurrent programming model • Write single-threaded code (easier to understand) • Concurrency and scale via actor instances • Maximizes CPU utilization • Easy to distribute
Virtual Actors • Started in 2008 at Microsoft Research – Project Orleans • In production since 2011 (Halo 4 cloud services) • Open sourced and moved to Microsoft Studios at 2015 • A port to Java – Orbit (by EA)
Virtual Actors • Goals: • Make distributed application programming easier • Prefer developer productivity and transparent scalability • “A programming model and runtime for building cloud native services”
Virtual Actors Actor types: • Worker • An auto-scaling processing unit – multiple instances created by framework as needed • Single Activation • Guaranteed to have a single active instance in the cluster • A Stateful application middle-tier
Virtual Actor Framework • A runtime providing virtual “actor space”, analogues to virtual memory • Handles Actor placement, activation and GC when needed • Balances resources across the cluster, provides elastic scalability
Simplified Programming Model • An Actor is a class, implementing an interface with asynchronous methods • The caller of an Actor uses the actor interface via a proxy • Messaging is transparent and handled by the runtime. Programmers deal with interfaces and methods
A Microservice • “Small” (developed by a single team) • Solves a problem (single responsibility) • Interacts with other services over well-defined interfaces • Independently deployed • Remains consistent and available in presence of failures
Actors as Microservices ? • “Small” (developed by a single team) • Solves a problem (single responsibility) • Interacts with other services over well-defined interfaces • Independently deployed • Remains consistent and available in presence of failures
Actors as Microservices ? • “Small” (developed by a single team) • Solves a problem (single responsibility) • Interacts with other services over well-defined interfaces • Independently deployed • Remains consistent and available in presence of failures (?)