hpts - towards stateful serverless · graphs (that all compose) crdt acid 2.0 strong eventual...
TRANSCRIPT
![Page 1: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/1.jpg)
Jonas Bonér @jboner
Beyond FaaS Towards Stateful
Serverless
![Page 2: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/2.jpg)
“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
![Page 3: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/3.jpg)
FaaS
FaaS = Function-as-a-Service
![Page 4: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/4.jpg)
Is visionaryFaaS
FaaS = Function-as-a-Service
![Page 5: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/5.jpg)
Is visionaryPaved the way
FaaS
FaaS = Function-as-a-Service
![Page 6: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/6.jpg)
Is visionaryPaved the wayJust the first step
FaaS
FaaS = Function-as-a-Service
![Page 7: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/7.jpg)
Serverless ≠Faas
![Page 8: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/8.jpg)
good use-casesFor FaaS?
![Page 9: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/9.jpg)
good use-casesFor FaaS?
Use-cases where throughput is key rather than low latency and requests can be completed in a short time window
![Page 10: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/10.jpg)
good use-casesFor 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
![Page 11: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/11.jpg)
FAAS: Hard to build General-Purpose Applications
![Page 12: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/12.jpg)
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
![Page 13: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/13.jpg)
![Page 14: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/14.jpg)
State
![Page 15: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/15.jpg)
• 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...
![Page 16: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/16.jpg)
Technical Requirements
![Page 17: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/17.jpg)
1. Stateful long-lived addressable virtual components Actors
Technical Requirements
![Page 18: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/18.jpg)
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
![Page 19: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/19.jpg)
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
![Page 20: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/20.jpg)
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
![Page 21: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/21.jpg)
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
![Page 22: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/22.jpg)
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
![Page 23: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/23.jpg)
User Function
Deployment
FaaS Abstracting Over Communication
![Page 24: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/24.jpg)
Message In User Function
Deployment
FaaS Abstracting Over Communication
![Page 25: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/25.jpg)
Message In User Function
Deployment
Message Out
FaaS Abstracting Over Communication
![Page 26: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/26.jpg)
Message In User Function
Deployment
Message Out
FaaS With CRUD
![Page 27: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/27.jpg)
Message In User Function
Deployment
Database
Message Out
FaaS With CRUD
![Page 28: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/28.jpg)
Message In User Function
Deployment
Database
Message Out
Not Serverless In An Ideal World
![Page 29: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/29.jpg)
Unconstrained database access Makes it hard to
Automate operations
![Page 30: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/30.jpg)
Enter Stateful Serverless
![Page 31: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/31.jpg)
Guid
ing Prin
cip
les
![Page 32: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/32.jpg)
1. Embrace State—Don’t ignore, hide, or delegate it Data locality matters. Faster insight into data is a competitive advantage.
Guid
ing Prin
cip
les
![Page 33: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/33.jpg)
1. Embrace State—Don’t ignore, hide, or delegate it Data locality matters. Faster insight into data is a competitive advantage.
2. Embrace Failure—Unavoidable. Don’t prevent. Manage. Bulkhead and Contain. Signal and Die. Supervise and Manage.
Guid
ing Prin
cip
les
![Page 34: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/34.jpg)
1. Embrace State—Don’t ignore, hide, or delegate it Data locality matters. Faster insight into data is a competitive advantage.
2. Embrace Failure—Unavoidable. Don’t prevent. Manage. Bulkhead and Contain. Signal and Die. Supervise and Manage.
3. Embrace Uncertainty—Manage it in the application layer End-to-end correctness/stability requires app working in concert w/ infra.
Guid
ing Prin
cip
les
![Page 35: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/35.jpg)
1. Embrace State—Don’t ignore, hide, or delegate it Data locality matters. Faster insight into data is a competitive advantage.
2. Embrace Failure—Unavoidable. Don’t prevent. Manage. Bulkhead and Contain. Signal and Die. Supervise and Manage.
3. Embrace Uncertainty—Manage it in the application layer End-to-end correctness/stability requires app working in concert w/ infra.
4. Avoid Needless Consistency Not all data have need the same guarantees. Start with zero, add as needed.
Guid
ing Prin
cip
les
![Page 36: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/36.jpg)
1. Embrace State—Don’t ignore, hide, or delegate it Data locality matters. Faster insight into data is a competitive advantage.
2. Embrace Failure—Unavoidable. Don’t prevent. Manage. Bulkhead and Contain. Signal and Die. Supervise and Manage.
3. Embrace Uncertainty—Manage it in the application layer End-to-end correctness/stability requires app working in concert w/ infra.
4. Avoid Needless Consistency Not all data have need the same guarantees. Start with zero, add as needed.
5. Avoid Needless Coordination and Communication Silence is Golden. Favour Eventual Consistency, CALM, CRDTs, ACID 2.0.
Guid
ing Prin
cip
les
![Page 37: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/37.jpg)
1. Embrace State—Don’t ignore, hide, or delegate it Data locality matters. Faster insight into data is a competitive advantage.
2. Embrace Failure—Unavoidable. Don’t prevent. Manage. Bulkhead and Contain. Signal and Die. Supervise and Manage.
3. Embrace Uncertainty—Manage it in the application layer End-to-end correctness/stability requires app working in concert w/ infra.
4. Avoid Needless Consistency Not all data have need the same guarantees. Start with zero, add as needed.
5. Avoid Needless Coordination and Communication Silence is Golden. Favour Eventual Consistency, CALM, CRDTs, ACID 2.0.
6. Avoid Coupling in Time and Space Go Async. Don’t Block. Location Transparency. Guess/Apologize/Compensate.G
uid
ing Prin
cip
les
![Page 38: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/38.jpg)
Message In
User Function/Entity
Deployment
Message Out
Stateful Serverless Abstracting Over State
![Page 39: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/39.jpg)
Message In
User Function/Entity
Deployment
Message Out
Stateful Serverless Abstracting Over State
State In
![Page 40: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/40.jpg)
Message In
User Function/Entity
Deployment
Message Out
Stateful Serverless Abstracting Over State
State In State Out
![Page 41: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/41.jpg)
Let Us Use Better Models For Distributed State
![Page 42: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/42.jpg)
A few battle-tested, Yet Constrained, models are:
Let Us Use Better Models For Distributed State
![Page 43: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/43.jpg)
A few battle-tested, Yet Constrained, models are:
Let Us Use Better Models For Distributed State
Event Sourcing
![Page 44: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/44.jpg)
A few battle-tested, Yet Constrained, models are:
Let Us Use Better Models For Distributed State
Event Sourcing CRDTs
![Page 45: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/45.jpg)
A few battle-tested, Yet Constrained, models are:
Let Us Use Better Models For Distributed State
Event Sourcing CRDTs Key
Value
![Page 46: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/46.jpg)
Event Sourced Services
Happy Path
![Page 47: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/47.jpg)
Event Sourced Services
Happy Path
![Page 48: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/48.jpg)
Command
Event Sourced Services
Happy Path
![Page 49: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/49.jpg)
Command
Event Sourced Services
Happy Path
![Page 50: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/50.jpg)
Command
Event Sourced Services
Happy Path
Command
![Page 51: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/51.jpg)
Command
Event Log
Event
Event Sourced Services
Happy Path
Command
![Page 52: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/52.jpg)
Command
Event
Event Log
Event
Event Sourced Services
Happy Path
Command
![Page 53: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/53.jpg)
Command
Event
Event Log
Event
Event Sourced Services
Happy Path
Command Memory Image
![Page 54: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/54.jpg)
Event Sourced Services
Happy Path
![Page 55: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/55.jpg)
Event Sourced Services
SAD Path, RECOVER FROM FAILURE
![Page 56: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/56.jpg)
Event Log
Event Sourced Services
SAD Path, RECOVER FROM FAILURE
![Page 57: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/57.jpg)
Event Log
REPLAY EventS
Event Sourced Services
SAD Path, RECOVER FROM FAILURE
![Page 58: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/58.jpg)
Event Log
REPLAY EventS
Event Sourced Services
SAD Path, RECOVER FROM FAILURE
Command
![Page 59: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/59.jpg)
Deployment
Serverless
Event Sourcing
![Page 60: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/60.jpg)
User Function/entity
Deployment
Serverless
Event Sourcing
![Page 61: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/61.jpg)
User Function/entity
Deployment
Event Log In
Serverless
Event Sourcing
![Page 62: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/62.jpg)
Command In
User Function/entity
Deployment
Event Log In
Serverless
Event Sourcing
![Page 63: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/63.jpg)
Command In
User Function/entity
Deployment
Reply Out
Event Log In
Serverless
Event Sourcing
![Page 64: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/64.jpg)
Command In
User Function/entity
Deployment
Reply Out
Event Log In Events OUt
Serverless
Event Sourcing
![Page 65: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/65.jpg)
ACID 2.0
![Page 66: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/66.jpg)
ACID 2.0Associative Batch-insensitive
(grouping doesn't matter) a+(b+c)=(a+b)+c
![Page 67: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/67.jpg)
ACID 2.0Associative Batch-insensitive
(grouping doesn't matter) a+(b+c)=(a+b)+c
Commutative Order-insensitive
(order doesn't matter) a+b=b+a
![Page 68: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/68.jpg)
ACID 2.0Associative 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
![Page 69: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/69.jpg)
Convergent & Commutative Replicated Data Types - Shapiro et. al. 2011
Conflict-Free Replicated Data Types
![Page 70: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/70.jpg)
CRDTACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function Highly Available & Scalable
Convergent & Commutative Replicated Data Types - Shapiro et. al. 2011
Conflict-Free Replicated Data Types
![Page 71: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/71.jpg)
Data types Counters Registers
Sets Maps
Graphs (that all compose)
CRDTACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function Highly Available & Scalable
Convergent & Commutative Replicated Data Types - Shapiro et. al. 2011
Conflict-Free Replicated Data Types
![Page 72: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/72.jpg)
Deployment
Serverless
CRDTs
![Page 73: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/73.jpg)
User Function/entity
Deployment
Serverless
CRDTs
![Page 74: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/74.jpg)
User Function/entity
Deployment
States/Deltas IN
Serverless
CRDTs
![Page 75: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/75.jpg)
Message In
User Function/entity
Deployment
States/Deltas IN
Serverless
CRDTs
![Page 76: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/76.jpg)
Message In
User Function/entity
Deployment
Message Out
States/Deltas IN
Serverless
CRDTs
![Page 77: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/77.jpg)
Message In
User Function/entity
Deployment
Message Out
States/Deltas IN States/deltas OUT
Serverless
CRDTs
![Page 78: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/78.jpg)
Deployment
Serverless
CRUD
![Page 79: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/79.jpg)
User Function/entity
Deployment
Serverless
CRUD
![Page 80: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/80.jpg)
User Function/entity
Deployment
Snapshot In (By Entity KEy)
Serverless
CRUD
![Page 81: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/81.jpg)
Message In
User Function/entity
Deployment
Snapshot In (By Entity KEy)
Serverless
CRUD
![Page 82: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/82.jpg)
Message In
User Function/entity
Deployment
Message Out
Snapshot In (By Entity KEy)
Serverless
CRUD
![Page 83: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/83.jpg)
Message In
User Function/entity
Deployment
Message Out
Snapshot In (By Entity KEy)
Snapshot out (By Entity Key)
Serverless
CRUD
![Page 84: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/84.jpg)
Introducing
![Page 85: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/85.jpg)
What Is CloudState?https://cloudstate.io
![Page 86: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/86.jpg)
Two things:
What Is CloudState?https://cloudstate.io
![Page 87: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/87.jpg)
Two things:1. Standards Project—defining a specification, protocol, and TCK
What Is CloudState?https://cloudstate.io
![Page 88: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/88.jpg)
Two things:1. Standards Project—defining a specification, protocol, and TCK2. Reference Implementation—backend + client APIs in different languages
What Is CloudState?https://cloudstate.io
![Page 89: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/89.jpg)
Two things:1. Standards Project—defining a specification, protocol, and TCK2. Reference Implementation—backend + client APIs in different languages
Highlights:
What Is CloudState?https://cloudstate.io
![Page 90: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/90.jpg)
Two things:1. Standards Project—defining a specification, protocol, and TCK2. Reference Implementation—backend + client APIs in different languages
Highlights:• Polyglot: Client libs in JavaScript, Java, Go—Python, .NET, Swift, Scala in the works
What Is CloudState?https://cloudstate.io
![Page 91: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/91.jpg)
Two things:1. Standards Project—defining a specification, protocol, and TCK2. Reference Implementation—backend + client APIs in different languages
Highlights:• Polyglot: Client libs in JavaScript, Java, Go—Python, .NET, Swift, Scala in the works • PolyState: Powerful state model—support for Event Sourcing, CRDTs, Key Value
What Is CloudState?https://cloudstate.io
![Page 92: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/92.jpg)
Two things:1. Standards Project—defining a specification, protocol, and TCK2. Reference Implementation—backend + client APIs in different languages
Highlights:• Polyglot: Client libs in JavaScript, Java, Go—Python, .NET, Swift, Scala in the works • PolyState: Powerful state model—support for Event Sourcing, CRDTs, Key Value• PolyDB: Supporting SQL, NoSQL, NewSQL, and in-memory replication
What Is CloudState?https://cloudstate.io
![Page 93: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/93.jpg)
Two things:1. Standards Project—defining a specification, protocol, and TCK2. Reference Implementation—backend + client APIs in different languages
Highlights:• Polyglot: Client libs in JavaScript, Java, Go—Python, .NET, Swift, Scala in the works • PolyState: Powerful state model—support for Event Sourcing, CRDTs, Key Value• PolyDB: Supporting SQL, NoSQL, NewSQL, and in-memory replication• Open Source leveraging Akka, gRPC, Knative, GraalVM, running on Kubernetes
What Is CloudState?https://cloudstate.io
![Page 94: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/94.jpg)
Serving of Stateful Functions
![Page 95: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/95.jpg)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Serving of Stateful Functions
![Page 96: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/96.jpg)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
User Function (JavaScript, Go, Java,…)
Serving of Stateful Functions User Function (JavaScript, Go, Java,…)
User Function (JavaScript, Go, Java,…)
![Page 97: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/97.jpg)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate Proxy
User Function (JavaScript, Go, Java,…)
Serving of Stateful Functions User Function (JavaScript, Go, Java,…)
User Function (JavaScript, Go, Java,…)
![Page 98: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/98.jpg)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate Proxy
User Function (JavaScript, Go, Java,…)
Serving of Stateful Functions User Function (JavaScript, Go, Java,…)
User Function (JavaScript, Go, Java,…)
![Page 99: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/99.jpg)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate Proxy
User Function (JavaScript, Go, Java,…)
Serving of Stateful Functions User Function (JavaScript, Go, Java,…)
User Function (JavaScript, Go, Java,…)
gRPC
![Page 100: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/100.jpg)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate Proxy
User Function (JavaScript, Go, Java,…)
Serving of Stateful Functions User Function (JavaScript, Go, Java,…)
User Function (JavaScript, Go, Java,…)
Datastore (Cassandra, Postgres, Spanner,…)
gRPC
![Page 101: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/101.jpg)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate proxy
User Function (JavaScript, Go, Java,…)
Powered by Akka Cluster Sidecars
User Function (JavaScript, Go, Java,…)
User Function (JavaScript, Go, Java,…)
Datastore (Cassandra, Postgres, Spanner,…)
![Page 102: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/102.jpg)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate proxy
User Function (JavaScript, Go, Java,…)
Powered by Akka Cluster Sidecars
User Function (JavaScript, Go, Java,…)
User Function (JavaScript, Go, Java,…)
Akka Sidecar
Akka Sidecar
Akka Sidecar
Datastore (Cassandra, Postgres, Spanner,…)
![Page 103: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/103.jpg)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate proxy
User Function (JavaScript, Go, Java,…)
Powered by Akka Cluster Sidecars
User Function (JavaScript, Go, Java,…)
User Function (JavaScript, Go, Java,…)
Akka Sidecar
Akka Sidecar
Akka Sidecar
Datastore (Cassandra, Postgres, Spanner,…)
gRPC
![Page 104: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/104.jpg)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate proxy
User Function (JavaScript, Go, Java,…)
Powered by Akka Cluster Sidecars
User Function (JavaScript, Go, Java,…)
User Function (JavaScript, Go, Java,…)
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Datastore (Cassandra, Postgres, Spanner,…)
gRPC
![Page 105: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/105.jpg)
Kubernetes Pod
Kubernetes Pod
Kubernetes Pod
Cloudstate proxy
User Function (JavaScript, Go, Java,…)
Powered by Akka Cluster Sidecars
User Function (JavaScript, Go, Java,…)
User Function (JavaScript, Go, Java,…)
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Datastore (Cassandra, Postgres, Spanner,…)
gRPC
![Page 106: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/106.jpg)
Akka Cluster state management
![Page 107: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/107.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime
![Page 108: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/108.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime• Dynamo-style Node Ring
![Page 109: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/109.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime• Dynamo-style Node Ring• Decentralized Masterless P2P
![Page 110: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/110.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime• Dynamo-style Node Ring• Decentralized Masterless P2P• Epidemic Gossiping, Self-healing
![Page 111: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/111.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime• Dynamo-style Node Ring• Decentralized Masterless P2P• Epidemic Gossiping, Self-healing• State Sharding & Routing on Entity Key
(Key, State)
![Page 112: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/112.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime• Dynamo-style Node Ring• Decentralized Masterless P2P• Epidemic Gossiping, Self-healing• State Sharding & Routing on Entity Key• Forwarding of Requests (if needed)
(Key, State)
(Key, State)
![Page 113: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/113.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime• Dynamo-style Node Ring• 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)
![Page 114: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/114.jpg)
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• Dynamo-style Node Ring• 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)
![Page 115: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/115.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Event Log
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime• Dynamo-style Node Ring• 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)
![Page 116: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/116.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Event Log
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime• Dynamo-style Node Ring• 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)
![Page 117: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/117.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Event Log
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime• Dynamo-style Node Ring• 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)
![Page 118: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/118.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Event Log
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime• Dynamo-style Node Ring• 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)
(Key, State)
![Page 119: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/119.jpg)
Akka Cluster state management
Akka Sidecar
Akka Sidecar
Akka Sidecar
Akka Cluster
Event Log
Akka Sidecar
Akka Sidecar
Akka Sidecar
• Actor-based Distributed Runtime• Dynamo-style Node Ring• 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)
(Key, State)
https://akka.io
![Page 120: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/120.jpg)
In Summary
![Page 121: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/121.jpg)
1. The promise of Serverless is revolutionary and will grow to dominate the future of Cloud
In Summary
![Page 122: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/122.jpg)
1. The promise of Serverless is revolutionary and will grow to dominate the future of Cloud
2. FaaS is a great first step, but let’s not stop here
In Summary
![Page 123: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/123.jpg)
1. The promise of Serverless is revolutionary and will grow to dominate the future of Cloud
2. FaaS is a great first step, but let’s not stop here3. Serverless 2.0 needs a runtime & programming
model for general-purpose application development
In Summary
![Page 124: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/124.jpg)
1. The promise of Serverless is revolutionary and will grow to dominate the future of Cloud
2. FaaS is a great first step, but let’s not stop here3. Serverless 2.0 needs a runtime & programming
model for general-purpose application development4. We can’t ignore/delegate the hardest thing: State
In Summary
![Page 125: HPTS - Towards Stateful Serverless · Graphs (that all compose) CRDT ACID 2.0 Strong Eventual Consistency Replicated & Decentralized Always Converge Correctly Monotonic Merge Function](https://reader034.vdocuments.mx/reader034/viewer/2022052611/5f04000f7e708231d40bd2a6/html5/thumbnails/125.jpg)
1. The promise of Serverless is revolutionary and will grow to dominate the future of Cloud
2. FaaS is a great first step, but let’s not stop here3. Serverless 2.0 needs a runtime & programming
model for general-purpose application development4. We can’t ignore/delegate the hardest thing: State5. We think that Cloudstate shows the way
In Summary