SlideShare a Scribd company logo
1 of 176
Download to read offline
Jonas Bonér
@jboner
Towards
Stateful
Serverless
“We predict that Serverless Computing will grow
to dominate the future of Cloud Computing.”
- Berkeley CS Department
Cloud computing simplified: a Berkeley view on serverless computing
Serverless ≠Faas
FaaS
FaaS = Function-as-a-Service
Is visionary
FaaS
FaaS = Function-as-a-Service
Is visionary
Paved the way
FaaS
FaaS = Function-as-a-Service
Is visionary
Paved the way
Just the first step
FaaS
FaaS = Function-as-a-Service
Serverless is an Experience
good use-cases
For FaaS?
good use-cases
For FaaS?
Use-cases where throughput is key rather than low latency
and requests can be completed in a short time window
good use-cases
For FaaS?
1. Embarrassingly parallel processing tasks—invoked on demand & intermittently,
examples include: image processing, object recognition, log analysis
2. Low traffic applications—enterprise IT services, and spiky workloads
3. Stateless web applications—serving static content form S3 (or similar)
4. Orchestration functions—integration/coordination of calls to third-party services
5. Composing chains of functions—stateless workflow management, connected via
data dependencies
6. Job scheduling—CRON jobs, triggers, etc.
Use-cases where throughput is key rather than low latency
and requests can be completed in a short time window
FAAS: Hard to build
General-Purpose Applications
1. Functions are stateless, ephemeral, short-lived:
expensive to lose computational context & rehydrate
2. Durable state is always “somewhere else”
3. No co-location of state and processing
4. No direct addressability—all communication over external storage
5. Limited options for managing & coordinating distributed state
6. Limited options for modelling data consistency guarantees
FAAS: Hard to build
General-Purpose Applications
General-purpose
applications in this new
Cloud Experience
We Want To Build
State
We Need Serverless Support For...
We Need Serverless Support For...
• Managing in-memory durable session state across individual requests
E.g. User Sessions, Shopping Carts, Caching
We Need Serverless Support For...
• Managing in-memory durable session state across individual requests
E.g. User Sessions, Shopping Carts, Caching
• Low-latency serving of dynamic in-memory models
E.g. Serving of Machine Learning Models
We Need Serverless Support For...
• Managing in-memory durable session state across individual requests
E.g. User Sessions, Shopping Carts, Caching
• Low-latency serving of dynamic in-memory models
E.g. Serving of Machine Learning Models
• Real-time stream processing
E.g. Recommendation, Anomaly Detection, Prediction Serving
We Need Serverless Support For...
• Managing in-memory durable session state across individual requests
E.g. User Sessions, Shopping Carts, Caching
• Low-latency serving of dynamic in-memory models
E.g. Serving of Machine Learning Models
• Real-time stream processing
E.g. Recommendation, Anomaly Detection, Prediction Serving
• Distributed resilient transactional workflows
E.g. Saga Pattern, Workflow Orchestration, Rollback/Compensating Actions
We Need Serverless Support For...
• Managing in-memory durable session state across individual requests
E.g. User Sessions, Shopping Carts, Caching
• Low-latency serving of dynamic in-memory models
E.g. Serving of Machine Learning Models
• Real-time stream processing
E.g. Recommendation, Anomaly Detection, Prediction Serving
• Distributed resilient transactional workflows
E.g. Saga Pattern, Workflow Orchestration, Rollback/Compensating Actions
• Shared collaborative workspaces
E.g. Collaborative Document Editing, Blackboards, Chat Rooms
We Need Serverless Support For...
• Managing in-memory durable session state across individual requests
E.g. User Sessions, Shopping Carts, Caching
• Low-latency serving of dynamic in-memory models
E.g. Serving of Machine Learning Models
• Real-time stream processing
E.g. Recommendation, Anomaly Detection, Prediction Serving
• Distributed resilient transactional workflows
E.g. Saga Pattern, Workflow Orchestration, Rollback/Compensating Actions
• Shared collaborative workspaces
E.g. Collaborative Document Editing, Blackboards, Chat Rooms
• Leader election, counting, voting
…and other distributed systems patterns/protocols for coordination
We Need Serverless Support For...
Technical Requirements
1. Stateful long-lived addressable virtual components
Actors
Technical Requirements
1. Stateful long-lived addressable virtual components
Actors
2. Options for distributed coordination and communication patterns
Pub-Sub, Point-To-Point, Broadcast—CRDTs, Sagas, etc.
Technical Requirements
1. Stateful long-lived addressable virtual components
Actors
2. Options for distributed coordination and communication patterns
Pub-Sub, Point-To-Point, Broadcast—CRDTs, Sagas, etc.
3. Options for managing distributed state reliably at scale
Ranging from strong to eventual consistency (durable/ephemeral)
Technical Requirements
1. Stateful long-lived addressable virtual components
Actors
2. Options for distributed coordination and communication patterns
Pub-Sub, Point-To-Point, Broadcast—CRDTs, Sagas, etc.
3. Options for managing distributed state reliably at scale
Ranging from strong to eventual consistency (durable/ephemeral)
4. Intelligent adaptive placement of stateful functions
Physical co-location of state and processing, sharding, and sticky routing
Technical Requirements
1. Stateful long-lived addressable virtual components
Actors
2. Options for distributed coordination and communication patterns
Pub-Sub, Point-To-Point, Broadcast—CRDTs, Sagas, etc.
3. Options for managing distributed state reliably at scale
Ranging from strong to eventual consistency (durable/ephemeral)
4. Intelligent adaptive placement of stateful functions
Physical co-location of state and processing, sharding, and sticky routing
5. Predictable performance, latency, and throughput
In startup time, communication/coordination, and storage of data
Technical Requirements
1. Stateful long-lived addressable virtual components
Actors
2. Options for distributed coordination and communication patterns
Pub-Sub, Point-To-Point, Broadcast—CRDTs, Sagas, etc.
3. Options for managing distributed state reliably at scale
Ranging from strong to eventual consistency (durable/ephemeral)
4. Intelligent adaptive placement of stateful functions
Physical co-location of state and processing, sharding, and sticky routing
5. Predictable performance, latency, and throughput
In startup time, communication/coordination, and storage of data
6. Ways of managing end-to-end guarantees and correctness
Technical Requirements
User Function
Deployment
FaaS Is Great At
Abstracting Over
Communication
Message In User Function
Deployment
FaaS Is Great At
Abstracting Over
Communication
Message In User Function
Deployment
Message Out
FaaS Is Great At
Abstracting Over
Communication
Message In User Function
Deployment
Message Out
FaaS With CRUD
Message In User Function
Deployment
Database
Message Out
FaaS With CRUD
Message In User Function
Deployment
Database
Message Out
Not Serverless
Leaky Abstraction
The Problem
If the Function manages the state, It is A
Black BoX
To the runtime
The Problem
The Problem
Unconstrained
database access
Makes it hard to
Automate
operations
The Problem
“Freedom is not so much the absence
of restrictions as finding the right ones,
the liberating restrictions.”
- Timothy keller
User Function
Deployment
FaaS
Abstracting Over
Communication
Message In
User Function
Deployment
FaaS
Abstracting Over
Communication
Message In
User Function
Deployment
Message Out
FaaS
Abstracting Over
Communication
Message In
User Function
Deployment
Message Out
Stateful Serverless
Abstracting Over State
Message In
User Function
Deployment
Message Out
Stateful Serverless
Abstracting Over State
State In
Message In
User Function
Deployment
Message Out
Stateful Serverless
Abstracting Over State
State In State Out
Enter
What Is CloudState?
https://cloudstate.io
Overview:
1. Open Source (Apache 2.0) project
What Is CloudState?
https://cloudstate.io
Overview:
1. Open Source (Apache 2.0) project
2. Makes Stateful Serverless applications easy
What Is CloudState?
https://cloudstate.io
Overview:
1. Open Source (Apache 2.0) project
2. Makes Stateful Serverless applications easy
3. Reference implementation for a standard (protocol and spec)
What Is CloudState?
https://cloudstate.io
Overview:
1. Open Source (Apache 2.0) project
2. Makes Stateful Serverless applications easy
3. Reference implementation for a standard (protocol and spec)
4. Let’s you focus on business logic, data model, and workflow
What Is CloudState?
https://cloudstate.io
What Is CloudState?
https://cloudstate.io
What Is CloudState?
https://cloudstate.io
Don’t worry about:
1. Managing: Complexities of Distributed and Concurrent systems
What Is CloudState?
https://cloudstate.io
Don’t worry about:
1. Managing: Complexities of Distributed and Concurrent systems
2. Managing: Distributed State—Consistency, Replication, Persistence
What Is CloudState?
https://cloudstate.io
Don’t worry about:
1. Managing: Complexities of Distributed and Concurrent systems
2. Managing: Distributed State—Consistency, Replication, Persistence
3. Managing: Databases, Service Meshes, and other infrastructure
What Is CloudState?
https://cloudstate.io
Don’t worry about:
1. Managing: Complexities of Distributed and Concurrent systems
2. Managing: Distributed State—Consistency, Replication, Persistence
3. Managing: Databases, Service Meshes, and other infrastructure
4. Managing: Message Routing, Scalability, Fail-over & Recovery
What Is CloudState?
https://cloudstate.io
Don’t worry about:
1. Managing: Complexities of Distributed and Concurrent systems
2. Managing: Distributed State—Consistency, Replication, Persistence
3. Managing: Databases, Service Meshes, and other infrastructure
4. Managing: Message Routing, Scalability, Fail-over & Recovery
5. Running & Operating your application
What Is CloudState?
https://cloudstate.io
Technical Highlights:
1. Polyglot: Client libs in JavaScript, Java, Go—with upcoming support for
Python, .NET, Rust, Swift, Scala
What Is CloudState?
https://cloudstate.io
Technical Highlights:
1. Polyglot: Client libs in JavaScript, Java, Go—with upcoming support for
Python, .NET, Rust, Swift, Scala
2. PolyState: Powerful state models—Event Sourcing, CRDTs, Key Value
What Is CloudState?
https://cloudstate.io
Technical Highlights:
1. Polyglot: Client libs in JavaScript, Java, Go—with upcoming support for
Python, .NET, Rust, Swift, Scala
2. PolyState: Powerful state models—Event Sourcing, CRDTs, Key Value
3. PolyDB: Supporting SQL, NoSQL, NewSQL and in-memory replication
What Is CloudState?
https://cloudstate.io
Technical Highlights:
1. Polyglot: Client libs in JavaScript, Java, Go—with upcoming support for
Python, .NET, Rust, Swift, Scala
2. PolyState: Powerful state models—Event Sourcing, CRDTs, Key Value
3. PolyDB: Supporting SQL, NoSQL, NewSQL and in-memory replication
4. Leveraging Akka, gRPC, Knative, GraalVM, running on Kubernetes
What Is CloudState?
https://cloudstate.io
CloudState helps you with
(when being a managed service)
• Pay-as-you-go:
• On-demand Instance Creation, Passivation, and Failover
• Autoscaling—up and down
CloudState helps you with
(when being a managed service)
• Pay-as-you-go:
• On-demand Instance Creation, Passivation, and Failover
• Autoscaling—up and down
• ZeroOps:
• Automation of Message Routing and Delivery
• Automation of State Management
• Service of Record—In-Memory Cluster Sharding, Co-location of Data & Processing
• Coordination State—Replication, Consistency
• Automation of Deployment, Provisioning, Upgrades
CloudState helps you with
(when being a managed service)
Cloudstate Architecture
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate Architecture
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Cloudstate Architecture
User Function
(JavaScript, Go, Java,…)
User Function
(JavaScript, Go, Java,…)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate Proxy
(Akka Sidecar)
User Function
(JavaScript, Go, Java,…)
Cloudstate Architecture
User Function
(JavaScript, Go, Java,…)
User Function
(JavaScript, Go, Java,…)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate Proxy
(Akka Sidecar)
User Function
(JavaScript, Go, Java,…)
Cloudstate Architecture
User Function
(JavaScript, Go, Java,…)
User Function
(JavaScript, Go, Java,…)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate Proxy
(Akka Sidecar)
User Function
(JavaScript, Go, Java,…)
Cloudstate Architecture
User Function
(JavaScript, Go, Java,…)
User Function
(JavaScript, Go, Java,…)
gRPC
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate Proxy
(Akka Sidecar)
User Function
(JavaScript, Go, Java,…)
Cloudstate Architecture
User Function
(JavaScript, Go, Java,…)
User Function
(JavaScript, Go, Java,…)
Datastore
(Cassandra, Postgres, Spanner,…)
gRPC
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Kubernetes PodUser Function
(JavaScript, Go, Java,…)
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
Kubernetes PodUser Function
(JavaScript, Go, Java,…)
Akka Sidecar
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
Akka Cluster
Kubernetes PodUser Function
(JavaScript, Go, Java,…)
Akka Sidecar
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
Akka Cluster
Kubernetes PodUser Function
(JavaScript, Go, Java,…)
Akka Sidecar
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
HTTP
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
Akka Cluster
Kubernetes PodUser Function
(JavaScript, Go, Java,…)
Akka Sidecar
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
HTTP
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
Akka Cluster
gRPC
Kubernetes PodUser Function
(JavaScript, Go, Java,…)
Akka Sidecar
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
HTTP
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
Akka Cluster
gRPC
Kubernetes PodUser Function
(JavaScript, Go, Java,…)
Akka Sidecar
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
HTTP
Gossip, State replication, Routing
Gossip, State replication, Routing
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
Akka Cluster
Datastore
(Cassandra, Postgres, Spanner,…)
gRPC
Kubernetes PodUser Function
(JavaScript, Go, Java,…)
Akka Sidecar
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
HTTP
Gossip, State replication, Routing
Gossip, State replication, Routing
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
Akka Cluster
Datastore
(Cassandra, Postgres, Spanner,…)
gRPC
Kubernetes PodUser Function
(JavaScript, Go, Java,…)
Akka Sidecar
gRPC
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
HTTP
gRPC
Gossip, State replication, Routing
Gossip, State replication, Routing
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
Akka Cluster
Datastore
(Cassandra, Postgres, Spanner,…)
gRPC
Kubernetes PodUser Function
(JavaScript, Go, Java,…)
Akka Sidecar
gRPC
Kubernetes Pod
User Function
(JavaScript, Go, Java,…)
Akka Sidecar
gRPC
HTTP
gRPC
Events
Gossip, State replication, Routing
Gossip, State replication, Routing
Akka Cluster state management
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
https://akka.io
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
(Key, State)
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
•Forwarding of Requests (if needed)
(Key, State)
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
•Forwarding of Requests (if needed)
(Key, State)
(Key, State)
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
•Forwarding of Requests (if needed)
•Co-Location of State & Processing
(Key, State)
(Key, State)
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
•Forwarding of Requests (if needed)
•Co-Location of State & Processing
•Backed by Event Log
(Key, State)
(Key, State)
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Event Log
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
•Forwarding of Requests (if needed)
•Co-Location of State & Processing
•Backed by Event Log
(Key, State)
(Key, State)
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Event Log
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
•Forwarding of Requests (if needed)
•Co-Location of State & Processing
•Backed by Event Log
•Automatic Failover, Rehydration, and
Rebalancing
(Key, State)
(Key, State)
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Event Log
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
•Forwarding of Requests (if needed)
•Co-Location of State & Processing
•Backed by Event Log
•Automatic Failover, Rehydration, and
Rebalancing
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Event Log
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
•Forwarding of Requests (if needed)
•Co-Location of State & Processing
•Backed by Event Log
•Automatic Failover, Rehydration, and
Rebalancing
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Event Log
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
•Forwarding of Requests (if needed)
•Co-Location of State & Processing
•Backed by Event Log
•Automatic Failover, Rehydration, and
Rebalancing
(Key, State)
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Event Log
Akka Sidecar
Akka Sidecar
Akka Sidecar
•Actor-based Distributed Runtime
•Decentralized Masterless P2P
•Epidemic Gossiping, Self-healing
•State Sharding & Routing on Entity Key
•Forwarding of Requests (if needed)
•Co-Location of State & Processing
•Backed by Event Log
•Automatic Failover, Rehydration, and
Rebalancing
(Key, State)
(Key, State)
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•In-memory Replication of State
•Gossiping State Changes
•Using CRDTs
•State Merged on Local Node
•Highly Available (N Replicas)
•Very Scalable
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•In-memory Replication of State
•Gossiping State Changes
•Using CRDTs
•State Merged on Local Node
•Highly Available (N Replicas)
•Very Scalable
(Key, State)
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•In-memory Replication of State
•Gossiping State Changes
•Using CRDTs
•State Merged on Local Node
•Highly Available (N Replicas)
•Very Scalable
(Key, State)
(Key, State)
(Key, State)
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
(Key, State)
(Key, State)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
•In-memory Replication of State
•Gossiping State Changes
•Using CRDTs
•State Merged on Local Node
•Highly Available (N Replicas)
•Very Scalable
https://akka.io
User FunctionUser Function
User Function
User Function
User Function
User Function
User Function
Cloudstate Uses Better Models
For Distributed State
battle-tested, Yet Constrained, models like:
Cloudstate Uses Better Models
For Distributed State
battle-tested, Yet Constrained, models like:
Cloudstate Uses Better Models
For Distributed State
Event
Sourcing
battle-tested, Yet Constrained, models like:
Cloudstate Uses Better Models
For Distributed State
Event
Sourcing CRDTs
battle-tested, Yet Constrained, models like:
Cloudstate Uses Better Models
For Distributed State
Event
Sourcing CRDTs Key
Value
Event
Sourced
Entities
Happy Path
Event
Sourced
Entities
Happy Path
Command
Event
Sourced
Entities
Happy Path
Command
Event
Sourced
Entities
Happy Path
Command
Event
Sourced
Entities
Happy Path
Command
Command
Event
Log
Event
Event
Sourced
Entities
Happy Path
Command
Command
Event
Event
Log
Event
Event
Sourced
Entities
Happy Path
Command
Command
Event
Event
Log
Event
Event
Sourced
Entities
Happy Path
Command
Memory Image
Event
Sourced
Entities
Happy Path
SAD Path, RECOVER FROM FAILURE
Event
Sourced
Entities
Event
Log
SAD Path, RECOVER FROM FAILURE
Event
Sourced
Entities
Event
Log
REPLAY EventS
SAD Path, RECOVER FROM FAILURE
Event
Sourced
Entities
Event
Log
REPLAY EventS
SAD Path, RECOVER FROM FAILURE
Command
Event
Sourced
Entities
Benefits of
Event Sourcing
Benefits of
Event Sourcing
✴ One single Source of Truth with All history
Benefits of
Event Sourcing
✴ One single Source of Truth with All history
✴ Allows for Memory Image (Durable In-Memory State)
Benefits of
Event Sourcing
✴ One single Source of Truth with All history
✴ Allows for Memory Image (Durable In-Memory State)
✴ Avoids the Object-relational mismatch
Benefits of
Event Sourcing
✴ One single Source of Truth with All history
✴ Allows for Memory Image (Durable In-Memory State)
✴ Avoids the Object-relational mismatch
✴ Allows others to Subscribe to state changes
Benefits of
Event Sourcing
✴ One single Source of Truth with All history
✴ Allows for Memory Image (Durable In-Memory State)
✴ Avoids the Object-relational mismatch
✴ Allows others to Subscribe to state changes
✴ Has good Mechanical sympathy (Single Writer Principle)
Deployment
Serverless
Event Sourcing
User Function/entity
Deployment
Serverless
Event Sourcing
User Function/entity
Deployment
Event Log In
Serverless
Event Sourcing
Command In
User Function/entity
Deployment
Event Log In
Serverless
Event Sourcing
Command In
User Function/entity
Deployment
Reply Out
Event Log In
Serverless
Event Sourcing
Command In
User Function/entity
Deployment
Reply Out
Event Log In Events OUt
Serverless
Event Sourcing
Command In
User Function/entity
Deployment
Reply Out
Event Log In Events OUt
Serverless
Event Sourcing
Convergent & Commutative Replicated Data Types - Shapiro et. al. 2011
Conflict-Free Replicated Data Types
CRDT
Convergent & Commutative Replicated Data Types - Shapiro et. al. 2011
Conflict-Free Replicated Data Types
CRDTStrong Eventual Consistency
Deterministic by Design
Data Types Contain Resolution Logic
Always Converge Correctly, Eventually
Replicated & Decentralized
Highly Available & Very Scalable
Convergent & Commutative Replicated Data Types - Shapiro et. al. 2011
Conflict-Free Replicated Data Types
Data types
Counters
Registers
Sets
Maps
Graphs
(that all compose)
CRDTStrong Eventual Consistency
Deterministic by Design
Data Types Contain Resolution Logic
Always Converge Correctly, Eventually
Replicated & Decentralized
Highly Available & Very Scalable
Convergent & Commutative Replicated Data Types - Shapiro et. al. 2011
Conflict-Free Replicated Data Types
CRDTs are…
CRDTs are…
Associative
Batch-insensitive
(grouping doesn't matter)
a+(b+c)=(a+b)+c
CRDTs are…
Associative
Batch-insensitive
(grouping doesn't matter)
a+(b+c)=(a+b)+c
Commutative
Order-insensitive
(order doesn't matter)
a+b=b+a
CRDTs are…
Associative
Batch-insensitive
(grouping doesn't matter)
a+(b+c)=(a+b)+c
Commutative
Order-insensitive
(order doesn't matter)
a+b=b+a
Idempotent
Retransmission-insensitive
(duplication does not matter)
a+a=a
Deployment
Serverless
CRDTs
User Function/entity
Deployment
Serverless
CRDTs
User Function/entity
Deployment
States/Deltas IN
Serverless
CRDTs
Message In
User Function/entity
Deployment
States/Deltas IN
Serverless
CRDTs
Message In
User Function/entity
Deployment
Message Out
States/Deltas IN
Serverless
CRDTs
Message In
User Function/entity
Deployment
Message Out
States/Deltas IN States/deltas OUT
Serverless
CRDTs
Message In
User Function/entity
Deployment
Message Out
States/Deltas IN States/deltas OUT
Serverless
CRDTs
Deployment
Serverless
CRUD
Using KeyValue
User Function/entity
Deployment
Serverless
CRUD
Using KeyValue
User Function/entity
Deployment
Snapshot In
(By Entity KEy)
Serverless
CRUD
Using KeyValue
Message In
User Function/entity
Deployment
Snapshot In
(By Entity KEy)
Serverless
CRUD
Using KeyValue
Message In
User Function/entity
Deployment
Message Out
Snapshot In
(By Entity KEy)
Serverless
CRUD
Using KeyValue
Message In
User Function/entity
Deployment
Message Out
Snapshot In
(By Entity KEy)
Snapshot out
(By Entity Key)
Serverless
CRUD
Using KeyValue
Example
CRDT Entity
Presence function in a chat app
github.com/cloudstateio/samples-java-chat
Protobuf Descriptor
defining service API and messages
syntax = "proto3";

import "cloudstate/entity_key.proto";

package cloudstate.samples.presence;

option java_package = "io.cloudstate.samples.presence";

option java_outer_classname = "PresenceProtos";
Protobuf Descriptor
defining service API and messages
syntax = "proto3";

import "cloudstate/entity_key.proto";

package cloudstate.samples.presence;

option java_package = "io.cloudstate.samples.presence";

option java_outer_classname = "PresenceProtos";
"// Messages

message User {

"// Entity key is the unique entity/function identifier

string name = 1 [(.cloudstate.entity_key) = true];

}

message OnlineStatus {

bool online = 1;

}

message Empty {

}

Protobuf Descriptor
defining service API and messages
syntax = "proto3";

import "cloudstate/entity_key.proto";

package cloudstate.samples.presence;

option java_package = "io.cloudstate.samples.presence";

option java_outer_classname = "PresenceProtos";
"// Messages

message User {

"// Entity key is the unique entity/function identifier

string name = 1 [(.cloudstate.entity_key) = true];

}

message OnlineStatus {

bool online = 1;

}

message Empty {

}

"// Service API 

service Presence { 

"// Connect the given user

rpc Connect(User) returns (stream Empty);



"// Monitor the online status of the given user

rpc Monitor(User) returns (stream OnlineStatus);

}
Protobuf Descriptor
defining service API and messages
CRDT Entity for online presence
@CrdtEntity

public class PresenceEntity {

private final Vote vote; "// Vote CRDT for this user. It’s auto replicated 

"// and keeps track how each node has voted

private final String username; "// Entity Key (for sharding and routing)

public PresenceEntity(

Optional<Vote> vote, CrdtCreationContext ctx, @EntityId String username) { … }

}
CRDT Entity for online presence
@CrdtEntity

public class PresenceEntity {

private final Vote vote; "// Vote CRDT for this user. It’s auto replicated 

"// and keeps track how each node has voted

private final String username; "// Entity Key (for sharding and routing)

public PresenceEntity(

Optional<Vote> vote, CrdtCreationContext ctx, @EntityId String username) { … }

}
public static void main(String""... args) {

new CloudState()

.registerCrdtEntity(…)

.start();

}
CRDT Entity for online presence
@CrdtEntity

public class PresenceEntity {

private final Vote vote; "// Vote CRDT for this user. It’s auto replicated 

"// and keeps track how each node has voted

private final String username; "// Entity Key (for sharding and routing)

public PresenceEntity(

Optional<Vote> vote, CrdtCreationContext ctx, @EntityId String username) { … }

}
"// Here we implement the Protobuf Service API, our business logic

@CommandHandler 

public void connect(StreamedCommandContext<Empty> ctx) {

vote.vote(true); "// Set the user to online

ctx.onCancel(cancelled "-> { "// Register cancel callback for user disconnect

vote.vote(false); 

});

…

}
public static void main(String""... args) {

new CloudState()

.registerCrdtEntity(…)

.start();

}
CRDT Entity for online presence
@CrdtEntity

public class PresenceEntity {

private final Vote vote; "// Vote CRDT for this user. It’s auto replicated 

"// and keeps track how each node has voted

private final String username; "// Entity Key (for sharding and routing)

public PresenceEntity(

Optional<Vote> vote, CrdtCreationContext ctx, @EntityId String username) { … }

}
"// Here we implement the Protobuf Service API, our business logic

@CommandHandler 

public void connect(StreamedCommandContext<Empty> ctx) {

vote.vote(true); "// Set the user to online

ctx.onCancel(cancelled "-> { "// Register cancel callback for user disconnect

vote.vote(false); 

});

…

}
public static void main(String""... args) {

new CloudState()

.registerCrdtEntity(…)

.start();

}
CRDT Entity for online presence
@CommandHandler 

public OnlineStatus monitor(StreamedCommandContext<OnlineStatus> ctx) {

ctx.onChange(change "-> { "// Subscribe to Vote CRDT changes

…

}); 

…

}
Run in Kubernetes
This step is not needed when user Cloudstate as a Service (as intended)
# Install Cloudstate
kubectl create namespace cloudstate
Run in Kubernetes
This step is not needed when user Cloudstate as a Service (as intended)
# Install Cloudstate
kubectl create namespace cloudstate
kubectl apply -n cloudstate -f https:"//github.com/
cloudstateio/cloudstate/releases/download/v0.4/
cloudstate-0.4.yaml
Run in Kubernetes
This step is not needed when user Cloudstate as a Service (as intended)
# Install Cloudstate
kubectl create namespace cloudstate
kubectl apply -n cloudstate -f https:"//github.com/
cloudstateio/cloudstate/releases/download/v0.4/
cloudstate-0.4.yaml
Run in Kubernetes
# Install our Presence app and Gateway
kubectl apply -f https:"//raw.githubusercontent.com/
cloudstateio/samples-java-chat/master/deploy/
presence.yaml
This step is not needed when user Cloudstate as a Service (as intended)
# Install Cloudstate
kubectl create namespace cloudstate
kubectl apply -n cloudstate -f https:"//github.com/
cloudstateio/cloudstate/releases/download/v0.4/
cloudstate-0.4.yaml
Run in Kubernetes
# Install our Presence app and Gateway
kubectl apply -f https:"//raw.githubusercontent.com/
cloudstateio/samples-java-chat/master/deploy/
presence.yaml
kubectl apply -f https:"//raw.githubusercontent.com/
cloudstateio/samples-java-chat/master/deploy/
gateway.yaml
This step is not needed when user Cloudstate as a Service (as intended)
# Install Cloudstate
kubectl create namespace cloudstate
kubectl apply -n cloudstate -f https:"//github.com/
cloudstateio/cloudstate/releases/download/v0.4/
cloudstate-0.4.yaml
Run in Kubernetes
# Install our Presence app and Gateway
kubectl apply -f https:"//raw.githubusercontent.com/
cloudstateio/samples-java-chat/master/deploy/
presence.yaml
kubectl apply -f https:"//raw.githubusercontent.com/
cloudstateio/samples-java-chat/master/deploy/
gateway.yaml
# Scale up the app to 3 nodes

kubectl scale deploy/presence-deployment "--replicas 3

This step is not needed when user Cloudstate as a Service (as intended)
Try out the
Next Generation
Stateful Serverless
cloudstate.io
lightbend.com/free-academy

More Related Content

What's hot

Akka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast DataAkka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast DataLightbend
 
Lean Enterprise, Microservices and Big Data
Lean Enterprise, Microservices and Big DataLean Enterprise, Microservices and Big Data
Lean Enterprise, Microservices and Big DataStylight
 
Lightbend Training for Scala, Akka, Play Framework and Apache Spark
Lightbend Training for Scala, Akka, Play Framework and Apache SparkLightbend Training for Scala, Akka, Play Framework and Apache Spark
Lightbend Training for Scala, Akka, Play Framework and Apache SparkLightbend
 
Lightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend
 
When the Cloud is a Rockin: High Availability in Apache CloudStack
When the Cloud is a Rockin: High Availability in Apache CloudStackWhen the Cloud is a Rockin: High Availability in Apache CloudStack
When the Cloud is a Rockin: High Availability in Apache CloudStackJohn Burwell
 
A Practical Guide to Selecting a Stream Processing Technology
A Practical Guide to Selecting a Stream Processing Technology A Practical Guide to Selecting a Stream Processing Technology
A Practical Guide to Selecting a Stream Processing Technology confluent
 
Akka and Kubernetes: Reactive From Code To Cloud
Akka and Kubernetes: Reactive From Code To CloudAkka and Kubernetes: Reactive From Code To Cloud
Akka and Kubernetes: Reactive From Code To CloudLightbend
 
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and moreTypesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and moreLegacy Typesafe (now Lightbend)
 
Monitoring MySQL at scale
Monitoring MySQL at scaleMonitoring MySQL at scale
Monitoring MySQL at scaleOvais Tariq
 
Lightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend
 
Using Machine Learning to Understand Kafka Runtime Behavior (Shivanath Babu, ...
Using Machine Learning to Understand Kafka Runtime Behavior (Shivanath Babu, ...Using Machine Learning to Understand Kafka Runtime Behavior (Shivanath Babu, ...
Using Machine Learning to Understand Kafka Runtime Behavior (Shivanath Babu, ...confluent
 
Journey to the Modern App with Containers, Microservices and Big Data
Journey to the Modern App with Containers, Microservices and Big DataJourney to the Modern App with Containers, Microservices and Big Data
Journey to the Modern App with Containers, Microservices and Big DataLightbend
 
20160609 nike techtalks reactive applications tools of the trade
20160609 nike techtalks reactive applications   tools of the trade20160609 nike techtalks reactive applications   tools of the trade
20160609 nike techtalks reactive applications tools of the tradeshinolajla
 
Pivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
Pivoting Spring XD to Spring Cloud Data Flow with Sabby AnandanPivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
Pivoting Spring XD to Spring Cloud Data Flow with Sabby AnandanPivotalOpenSourceHub
 
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0Legacy Typesafe (now Lightbend)
 
101 ways to configure kafka - badly (Kafka Summit)
101 ways to configure kafka - badly (Kafka Summit)101 ways to configure kafka - badly (Kafka Summit)
101 ways to configure kafka - badly (Kafka Summit)Henning Spjelkavik
 
Pakk Your Alpakka: Reactive Streams Integrations For AWS, Azure, & Google Cloud
Pakk Your Alpakka: Reactive Streams Integrations For AWS, Azure, & Google CloudPakk Your Alpakka: Reactive Streams Integrations For AWS, Azure, & Google Cloud
Pakk Your Alpakka: Reactive Streams Integrations For AWS, Azure, & Google CloudLightbend
 
Gluecon - Kafka and the service mesh
Gluecon - Kafka and the service meshGluecon - Kafka and the service mesh
Gluecon - Kafka and the service meshGwen (Chen) Shapira
 
Data Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDBData Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDBconfluent
 
Scalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at PinterestScalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at PinterestKrishna Gade
 

What's hot (20)

Akka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast DataAkka Streams And Kafka Streams: Where Microservices Meet Fast Data
Akka Streams And Kafka Streams: Where Microservices Meet Fast Data
 
Lean Enterprise, Microservices and Big Data
Lean Enterprise, Microservices and Big DataLean Enterprise, Microservices and Big Data
Lean Enterprise, Microservices and Big Data
 
Lightbend Training for Scala, Akka, Play Framework and Apache Spark
Lightbend Training for Scala, Akka, Play Framework and Apache SparkLightbend Training for Scala, Akka, Play Framework and Apache Spark
Lightbend Training for Scala, Akka, Play Framework and Apache Spark
 
Lightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend Fast Data Platform
Lightbend Fast Data Platform
 
When the Cloud is a Rockin: High Availability in Apache CloudStack
When the Cloud is a Rockin: High Availability in Apache CloudStackWhen the Cloud is a Rockin: High Availability in Apache CloudStack
When the Cloud is a Rockin: High Availability in Apache CloudStack
 
A Practical Guide to Selecting a Stream Processing Technology
A Practical Guide to Selecting a Stream Processing Technology A Practical Guide to Selecting a Stream Processing Technology
A Practical Guide to Selecting a Stream Processing Technology
 
Akka and Kubernetes: Reactive From Code To Cloud
Akka and Kubernetes: Reactive From Code To CloudAkka and Kubernetes: Reactive From Code To Cloud
Akka and Kubernetes: Reactive From Code To Cloud
 
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and moreTypesafe Reactive Platform: Monitoring 1.0, Commercial features and more
Typesafe Reactive Platform: Monitoring 1.0, Commercial features and more
 
Monitoring MySQL at scale
Monitoring MySQL at scaleMonitoring MySQL at scale
Monitoring MySQL at scale
 
Lightbend Fast Data Platform
Lightbend Fast Data PlatformLightbend Fast Data Platform
Lightbend Fast Data Platform
 
Using Machine Learning to Understand Kafka Runtime Behavior (Shivanath Babu, ...
Using Machine Learning to Understand Kafka Runtime Behavior (Shivanath Babu, ...Using Machine Learning to Understand Kafka Runtime Behavior (Shivanath Babu, ...
Using Machine Learning to Understand Kafka Runtime Behavior (Shivanath Babu, ...
 
Journey to the Modern App with Containers, Microservices and Big Data
Journey to the Modern App with Containers, Microservices and Big DataJourney to the Modern App with Containers, Microservices and Big Data
Journey to the Modern App with Containers, Microservices and Big Data
 
20160609 nike techtalks reactive applications tools of the trade
20160609 nike techtalks reactive applications   tools of the trade20160609 nike techtalks reactive applications   tools of the trade
20160609 nike techtalks reactive applications tools of the trade
 
Pivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
Pivoting Spring XD to Spring Cloud Data Flow with Sabby AnandanPivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
Pivoting Spring XD to Spring Cloud Data Flow with Sabby Anandan
 
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
 
101 ways to configure kafka - badly (Kafka Summit)
101 ways to configure kafka - badly (Kafka Summit)101 ways to configure kafka - badly (Kafka Summit)
101 ways to configure kafka - badly (Kafka Summit)
 
Pakk Your Alpakka: Reactive Streams Integrations For AWS, Azure, & Google Cloud
Pakk Your Alpakka: Reactive Streams Integrations For AWS, Azure, & Google CloudPakk Your Alpakka: Reactive Streams Integrations For AWS, Azure, & Google Cloud
Pakk Your Alpakka: Reactive Streams Integrations For AWS, Azure, & Google Cloud
 
Gluecon - Kafka and the service mesh
Gluecon - Kafka and the service meshGluecon - Kafka and the service mesh
Gluecon - Kafka and the service mesh
 
Data Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDBData Streaming with Apache Kafka & MongoDB
Data Streaming with Apache Kafka & MongoDB
 
Scalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at PinterestScalable and Reliable Logging at Pinterest
Scalable and Reliable Logging at Pinterest
 

Similar to Cloudstate - Towards Stateful Serverless

Cloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful ServerlessCloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful ServerlessJonas Bonér
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architectureFaren faren
 
Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Rick Hightower
 
Gluecon Monitoring Microservices and Containers: A Challenge
Gluecon Monitoring Microservices and Containers: A ChallengeGluecon Monitoring Microservices and Containers: A Challenge
Gluecon Monitoring Microservices and Containers: A ChallengeAdrian Cockcroft
 
Serverless Architectures - Where have all the servers gone?
Serverless Architectures - Where have all the servers gone?Serverless Architectures - Where have all the servers gone?
Serverless Architectures - Where have all the servers gone?Nane Kratzke
 
L12 Session State and Distributation Strategies
L12 Session State and Distributation StrategiesL12 Session State and Distributation Strategies
L12 Session State and Distributation StrategiesÓlafur Andri Ragnarsson
 
Hadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialHadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialhadooparchbook
 
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon Web Services Korea
 
Containerizing Traditional Applications
Containerizing Traditional ApplicationsContainerizing Traditional Applications
Containerizing Traditional ApplicationsJim Bugwadia
 
Changing application demands: What developers need to know
Changing application demands: What developers need to knowChanging application demands: What developers need to know
Changing application demands: What developers need to knowIndicThreads
 
Oasis: Standards & the Cloud June2011
Oasis: Standards & the Cloud June2011Oasis: Standards & the Cloud June2011
Oasis: Standards & the Cloud June2011Jamie Clark
 
Microservices in a Streaming World
Microservices in a Streaming WorldMicroservices in a Streaming World
Microservices in a Streaming WorldHans Jespersen
 
Case Study: Synchroniztion Issues in Mobile Databases
Case Study: Synchroniztion Issues in Mobile DatabasesCase Study: Synchroniztion Issues in Mobile Databases
Case Study: Synchroniztion Issues in Mobile DatabasesG. Habib Uddin Khan
 
Case Study: Synchroniztion Issues in Mobile Databases
Case Study: Synchroniztion Issues in Mobile DatabasesCase Study: Synchroniztion Issues in Mobile Databases
Case Study: Synchroniztion Issues in Mobile DatabasesG. Habib Uddin Khan
 
Scaling Systems: Architectures that grow
Scaling Systems: Architectures that growScaling Systems: Architectures that grow
Scaling Systems: Architectures that growGibraltar Software
 
Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Derek Ashmore
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Guido Schmutz
 
Observability in real time at scale
Observability in real time at scaleObservability in real time at scale
Observability in real time at scaleBalvinder Hira
 

Similar to Cloudstate - Towards Stateful Serverless (20)

Cloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful ServerlessCloudstate—Towards Stateful Serverless
Cloudstate—Towards Stateful Serverless
 
L21 scalability
L21 scalabilityL21 scalability
L21 scalability
 
SpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud ComputingSpringPeople - Introduction to Cloud Computing
SpringPeople - Introduction to Cloud Computing
 
Microservices architecture
Microservices architectureMicroservices architecture
Microservices architecture
 
Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)Service Mesh CTO Forum (Draft 3)
Service Mesh CTO Forum (Draft 3)
 
Gluecon Monitoring Microservices and Containers: A Challenge
Gluecon Monitoring Microservices and Containers: A ChallengeGluecon Monitoring Microservices and Containers: A Challenge
Gluecon Monitoring Microservices and Containers: A Challenge
 
Serverless Architectures - Where have all the servers gone?
Serverless Architectures - Where have all the servers gone?Serverless Architectures - Where have all the servers gone?
Serverless Architectures - Where have all the servers gone?
 
L12 Session State and Distributation Strategies
L12 Session State and Distributation StrategiesL12 Session State and Distributation Strategies
L12 Session State and Distributation Strategies
 
Hadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorialHadoop application architectures - Fraud detection tutorial
Hadoop application architectures - Fraud detection tutorial
 
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
Amazon EKS 그리고 Service Mesh (김세호 솔루션즈 아키텍트, AWS) :: Gaming on AWS 2018
 
Containerizing Traditional Applications
Containerizing Traditional ApplicationsContainerizing Traditional Applications
Containerizing Traditional Applications
 
Changing application demands: What developers need to know
Changing application demands: What developers need to knowChanging application demands: What developers need to know
Changing application demands: What developers need to know
 
Oasis: Standards & the Cloud June2011
Oasis: Standards & the Cloud June2011Oasis: Standards & the Cloud June2011
Oasis: Standards & the Cloud June2011
 
Microservices in a Streaming World
Microservices in a Streaming WorldMicroservices in a Streaming World
Microservices in a Streaming World
 
Case Study: Synchroniztion Issues in Mobile Databases
Case Study: Synchroniztion Issues in Mobile DatabasesCase Study: Synchroniztion Issues in Mobile Databases
Case Study: Synchroniztion Issues in Mobile Databases
 
Case Study: Synchroniztion Issues in Mobile Databases
Case Study: Synchroniztion Issues in Mobile DatabasesCase Study: Synchroniztion Issues in Mobile Databases
Case Study: Synchroniztion Issues in Mobile Databases
 
Scaling Systems: Architectures that grow
Scaling Systems: Architectures that growScaling Systems: Architectures that grow
Scaling Systems: Architectures that grow
 
Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15Microservices for java architects it-symposium-2015-09-15
Microservices for java architects it-symposium-2015-09-15
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
Observability in real time at scale
Observability in real time at scaleObservability in real time at scale
Observability in real time at scale
 

More from Lightbend

IoT 'Megaservices' - High Throughput Microservices with Akka
IoT 'Megaservices' - High Throughput Microservices with AkkaIoT 'Megaservices' - High Throughput Microservices with Akka
IoT 'Megaservices' - High Throughput Microservices with AkkaLightbend
 
How Akka Cluster Works: Actors Living in a Cluster
How Akka Cluster Works: Actors Living in a ClusterHow Akka Cluster Works: Actors Living in a Cluster
How Akka Cluster Works: Actors Living in a ClusterLightbend
 
Putting the 'I' in IoT - Building Digital Twins with Akka Microservices
Putting the 'I' in IoT - Building Digital Twins with Akka MicroservicesPutting the 'I' in IoT - Building Digital Twins with Akka Microservices
Putting the 'I' in IoT - Building Digital Twins with Akka MicroservicesLightbend
 
Akka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed ApplicationsAkka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed ApplicationsLightbend
 
Detecting Real-Time Financial Fraud with Cloudflow on Kubernetes
Detecting Real-Time Financial Fraud with Cloudflow on KubernetesDetecting Real-Time Financial Fraud with Cloudflow on Kubernetes
Detecting Real-Time Financial Fraud with Cloudflow on KubernetesLightbend
 
Digital Transformation from Monoliths to Microservices to Serverless and Beyond
Digital Transformation from Monoliths to Microservices to Serverless and BeyondDigital Transformation from Monoliths to Microservices to Serverless and Beyond
Digital Transformation from Monoliths to Microservices to Serverless and BeyondLightbend
 
Akka Anti-Patterns, Goodbye: Six Features of Akka 2.6
Akka Anti-Patterns, Goodbye: Six Features of Akka 2.6Akka Anti-Patterns, Goodbye: Six Features of Akka 2.6
Akka Anti-Patterns, Goodbye: Six Features of Akka 2.6Lightbend
 
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...Lightbend
 
Microservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done RightMicroservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done RightLightbend
 
Akka and Kubernetes: A Symbiotic Love Story
Akka and Kubernetes: A Symbiotic Love StoryAkka and Kubernetes: A Symbiotic Love Story
Akka and Kubernetes: A Symbiotic Love StoryLightbend
 
Scala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To KnowScala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To KnowLightbend
 
Migrating From Java EE To Cloud-Native Reactive Systems
Migrating From Java EE To Cloud-Native Reactive SystemsMigrating From Java EE To Cloud-Native Reactive Systems
Migrating From Java EE To Cloud-Native Reactive SystemsLightbend
 
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming ApplicationsRunning Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming ApplicationsLightbend
 
Designing Events-First Microservices For A Cloud Native World
Designing Events-First Microservices For A Cloud Native WorldDesigning Events-First Microservices For A Cloud Native World
Designing Events-First Microservices For A Cloud Native WorldLightbend
 
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On KubernetesHow To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On KubernetesLightbend
 
A Glimpse At The Future Of Apache Spark 3.0 With Deep Learning And Kubernetes
A Glimpse At The Future Of Apache Spark 3.0 With Deep Learning And KubernetesA Glimpse At The Future Of Apache Spark 3.0 With Deep Learning And Kubernetes
A Glimpse At The Future Of Apache Spark 3.0 With Deep Learning And KubernetesLightbend
 
Hands On With Spark: Creating A Fast Data Pipeline With Structured Streaming ...
Hands On With Spark: Creating A Fast Data Pipeline With Structured Streaming ...Hands On With Spark: Creating A Fast Data Pipeline With Structured Streaming ...
Hands On With Spark: Creating A Fast Data Pipeline With Structured Streaming ...Lightbend
 
How Akka Works: Visualize And Demo Akka With A Raspberry-Pi Cluster
How Akka Works: Visualize And Demo Akka With A Raspberry-Pi ClusterHow Akka Works: Visualize And Demo Akka With A Raspberry-Pi Cluster
How Akka Works: Visualize And Demo Akka With A Raspberry-Pi ClusterLightbend
 
Machine Learning At Speed: Operationalizing ML For Real-Time Data Streams
Machine Learning At Speed: Operationalizing ML For Real-Time Data StreamsMachine Learning At Speed: Operationalizing ML For Real-Time Data Streams
Machine Learning At Speed: Operationalizing ML For Real-Time Data StreamsLightbend
 
Ready for Fast Data: How Lightbend Enables Teams To Build Real-Time, Streamin...
Ready for Fast Data: How Lightbend Enables Teams To Build Real-Time, Streamin...Ready for Fast Data: How Lightbend Enables Teams To Build Real-Time, Streamin...
Ready for Fast Data: How Lightbend Enables Teams To Build Real-Time, Streamin...Lightbend
 

More from Lightbend (20)

IoT 'Megaservices' - High Throughput Microservices with Akka
IoT 'Megaservices' - High Throughput Microservices with AkkaIoT 'Megaservices' - High Throughput Microservices with Akka
IoT 'Megaservices' - High Throughput Microservices with Akka
 
How Akka Cluster Works: Actors Living in a Cluster
How Akka Cluster Works: Actors Living in a ClusterHow Akka Cluster Works: Actors Living in a Cluster
How Akka Cluster Works: Actors Living in a Cluster
 
Putting the 'I' in IoT - Building Digital Twins with Akka Microservices
Putting the 'I' in IoT - Building Digital Twins with Akka MicroservicesPutting the 'I' in IoT - Building Digital Twins with Akka Microservices
Putting the 'I' in IoT - Building Digital Twins with Akka Microservices
 
Akka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed ApplicationsAkka at Enterprise Scale: Performance Tuning Distributed Applications
Akka at Enterprise Scale: Performance Tuning Distributed Applications
 
Detecting Real-Time Financial Fraud with Cloudflow on Kubernetes
Detecting Real-Time Financial Fraud with Cloudflow on KubernetesDetecting Real-Time Financial Fraud with Cloudflow on Kubernetes
Detecting Real-Time Financial Fraud with Cloudflow on Kubernetes
 
Digital Transformation from Monoliths to Microservices to Serverless and Beyond
Digital Transformation from Monoliths to Microservices to Serverless and BeyondDigital Transformation from Monoliths to Microservices to Serverless and Beyond
Digital Transformation from Monoliths to Microservices to Serverless and Beyond
 
Akka Anti-Patterns, Goodbye: Six Features of Akka 2.6
Akka Anti-Patterns, Goodbye: Six Features of Akka 2.6Akka Anti-Patterns, Goodbye: Six Features of Akka 2.6
Akka Anti-Patterns, Goodbye: Six Features of Akka 2.6
 
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
How to build streaming data pipelines with Akka Streams, Flink, and Spark usi...
 
Microservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done RightMicroservices, Kubernetes, and Application Modernization Done Right
Microservices, Kubernetes, and Application Modernization Done Right
 
Akka and Kubernetes: A Symbiotic Love Story
Akka and Kubernetes: A Symbiotic Love StoryAkka and Kubernetes: A Symbiotic Love Story
Akka and Kubernetes: A Symbiotic Love Story
 
Scala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To KnowScala 3 Is Coming: Martin Odersky Shares What To Know
Scala 3 Is Coming: Martin Odersky Shares What To Know
 
Migrating From Java EE To Cloud-Native Reactive Systems
Migrating From Java EE To Cloud-Native Reactive SystemsMigrating From Java EE To Cloud-Native Reactive Systems
Migrating From Java EE To Cloud-Native Reactive Systems
 
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming ApplicationsRunning Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
Running Kafka On Kubernetes With Strimzi For Real-Time Streaming Applications
 
Designing Events-First Microservices For A Cloud Native World
Designing Events-First Microservices For A Cloud Native WorldDesigning Events-First Microservices For A Cloud Native World
Designing Events-First Microservices For A Cloud Native World
 
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On KubernetesHow To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
How To Build, Integrate, and Deploy Real-Time Streaming Pipelines On Kubernetes
 
A Glimpse At The Future Of Apache Spark 3.0 With Deep Learning And Kubernetes
A Glimpse At The Future Of Apache Spark 3.0 With Deep Learning And KubernetesA Glimpse At The Future Of Apache Spark 3.0 With Deep Learning And Kubernetes
A Glimpse At The Future Of Apache Spark 3.0 With Deep Learning And Kubernetes
 
Hands On With Spark: Creating A Fast Data Pipeline With Structured Streaming ...
Hands On With Spark: Creating A Fast Data Pipeline With Structured Streaming ...Hands On With Spark: Creating A Fast Data Pipeline With Structured Streaming ...
Hands On With Spark: Creating A Fast Data Pipeline With Structured Streaming ...
 
How Akka Works: Visualize And Demo Akka With A Raspberry-Pi Cluster
How Akka Works: Visualize And Demo Akka With A Raspberry-Pi ClusterHow Akka Works: Visualize And Demo Akka With A Raspberry-Pi Cluster
How Akka Works: Visualize And Demo Akka With A Raspberry-Pi Cluster
 
Machine Learning At Speed: Operationalizing ML For Real-Time Data Streams
Machine Learning At Speed: Operationalizing ML For Real-Time Data StreamsMachine Learning At Speed: Operationalizing ML For Real-Time Data Streams
Machine Learning At Speed: Operationalizing ML For Real-Time Data Streams
 
Ready for Fast Data: How Lightbend Enables Teams To Build Real-Time, Streamin...
Ready for Fast Data: How Lightbend Enables Teams To Build Real-Time, Streamin...Ready for Fast Data: How Lightbend Enables Teams To Build Real-Time, Streamin...
Ready for Fast Data: How Lightbend Enables Teams To Build Real-Time, Streamin...
 

Recently uploaded

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 

Recently uploaded (20)

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 

Cloudstate - Towards Stateful Serverless

  • 2. “We predict that Serverless Computing will grow to dominate the future of Cloud Computing.” - Berkeley CS Department Cloud computing simplified: a Berkeley view on serverless computing
  • 5. Is visionary FaaS FaaS = Function-as-a-Service
  • 6. Is visionary Paved the way FaaS FaaS = Function-as-a-Service
  • 7. Is visionary Paved the way Just the first step FaaS FaaS = Function-as-a-Service
  • 8. Serverless is an Experience
  • 10. good use-cases For FaaS? Use-cases where throughput is key rather than low latency and requests can be completed in a short time window
  • 11. good use-cases For FaaS? 1. Embarrassingly parallel processing tasks—invoked on demand & intermittently, examples include: image processing, object recognition, log analysis 2. Low traffic applications—enterprise IT services, and spiky workloads 3. Stateless web applications—serving static content form S3 (or similar) 4. Orchestration functions—integration/coordination of calls to third-party services 5. Composing chains of functions—stateless workflow management, connected via data dependencies 6. Job scheduling—CRON jobs, triggers, etc. Use-cases where throughput is key rather than low latency and requests can be completed in a short time window
  • 12. FAAS: Hard to build General-Purpose Applications
  • 13. 1. Functions are stateless, ephemeral, short-lived: expensive to lose computational context & rehydrate 2. Durable state is always “somewhere else” 3. No co-location of state and processing 4. No direct addressability—all communication over external storage 5. Limited options for managing & coordinating distributed state 6. Limited options for modelling data consistency guarantees FAAS: Hard to build General-Purpose Applications
  • 14. General-purpose applications in this new Cloud Experience We Want To Build
  • 15.
  • 16. State
  • 17. We Need Serverless Support For...
  • 18. We Need Serverless Support For...
  • 19. • Managing in-memory durable session state across individual requests E.g. User Sessions, Shopping Carts, Caching We Need Serverless Support For...
  • 20. • Managing in-memory durable session state across individual requests E.g. User Sessions, Shopping Carts, Caching • Low-latency serving of dynamic in-memory models E.g. Serving of Machine Learning Models We Need Serverless Support For...
  • 21. • Managing in-memory durable session state across individual requests E.g. User Sessions, Shopping Carts, Caching • Low-latency serving of dynamic in-memory models E.g. Serving of Machine Learning Models • Real-time stream processing E.g. Recommendation, Anomaly Detection, Prediction Serving We Need Serverless Support For...
  • 22. • Managing in-memory durable session state across individual requests E.g. User Sessions, Shopping Carts, Caching • Low-latency serving of dynamic in-memory models E.g. Serving of Machine Learning Models • Real-time stream processing E.g. Recommendation, Anomaly Detection, Prediction Serving • Distributed resilient transactional workflows E.g. Saga Pattern, Workflow Orchestration, Rollback/Compensating Actions We Need Serverless Support For...
  • 23. • Managing in-memory durable session state across individual requests E.g. User Sessions, Shopping Carts, Caching • Low-latency serving of dynamic in-memory models E.g. Serving of Machine Learning Models • Real-time stream processing E.g. Recommendation, Anomaly Detection, Prediction Serving • Distributed resilient transactional workflows E.g. Saga Pattern, Workflow Orchestration, Rollback/Compensating Actions • Shared collaborative workspaces E.g. Collaborative Document Editing, Blackboards, Chat Rooms We Need Serverless Support For...
  • 24. • Managing in-memory durable session state across individual requests E.g. User Sessions, Shopping Carts, Caching • Low-latency serving of dynamic in-memory models E.g. Serving of Machine Learning Models • Real-time stream processing E.g. Recommendation, Anomaly Detection, Prediction Serving • Distributed resilient transactional workflows E.g. Saga Pattern, Workflow Orchestration, Rollback/Compensating Actions • Shared collaborative workspaces E.g. Collaborative Document Editing, Blackboards, Chat Rooms • Leader election, counting, voting …and other distributed systems patterns/protocols for coordination We Need Serverless Support For...
  • 26. 1. Stateful long-lived addressable virtual components Actors Technical Requirements
  • 27. 1. Stateful long-lived addressable virtual components Actors 2. Options for distributed coordination and communication patterns Pub-Sub, Point-To-Point, Broadcast—CRDTs, Sagas, etc. Technical Requirements
  • 28. 1. Stateful long-lived addressable virtual components Actors 2. Options for distributed coordination and communication patterns Pub-Sub, Point-To-Point, Broadcast—CRDTs, Sagas, etc. 3. Options for managing distributed state reliably at scale Ranging from strong to eventual consistency (durable/ephemeral) Technical Requirements
  • 29. 1. Stateful long-lived addressable virtual components Actors 2. Options for distributed coordination and communication patterns Pub-Sub, Point-To-Point, Broadcast—CRDTs, Sagas, etc. 3. Options for managing distributed state reliably at scale Ranging from strong to eventual consistency (durable/ephemeral) 4. Intelligent adaptive placement of stateful functions Physical co-location of state and processing, sharding, and sticky routing Technical Requirements
  • 30. 1. Stateful long-lived addressable virtual components Actors 2. Options for distributed coordination and communication patterns Pub-Sub, Point-To-Point, Broadcast—CRDTs, Sagas, etc. 3. Options for managing distributed state reliably at scale Ranging from strong to eventual consistency (durable/ephemeral) 4. Intelligent adaptive placement of stateful functions Physical co-location of state and processing, sharding, and sticky routing 5. Predictable performance, latency, and throughput In startup time, communication/coordination, and storage of data Technical Requirements
  • 31. 1. Stateful long-lived addressable virtual components Actors 2. Options for distributed coordination and communication patterns Pub-Sub, Point-To-Point, Broadcast—CRDTs, Sagas, etc. 3. Options for managing distributed state reliably at scale Ranging from strong to eventual consistency (durable/ephemeral) 4. Intelligent adaptive placement of stateful functions Physical co-location of state and processing, sharding, and sticky routing 5. Predictable performance, latency, and throughput In startup time, communication/coordination, and storage of data 6. Ways of managing end-to-end guarantees and correctness Technical Requirements
  • 32. User Function Deployment FaaS Is Great At Abstracting Over Communication
  • 33. Message In User Function Deployment FaaS Is Great At Abstracting Over Communication
  • 34. Message In User Function Deployment Message Out FaaS Is Great At Abstracting Over Communication
  • 35. Message In User Function Deployment Message Out FaaS With CRUD
  • 36. Message In User Function Deployment Database Message Out FaaS With CRUD
  • 37. Message In User Function Deployment Database Message Out Not Serverless Leaky Abstraction
  • 39. If the Function manages the state, It is A Black BoX To the runtime The Problem
  • 41. Unconstrained database access Makes it hard to Automate operations The Problem
  • 42. “Freedom is not so much the absence of restrictions as finding the right ones, the liberating restrictions.” - Timothy keller
  • 45. Message In User Function Deployment Message Out FaaS Abstracting Over Communication
  • 46. Message In User Function Deployment Message Out Stateful Serverless Abstracting Over State
  • 47. Message In User Function Deployment Message Out Stateful Serverless Abstracting Over State State In
  • 48. Message In User Function Deployment Message Out Stateful Serverless Abstracting Over State State In State Out
  • 49. Enter
  • 51. Overview: 1. Open Source (Apache 2.0) project What Is CloudState? https://cloudstate.io
  • 52. Overview: 1. Open Source (Apache 2.0) project 2. Makes Stateful Serverless applications easy What Is CloudState? https://cloudstate.io
  • 53. Overview: 1. Open Source (Apache 2.0) project 2. Makes Stateful Serverless applications easy 3. Reference implementation for a standard (protocol and spec) What Is CloudState? https://cloudstate.io
  • 54. Overview: 1. Open Source (Apache 2.0) project 2. Makes Stateful Serverless applications easy 3. Reference implementation for a standard (protocol and spec) 4. Let’s you focus on business logic, data model, and workflow What Is CloudState? https://cloudstate.io
  • 56. What Is CloudState? https://cloudstate.io Don’t worry about: 1. Managing: Complexities of Distributed and Concurrent systems
  • 57. What Is CloudState? https://cloudstate.io Don’t worry about: 1. Managing: Complexities of Distributed and Concurrent systems 2. Managing: Distributed State—Consistency, Replication, Persistence
  • 58. What Is CloudState? https://cloudstate.io Don’t worry about: 1. Managing: Complexities of Distributed and Concurrent systems 2. Managing: Distributed State—Consistency, Replication, Persistence 3. Managing: Databases, Service Meshes, and other infrastructure
  • 59. What Is CloudState? https://cloudstate.io Don’t worry about: 1. Managing: Complexities of Distributed and Concurrent systems 2. Managing: Distributed State—Consistency, Replication, Persistence 3. Managing: Databases, Service Meshes, and other infrastructure 4. Managing: Message Routing, Scalability, Fail-over & Recovery
  • 60. What Is CloudState? https://cloudstate.io Don’t worry about: 1. Managing: Complexities of Distributed and Concurrent systems 2. Managing: Distributed State—Consistency, Replication, Persistence 3. Managing: Databases, Service Meshes, and other infrastructure 4. Managing: Message Routing, Scalability, Fail-over & Recovery 5. Running & Operating your application
  • 62. Technical Highlights: 1. Polyglot: Client libs in JavaScript, Java, Go—with upcoming support for Python, .NET, Rust, Swift, Scala What Is CloudState? https://cloudstate.io
  • 63. Technical Highlights: 1. Polyglot: Client libs in JavaScript, Java, Go—with upcoming support for Python, .NET, Rust, Swift, Scala 2. PolyState: Powerful state models—Event Sourcing, CRDTs, Key Value What Is CloudState? https://cloudstate.io
  • 64. Technical Highlights: 1. Polyglot: Client libs in JavaScript, Java, Go—with upcoming support for Python, .NET, Rust, Swift, Scala 2. PolyState: Powerful state models—Event Sourcing, CRDTs, Key Value 3. PolyDB: Supporting SQL, NoSQL, NewSQL and in-memory replication What Is CloudState? https://cloudstate.io
  • 65. Technical Highlights: 1. Polyglot: Client libs in JavaScript, Java, Go—with upcoming support for Python, .NET, Rust, Swift, Scala 2. PolyState: Powerful state models—Event Sourcing, CRDTs, Key Value 3. PolyDB: Supporting SQL, NoSQL, NewSQL and in-memory replication 4. Leveraging Akka, gRPC, Knative, GraalVM, running on Kubernetes What Is CloudState? https://cloudstate.io
  • 66. CloudState helps you with (when being a managed service)
  • 67. • Pay-as-you-go: • On-demand Instance Creation, Passivation, and Failover • Autoscaling—up and down CloudState helps you with (when being a managed service)
  • 68. • Pay-as-you-go: • On-demand Instance Creation, Passivation, and Failover • Autoscaling—up and down • ZeroOps: • Automation of Message Routing and Delivery • Automation of State Management • Service of Record—In-Memory Cluster Sharding, Co-location of Data & Processing • Coordination State—Replication, Consistency • Automation of Deployment, Provisioning, Upgrades CloudState helps you with (when being a managed service)
  • 70. Kubernetes Pod Kubernetes Pod Kubernetes Pod Cloudstate Architecture
  • 71. Kubernetes Pod Kubernetes Pod Kubernetes Pod User Function (JavaScript, Go, Java,…) Cloudstate Architecture User Function (JavaScript, Go, Java,…) User Function (JavaScript, Go, Java,…)
  • 72. Kubernetes Pod Kubernetes Pod Kubernetes Pod Cloudstate Proxy (Akka Sidecar) User Function (JavaScript, Go, Java,…) Cloudstate Architecture User Function (JavaScript, Go, Java,…) User Function (JavaScript, Go, Java,…)
  • 73. Kubernetes Pod Kubernetes Pod Kubernetes Pod Cloudstate Proxy (Akka Sidecar) User Function (JavaScript, Go, Java,…) Cloudstate Architecture User Function (JavaScript, Go, Java,…) User Function (JavaScript, Go, Java,…)
  • 74. Kubernetes Pod Kubernetes Pod Kubernetes Pod Cloudstate Proxy (Akka Sidecar) User Function (JavaScript, Go, Java,…) Cloudstate Architecture User Function (JavaScript, Go, Java,…) User Function (JavaScript, Go, Java,…) gRPC
  • 75. Kubernetes Pod Kubernetes Pod Kubernetes Pod Cloudstate Proxy (Akka Sidecar) User Function (JavaScript, Go, Java,…) Cloudstate Architecture User Function (JavaScript, Go, Java,…) User Function (JavaScript, Go, Java,…) Datastore (Cassandra, Postgres, Spanner,…) gRPC
  • 76. Kubernetes Pod User Function (JavaScript, Go, Java,…) Kubernetes PodUser Function (JavaScript, Go, Java,…) Kubernetes Pod User Function (JavaScript, Go, Java,…)
  • 77. Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar Kubernetes PodUser Function (JavaScript, Go, Java,…) Akka Sidecar Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar
  • 78. Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar Akka Cluster Kubernetes PodUser Function (JavaScript, Go, Java,…) Akka Sidecar Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar
  • 79. Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar Akka Cluster Kubernetes PodUser Function (JavaScript, Go, Java,…) Akka Sidecar Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar HTTP
  • 80. Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar Akka Cluster Kubernetes PodUser Function (JavaScript, Go, Java,…) Akka Sidecar Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar HTTP
  • 81. Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar Akka Cluster gRPC Kubernetes PodUser Function (JavaScript, Go, Java,…) Akka Sidecar Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar HTTP
  • 82. Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar Akka Cluster gRPC Kubernetes PodUser Function (JavaScript, Go, Java,…) Akka Sidecar Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar HTTP Gossip, State replication, Routing Gossip, State replication, Routing
  • 83. Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar Akka Cluster Datastore (Cassandra, Postgres, Spanner,…) gRPC Kubernetes PodUser Function (JavaScript, Go, Java,…) Akka Sidecar Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar HTTP Gossip, State replication, Routing Gossip, State replication, Routing
  • 84. Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar Akka Cluster Datastore (Cassandra, Postgres, Spanner,…) gRPC Kubernetes PodUser Function (JavaScript, Go, Java,…) Akka Sidecar gRPC Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar HTTP gRPC Gossip, State replication, Routing Gossip, State replication, Routing
  • 85. Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar Akka Cluster Datastore (Cassandra, Postgres, Spanner,…) gRPC Kubernetes PodUser Function (JavaScript, Go, Java,…) Akka Sidecar gRPC Kubernetes Pod User Function (JavaScript, Go, Java,…) Akka Sidecar gRPC HTTP gRPC Events Gossip, State replication, Routing Gossip, State replication, Routing
  • 86. Akka Cluster state management
  • 87. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar
  • 88. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar
  • 89. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing https://akka.io
  • 90. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 91. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 92. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key (Key, State) https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 93. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key •Forwarding of Requests (if needed) (Key, State) https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 94. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key •Forwarding of Requests (if needed) (Key, State) (Key, State) https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 95. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key •Forwarding of Requests (if needed) •Co-Location of State & Processing (Key, State) (Key, State) https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 96. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key •Forwarding of Requests (if needed) •Co-Location of State & Processing •Backed by Event Log (Key, State) (Key, State) https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 97. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Event Log Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key •Forwarding of Requests (if needed) •Co-Location of State & Processing •Backed by Event Log (Key, State) (Key, State) https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 98. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Event Log Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key •Forwarding of Requests (if needed) •Co-Location of State & Processing •Backed by Event Log •Automatic Failover, Rehydration, and Rebalancing (Key, State) (Key, State) https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 99. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Event Log Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key •Forwarding of Requests (if needed) •Co-Location of State & Processing •Backed by Event Log •Automatic Failover, Rehydration, and Rebalancing https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 100. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Event Log Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key •Forwarding of Requests (if needed) •Co-Location of State & Processing •Backed by Event Log •Automatic Failover, Rehydration, and Rebalancing https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 101. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Event Log Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key •Forwarding of Requests (if needed) •Co-Location of State & Processing •Backed by Event Log •Automatic Failover, Rehydration, and Rebalancing (Key, State) https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 102. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Event Log Akka Sidecar Akka Sidecar Akka Sidecar •Actor-based Distributed Runtime •Decentralized Masterless P2P •Epidemic Gossiping, Self-healing •State Sharding & Routing on Entity Key •Forwarding of Requests (if needed) •Co-Location of State & Processing •Backed by Event Log •Automatic Failover, Rehydration, and Rebalancing (Key, State) (Key, State) https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 103. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •In-memory Replication of State •Gossiping State Changes •Using CRDTs •State Merged on Local Node •Highly Available (N Replicas) •Very Scalable https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 104. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •In-memory Replication of State •Gossiping State Changes •Using CRDTs •State Merged on Local Node •Highly Available (N Replicas) •Very Scalable (Key, State) https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 105. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •In-memory Replication of State •Gossiping State Changes •Using CRDTs •State Merged on Local Node •Highly Available (N Replicas) •Very Scalable (Key, State) (Key, State) (Key, State) https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function (Key, State) (Key, State)
  • 106. Akka Cluster state management Akka Sidecar Akka Sidecar Akka Sidecar Akka Cluster Akka Sidecar Akka Sidecar Akka Sidecar Akka Sidecar •In-memory Replication of State •Gossiping State Changes •Using CRDTs •State Merged on Local Node •Highly Available (N Replicas) •Very Scalable https://akka.io User FunctionUser Function User Function User Function User Function User Function User Function
  • 107. Cloudstate Uses Better Models For Distributed State
  • 108. battle-tested, Yet Constrained, models like: Cloudstate Uses Better Models For Distributed State
  • 109. battle-tested, Yet Constrained, models like: Cloudstate Uses Better Models For Distributed State Event Sourcing
  • 110. battle-tested, Yet Constrained, models like: Cloudstate Uses Better Models For Distributed State Event Sourcing CRDTs
  • 111. battle-tested, Yet Constrained, models like: Cloudstate Uses Better Models For Distributed State Event Sourcing CRDTs Key Value
  • 121. SAD Path, RECOVER FROM FAILURE Event Sourced Entities
  • 122. Event Log SAD Path, RECOVER FROM FAILURE Event Sourced Entities
  • 123. Event Log REPLAY EventS SAD Path, RECOVER FROM FAILURE Event Sourced Entities
  • 124. Event Log REPLAY EventS SAD Path, RECOVER FROM FAILURE Command Event Sourced Entities
  • 126. Benefits of Event Sourcing ✴ One single Source of Truth with All history
  • 127. Benefits of Event Sourcing ✴ One single Source of Truth with All history ✴ Allows for Memory Image (Durable In-Memory State)
  • 128. Benefits of Event Sourcing ✴ One single Source of Truth with All history ✴ Allows for Memory Image (Durable In-Memory State) ✴ Avoids the Object-relational mismatch
  • 129. Benefits of Event Sourcing ✴ One single Source of Truth with All history ✴ Allows for Memory Image (Durable In-Memory State) ✴ Avoids the Object-relational mismatch ✴ Allows others to Subscribe to state changes
  • 130. Benefits of Event Sourcing ✴ One single Source of Truth with All history ✴ Allows for Memory Image (Durable In-Memory State) ✴ Avoids the Object-relational mismatch ✴ Allows others to Subscribe to state changes ✴ Has good Mechanical sympathy (Single Writer Principle)
  • 133. User Function/entity Deployment Event Log In Serverless Event Sourcing
  • 134. Command In User Function/entity Deployment Event Log In Serverless Event Sourcing
  • 135. Command In User Function/entity Deployment Reply Out Event Log In Serverless Event Sourcing
  • 136. Command In User Function/entity Deployment Reply Out Event Log In Events OUt Serverless Event Sourcing
  • 137. Command In User Function/entity Deployment Reply Out Event Log In Events OUt Serverless Event Sourcing
  • 138. Convergent & Commutative Replicated Data Types - Shapiro et. al. 2011 Conflict-Free Replicated Data Types
  • 139. CRDT Convergent & Commutative Replicated Data Types - Shapiro et. al. 2011 Conflict-Free Replicated Data Types
  • 140. CRDTStrong Eventual Consistency Deterministic by Design Data Types Contain Resolution Logic Always Converge Correctly, Eventually Replicated & Decentralized Highly Available & Very Scalable Convergent & Commutative Replicated Data Types - Shapiro et. al. 2011 Conflict-Free Replicated Data Types
  • 141. Data types Counters Registers Sets Maps Graphs (that all compose) CRDTStrong Eventual Consistency Deterministic by Design Data Types Contain Resolution Logic Always Converge Correctly, Eventually Replicated & Decentralized Highly Available & Very Scalable Convergent & Commutative Replicated Data Types - Shapiro et. al. 2011 Conflict-Free Replicated Data Types
  • 144. CRDTs are… Associative Batch-insensitive (grouping doesn't matter) a+(b+c)=(a+b)+c Commutative Order-insensitive (order doesn't matter) a+b=b+a
  • 145. CRDTs are… Associative Batch-insensitive (grouping doesn't matter) a+(b+c)=(a+b)+c Commutative Order-insensitive (order doesn't matter) a+b=b+a Idempotent Retransmission-insensitive (duplication does not matter) a+a=a
  • 150. Message In User Function/entity Deployment Message Out States/Deltas IN Serverless CRDTs
  • 151. Message In User Function/entity Deployment Message Out States/Deltas IN States/deltas OUT Serverless CRDTs
  • 152. Message In User Function/entity Deployment Message Out States/Deltas IN States/deltas OUT Serverless CRDTs
  • 155. User Function/entity Deployment Snapshot In (By Entity KEy) Serverless CRUD Using KeyValue
  • 156. Message In User Function/entity Deployment Snapshot In (By Entity KEy) Serverless CRUD Using KeyValue
  • 157. Message In User Function/entity Deployment Message Out Snapshot In (By Entity KEy) Serverless CRUD Using KeyValue
  • 158. Message In User Function/entity Deployment Message Out Snapshot In (By Entity KEy) Snapshot out (By Entity Key) Serverless CRUD Using KeyValue
  • 159. Example CRDT Entity Presence function in a chat app github.com/cloudstateio/samples-java-chat
  • 161. syntax = "proto3"; import "cloudstate/entity_key.proto"; package cloudstate.samples.presence; option java_package = "io.cloudstate.samples.presence"; option java_outer_classname = "PresenceProtos"; Protobuf Descriptor defining service API and messages
  • 162. syntax = "proto3"; import "cloudstate/entity_key.proto"; package cloudstate.samples.presence; option java_package = "io.cloudstate.samples.presence"; option java_outer_classname = "PresenceProtos"; "// Messages message User { "// Entity key is the unique entity/function identifier string name = 1 [(.cloudstate.entity_key) = true]; } message OnlineStatus { bool online = 1; } message Empty { } Protobuf Descriptor defining service API and messages
  • 163. syntax = "proto3"; import "cloudstate/entity_key.proto"; package cloudstate.samples.presence; option java_package = "io.cloudstate.samples.presence"; option java_outer_classname = "PresenceProtos"; "// Messages message User { "// Entity key is the unique entity/function identifier string name = 1 [(.cloudstate.entity_key) = true]; } message OnlineStatus { bool online = 1; } message Empty { } "// Service API service Presence { "// Connect the given user rpc Connect(User) returns (stream Empty); "// Monitor the online status of the given user rpc Monitor(User) returns (stream OnlineStatus); } Protobuf Descriptor defining service API and messages
  • 164. CRDT Entity for online presence
  • 165. @CrdtEntity public class PresenceEntity { private final Vote vote; "// Vote CRDT for this user. It’s auto replicated "// and keeps track how each node has voted private final String username; "// Entity Key (for sharding and routing) public PresenceEntity( Optional<Vote> vote, CrdtCreationContext ctx, @EntityId String username) { … } } CRDT Entity for online presence
  • 166. @CrdtEntity public class PresenceEntity { private final Vote vote; "// Vote CRDT for this user. It’s auto replicated "// and keeps track how each node has voted private final String username; "// Entity Key (for sharding and routing) public PresenceEntity( Optional<Vote> vote, CrdtCreationContext ctx, @EntityId String username) { … } } public static void main(String""... args) { new CloudState() .registerCrdtEntity(…) .start(); } CRDT Entity for online presence
  • 167. @CrdtEntity public class PresenceEntity { private final Vote vote; "// Vote CRDT for this user. It’s auto replicated "// and keeps track how each node has voted private final String username; "// Entity Key (for sharding and routing) public PresenceEntity( Optional<Vote> vote, CrdtCreationContext ctx, @EntityId String username) { … } } "// Here we implement the Protobuf Service API, our business logic @CommandHandler public void connect(StreamedCommandContext<Empty> ctx) { vote.vote(true); "// Set the user to online ctx.onCancel(cancelled "-> { "// Register cancel callback for user disconnect vote.vote(false); }); … } public static void main(String""... args) { new CloudState() .registerCrdtEntity(…) .start(); } CRDT Entity for online presence
  • 168. @CrdtEntity public class PresenceEntity { private final Vote vote; "// Vote CRDT for this user. It’s auto replicated "// and keeps track how each node has voted private final String username; "// Entity Key (for sharding and routing) public PresenceEntity( Optional<Vote> vote, CrdtCreationContext ctx, @EntityId String username) { … } } "// Here we implement the Protobuf Service API, our business logic @CommandHandler public void connect(StreamedCommandContext<Empty> ctx) { vote.vote(true); "// Set the user to online ctx.onCancel(cancelled "-> { "// Register cancel callback for user disconnect vote.vote(false); }); … } public static void main(String""... args) { new CloudState() .registerCrdtEntity(…) .start(); } CRDT Entity for online presence @CommandHandler public OnlineStatus monitor(StreamedCommandContext<OnlineStatus> ctx) { ctx.onChange(change "-> { "// Subscribe to Vote CRDT changes … }); … }
  • 169. Run in Kubernetes This step is not needed when user Cloudstate as a Service (as intended)
  • 170. # Install Cloudstate kubectl create namespace cloudstate Run in Kubernetes This step is not needed when user Cloudstate as a Service (as intended)
  • 171. # Install Cloudstate kubectl create namespace cloudstate kubectl apply -n cloudstate -f https:"//github.com/ cloudstateio/cloudstate/releases/download/v0.4/ cloudstate-0.4.yaml Run in Kubernetes This step is not needed when user Cloudstate as a Service (as intended)
  • 172. # Install Cloudstate kubectl create namespace cloudstate kubectl apply -n cloudstate -f https:"//github.com/ cloudstateio/cloudstate/releases/download/v0.4/ cloudstate-0.4.yaml Run in Kubernetes # Install our Presence app and Gateway kubectl apply -f https:"//raw.githubusercontent.com/ cloudstateio/samples-java-chat/master/deploy/ presence.yaml This step is not needed when user Cloudstate as a Service (as intended)
  • 173. # Install Cloudstate kubectl create namespace cloudstate kubectl apply -n cloudstate -f https:"//github.com/ cloudstateio/cloudstate/releases/download/v0.4/ cloudstate-0.4.yaml Run in Kubernetes # Install our Presence app and Gateway kubectl apply -f https:"//raw.githubusercontent.com/ cloudstateio/samples-java-chat/master/deploy/ presence.yaml kubectl apply -f https:"//raw.githubusercontent.com/ cloudstateio/samples-java-chat/master/deploy/ gateway.yaml This step is not needed when user Cloudstate as a Service (as intended)
  • 174. # Install Cloudstate kubectl create namespace cloudstate kubectl apply -n cloudstate -f https:"//github.com/ cloudstateio/cloudstate/releases/download/v0.4/ cloudstate-0.4.yaml Run in Kubernetes # Install our Presence app and Gateway kubectl apply -f https:"//raw.githubusercontent.com/ cloudstateio/samples-java-chat/master/deploy/ presence.yaml kubectl apply -f https:"//raw.githubusercontent.com/ cloudstateio/samples-java-chat/master/deploy/ gateway.yaml # Scale up the app to 3 nodes kubectl scale deploy/presence-deployment "--replicas 3 This step is not needed when user Cloudstate as a Service (as intended)
  • 175. Try out the Next Generation Stateful Serverless cloudstate.io