Slide 1

Slide 1 text

By Meetup #1 - Introduction

Slide 2

Slide 2 text

Microservices @

Slide 3

Slide 3 text

About Gigya • Customer Identity Management Platform • Multiple products • Hundreds of (big enterprise) customers • 1.3 billion user profile managed • 5 Data centers • 10K API calls/sec (with X10 peaks)

Slide 4

Slide 4 text

We started small

Slide 5

Slide 5 text

A couple of years later…

Slide 6

Slide 6 text

We had problems • One code base, multiple teams • Archeological code layers • Technical debt (not enough unit tests, weird hacks) • “All or nothing” deployment • Looooooooong release cycles

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Microservices Benefits • Scalability (organizational and technical) • Agility • Resiliency • And also… (easier to understand, easier to deploy, easier to change, easier to experiment, multiple technologies)

Slide 9

Slide 9 text

Microservices – Not a free lunch! Modularity System Complexity

Slide 10

Slide 10 text

Microservices – Not a free lunch! • System complexity • Operational complexity • Performance and latency • Reliability • Consistency • Debugability

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

And we had another problem

Slide 13

Slide 13 text

Concurrency

Slide 14

Slide 14 text

Distributed Concurrency

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

(A is for Actors)

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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)

Slide 19

Slide 19 text

Virtual Actors • Goals: • Make distributed application programming easier • Prefer developer productivity and transparent scalability • “A programming model and runtime for building cloud native services”

Slide 20

Slide 20 text

Virtual Actors • A Virtual Actor: always exists and never fails

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

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

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

Simplified Programming Model

Slide 25

Slide 25 text

Simplified Programming Model

Slide 26

Slide 26 text

So can we use Actors as microservices?

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

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 (?)

Slide 30

Slide 30 text

Actor based microservices Service A Service B ServiceB Interface Actor IMyServiceB

Slide 31

Slide 31 text

Actor based microservices Service A Service B ServiceB Interface Actor IMyServiceB ServiceB HTTP Listener

Slide 32

Slide 32 text

Actor based microservices Service A Service B ServiceB Interface Actor IMyServiceB ServiceB Client ServiceB HTTP Listener JSON over HTTP

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

No content