Tackling the


The Cloud to Edge
Continuum
Jonas Bonér


@jboner
Today’s


Cloud Infrastructure is


Great
Today’s


Cloud Infrastructure is


Complex
…the options
can be
overwhelming
CNCF: Cloud Native Interactive Landscape - https://landscape.cncf.io/
Are You Stuck


with an enterprise stack


where you have to manage


Everything Yourself?
Load Balancer
Ingress Router
Cache Cache
Your App Your App
Event Broker
Database Database
Cache Cache
Your App Your App
Event Broker
Database Database
The Promise of the
Serverless DX


is Revolutionary
ZeroOps
Means Less
Complexity
Your Function
Your Function
Your Function
Your Function
Cache
Database
Event Broker
…but can quickly
become a complex
integration project
Even if all
the APIs are


Serverless
themselves
Can we do be
tt
er?


What lies beyond Serverless?
The need for Vertical Integration
There are already too many primitives for engineers to deeply
understand and manage them all, and more arrive by the day.


And even if that were not the case, there is too little upside for the
overwhelming majority of organizations to select, implement,
integrate, operate and secure every last component or service.


Time spent managing enterprise infrastructure minutiae is time not
spent building out its own business.
“
Stephen O’Grady, RedMonk
Vertical Integration: The Collision
of App Platforms and Database
Civilization advances by extending the
number of important operations which we
can perform without thinking of them.
“
Alfred North Whitehead
Self-Managed On-Prem
Application
Business Logic
Frameworks
Database
Transport
Security
Infrastructure
Kubernetes
Operating System
Virtualization
Servers, Storage,
Networking
In the Cloud
Kubernetes
Operating System
Virtualization
Servers, Storage,
Networking
Application
Business Logic
Frameworks
Database
Transport
Security
Infrastructure
What We Need
Application
Business Logic
Frameworks
Database
Transport
Security
Kubernetes
Operating System
Virtualization
Servers, Storage,
Networking
Infrastructure
From Serverless to Databaseless
Managed by Cloud /
Service Provider
Customer
Managed
Edge Computing
Edge Computing is actually being implemented today in many
of our clients’ environments, […] enabling entirely new
applications and data models.


Simply put, Edge has moved from concept and hype into
successful vertical industry implementations, with general
purpose platform status approaching rapidly.
“
Bob Gill


Gartner (Oct. 2021)
The Edge is already here
• Telco, Cloud, and CDN companies are building out the infrastructure


• 5G and Local-first software is changing the game


• Customers demand that we move data and compute closer to end-user—
for lower latency, better availability, and more advanced use-cases


• We are moving beyond edge computing—towards stateful and a holistic
view on data and compute


• Huge market on the rise: $4.6B in 2020 to $61.1B (CAGR 38.4%) - Gartner
It’s just not fully leveraged
Edge use-cases
• Autonomous vehicles


• Retail & E-commerce


• Trading systems


• Health care


• Emergency services


• Factories


• Stadium events


(sport, concerts)


• Gaming


• Farming


• Financial services


• Smart homes


• And more…
Tsunami Warning
• Gartner predicts that by 2025, 75% of enterprise-generated data
will be created & processed on the Edge (10% today)


• This requires:


• Keeping as much data on the Edge as possible


• Move processing to the Edge


• Benefits:


• Real-time processing, lower latency, faster answers


• Resilient, not relying on stable connection to cloud


• More resource efficient, less data shipping
https://www.gartner.com/smarterwithgartner/what-edge-computing-means-for-infrastructure-and-operations-leaders
Hierarchical Layers
from Cloud to Device
Opportunities
and limitations
Further out (towards devices):


• 10,000s to 100,000s of PoPs to coordinate


• Unreliable networks & hardware


• Limited resources & compute power


• Real-time, low latency processing


• Needs weaker consistency/guarantees


• Local, faster, less accurate decisions


• More resilient & available


• Requires
fi
ne-grained data replication


and mobility
Further in (towards cloud):


• 10s to 1000s of nodes to coordinate


• Reasonably reliable networks & hardware


• Vast resources & compute power


• Batch, high latency processing


• Allows stronger consistency/guarantees


• Global, slower, but “better” decisions


• Less resilient & available


• Coarse-grained data replication possible,


data can be stationary
Technical Requirements
• Autonomous self-organising components


• Physical co-location of data, compute, end-user


• Intelligent and adaptive placement of data, compute, end-user


• Local-first cooperation (function just fine without backend cloud)


• Fine-grained and adaptive replication (row-level)


• Consistency a la carte—Eventual, Causal, Strong


• Options for “state models” (“shapes”)—SQL, Event Sourcing, CRDTs,


Views, Streaming


• End-to-end guarantees of SLAs, business rules, and data integrity
My vision of a
• Cloud to Edge is a continuum


• Powering location transparent services that can run anywhere


–from public Cloud to 100,000 of PoPs at the Edge


• Should not be a design, development, or even deployment decision


• Data always exists wherever and whenever needed, and only for the time it is needed


• Data and compute moves adaptively, together with the end-user


• Data is always co-located with processing and end-user


—ensuring ultra low latency, high throughput and resilience


• Data is injected into the services on an as-needed basis


—automatically, timely, efficiently, and intelligently
Cloud to Edge Data Plane
Freedom is not so much the absence
of restrictions as finding the right
ones, the liberating restrictions.
“
Timothy Keller
Distilling the Ultimate
Cloud to Edge Programming Model
1. Data model


• How to model the business data


• Its structure, constraints, guarantees, and query model


2. API


• How to communicate/coordinate services and outside world


3. Business logic


• How to mine intelligence, act, and operate on the data


• Transform, downsample, relay, and trigger side-effects 


• Using work
fl
ow, point-to-point, pub-sub, streaming, broadcast
The rest can (and should) be fully managed and automated
by the underlying platform
3 things we as developers can never delegate:
• Fully managed developer PaaS—for building real-time event-driven Cloud Native
and Edge Native applications


• Beyond Serverless—abstracts away ALL infrastructure into a single declarative
programming model (DB, event broker, cache, API gateway, service mesh, security, …)


• Polyglot—use it from Java, Javascript, Typescript, Scala, Python, Go, and more


• Unifies Cloud Native and Edge Native development in a Cloud-to-Edge Data Plane


• Reactive at its core—low latency, high throughput, always available, adaptive scaling,
co-location of data and compute (built on Akka, gRPC, Kubernetes)
Application
Business Logic
Frameworks
Database
Transport
Security
Infrastructure
Kubernetes
Operating System
Virtualization
Servers, Storage,
Networking
Kalix
Kubernetes
Operating System
Virtualization
Servers, Storage,
Networking
Application
Business Logic
Frameworks
Database
Transport
Security
Infrastructure
Application
Business Logic
Frameworks
Database
Transport
Security
Kubernetes
Operating System
Virtualization
Servers, Storage,
Networking
Infrastructure
Vertical Integration As a Service
Managed by Cloud /
Service Provider
Customer
Managed
How do you build a service?
3
2
1
State model
API description Business logic
Step 1: Define API and data
service ShoppingCart {
rpc AddItem(AddLineItem) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/ShoppingCart/cart/{user_id}/items/add",
body: "*",
};


}


…
}
message AddLineItem {
string user_id = 1 [(kalix.field).entity_key = true];
string product_id = 2;
}
option (kalix.method).eventing = {


in: { event_log: "shopping-cart" }


out: { topic: "shopping-cart-events" }


};
Schema-
fi
rst: Declarative con
fi
guration in Protobuf
Step 2: Define state model
option (kalix.codegen) = {


value_entity: {


…


}


}
rpc GetCarts(GetCartsRequest) returns (stream Carts) {


option (kalix.method).view = {


query: "select * from carts where userid = :userid"


};


}


…


option (kalix.codegen) = {


event_sourced_entity: {


…


}


}
option (google.api.http) = {


get: "/carts"


};
Step 3: Write business logic
// Tie the gRPC service to a JS function


entity.setBehavior(cart => {


return {


commandHandlers: {


AddItem: addItem,


}


});




// Business logic


function addItem(addItem, cart, ctx) {


console.log("addItem", addItem);


}


Event
State
Context
Event and State injected into the function
Choose language and write the function
State is injected into the function on an as-needed basis
Event In
User Function
Deployment
Event Out
State In State Out
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
Under the hood
Execution cluster
Project
Service
State proxy User code
Linkerd
In Summary
Cloud development is too complex


• Serverless is promising, but currently falls short


• We need to continue to climb the ladder of abstractions


• We need Vertical Integration not an integration project


Edge Computing is already here


• Opens up a new world of possibilities and challenges


• We need to see Cloud and Edge as a continuum


• Apps soon need to be both Cloud Native and Edge Native


• We need to a new Programming Model and DX


designed to serve this Cloud to Edge continuum


Kalix is here to help:


• Polyglot, real-time, event-driven, reactive, zero-ops PaaS


• Adaptive, resilient, and scalable Cloud-to-Edge Data Plane


• Use it in the Cloud today, but be ready for future Edge use-cases
Thank You
Learn more at kalix.io

Kalix: Tackling the The Cloud to Edge Continuum

  • 1.
    Tackling the 
 The Cloudto Edge Continuum Jonas Bonér 
 @jboner
  • 2.
  • 3.
  • 4.
    …the options can be overwhelming CNCF:Cloud Native Interactive Landscape - https://landscape.cncf.io/
  • 5.
    Are You Stuck 
 withan enterprise stack 
 where you have to manage 
 Everything Yourself? Load Balancer Ingress Router Cache Cache Your App Your App Event Broker Database Database Cache Cache Your App Your App Event Broker Database Database
  • 6.
    The Promise ofthe Serverless DX 
 is Revolutionary
  • 7.
    ZeroOps Means Less Complexity Your Function YourFunction Your Function Your Function Cache Database Event Broker
  • 8.
    …but can quickly becomea complex integration project Even if all the APIs are Serverless themselves
  • 9.
    Can we dobe tt er? What lies beyond Serverless?
  • 10.
    The need forVertical Integration There are already too many primitives for engineers to deeply understand and manage them all, and more arrive by the day. And even if that were not the case, there is too little upside for the overwhelming majority of organizations to select, implement, integrate, operate and secure every last component or service. Time spent managing enterprise infrastructure minutiae is time not spent building out its own business. “ Stephen O’Grady, RedMonk Vertical Integration: The Collision of App Platforms and Database
  • 11.
    Civilization advances byextending the number of important operations which we can perform without thinking of them. “ Alfred North Whitehead
  • 12.
    Self-Managed On-Prem Application Business Logic Frameworks Database Transport Security Infrastructure Kubernetes OperatingSystem Virtualization Servers, Storage, Networking In the Cloud Kubernetes Operating System Virtualization Servers, Storage, Networking Application Business Logic Frameworks Database Transport Security Infrastructure What We Need Application Business Logic Frameworks Database Transport Security Kubernetes Operating System Virtualization Servers, Storage, Networking Infrastructure From Serverless to Databaseless Managed by Cloud / Service Provider Customer Managed
  • 13.
    Edge Computing Edge Computingis actually being implemented today in many of our clients’ environments, […] enabling entirely new applications and data models. Simply put, Edge has moved from concept and hype into successful vertical industry implementations, with general purpose platform status approaching rapidly. “ Bob Gill 
 Gartner (Oct. 2021)
  • 14.
    The Edge isalready here • Telco, Cloud, and CDN companies are building out the infrastructure • 5G and Local-first software is changing the game • Customers demand that we move data and compute closer to end-user— for lower latency, better availability, and more advanced use-cases • We are moving beyond edge computing—towards stateful and a holistic view on data and compute • Huge market on the rise: $4.6B in 2020 to $61.1B (CAGR 38.4%) - Gartner It’s just not fully leveraged
  • 15.
    Edge use-cases • Autonomousvehicles • Retail & E-commerce • Trading systems • Health care • Emergency services • Factories • Stadium events 
 (sport, concerts) • Gaming • Farming • Financial services • Smart homes • And more…
  • 16.
    Tsunami Warning • Gartnerpredicts that by 2025, 75% of enterprise-generated data will be created & processed on the Edge (10% today) • This requires: • Keeping as much data on the Edge as possible • Move processing to the Edge • Benefits: • Real-time processing, lower latency, faster answers • Resilient, not relying on stable connection to cloud • More resource efficient, less data shipping https://www.gartner.com/smarterwithgartner/what-edge-computing-means-for-infrastructure-and-operations-leaders
  • 17.
    Hierarchical Layers from Cloudto Device Opportunities and limitations Further out (towards devices): • 10,000s to 100,000s of PoPs to coordinate • Unreliable networks & hardware • Limited resources & compute power • Real-time, low latency processing • Needs weaker consistency/guarantees • Local, faster, less accurate decisions • More resilient & available • Requires fi ne-grained data replication 
 and mobility Further in (towards cloud): • 10s to 1000s of nodes to coordinate • Reasonably reliable networks & hardware • Vast resources & compute power • Batch, high latency processing • Allows stronger consistency/guarantees • Global, slower, but “better” decisions • Less resilient & available • Coarse-grained data replication possible, 
 data can be stationary
  • 18.
    Technical Requirements • Autonomousself-organising components • Physical co-location of data, compute, end-user • Intelligent and adaptive placement of data, compute, end-user • Local-first cooperation (function just fine without backend cloud) • Fine-grained and adaptive replication (row-level) • Consistency a la carte—Eventual, Causal, Strong • Options for “state models” (“shapes”)—SQL, Event Sourcing, CRDTs, 
 Views, Streaming • End-to-end guarantees of SLAs, business rules, and data integrity
  • 19.
    My vision ofa • Cloud to Edge is a continuum • Powering location transparent services that can run anywhere 
 –from public Cloud to 100,000 of PoPs at the Edge • Should not be a design, development, or even deployment decision • Data always exists wherever and whenever needed, and only for the time it is needed • Data and compute moves adaptively, together with the end-user • Data is always co-located with processing and end-user 
 —ensuring ultra low latency, high throughput and resilience • Data is injected into the services on an as-needed basis 
 —automatically, timely, efficiently, and intelligently Cloud to Edge Data Plane
  • 20.
    Freedom is notso much the absence of restrictions as finding the right ones, the liberating restrictions. “ Timothy Keller
  • 21.
    Distilling the Ultimate Cloudto Edge Programming Model 1. Data model • How to model the business data • Its structure, constraints, guarantees, and query model 2. API • How to communicate/coordinate services and outside world 3. Business logic • How to mine intelligence, act, and operate on the data • Transform, downsample, relay, and trigger side-effects  • Using work fl ow, point-to-point, pub-sub, streaming, broadcast The rest can (and should) be fully managed and automated by the underlying platform 3 things we as developers can never delegate:
  • 22.
    • Fully manageddeveloper PaaS—for building real-time event-driven Cloud Native and Edge Native applications • Beyond Serverless—abstracts away ALL infrastructure into a single declarative programming model (DB, event broker, cache, API gateway, service mesh, security, …) • Polyglot—use it from Java, Javascript, Typescript, Scala, Python, Go, and more • Unifies Cloud Native and Edge Native development in a Cloud-to-Edge Data Plane • Reactive at its core—low latency, high throughput, always available, adaptive scaling, co-location of data and compute (built on Akka, gRPC, Kubernetes)
  • 23.
    Application Business Logic Frameworks Database Transport Security Infrastructure Kubernetes Operating System Virtualization Servers,Storage, Networking Kalix Kubernetes Operating System Virtualization Servers, Storage, Networking Application Business Logic Frameworks Database Transport Security Infrastructure Application Business Logic Frameworks Database Transport Security Kubernetes Operating System Virtualization Servers, Storage, Networking Infrastructure Vertical Integration As a Service Managed by Cloud / Service Provider Customer Managed
  • 24.
    How do youbuild a service? 3 2 1 State model API description Business logic
  • 25.
    Step 1: DefineAPI and data service ShoppingCart { rpc AddItem(AddLineItem) returns (google.protobuf.Empty) { option (google.api.http) = { post: "/ShoppingCart/cart/{user_id}/items/add", body: "*", }; } … } message AddLineItem { string user_id = 1 [(kalix.field).entity_key = true]; string product_id = 2; } option (kalix.method).eventing = { in: { event_log: "shopping-cart" } out: { topic: "shopping-cart-events" } }; Schema- fi rst: Declarative con fi guration in Protobuf
  • 26.
    Step 2: Definestate model option (kalix.codegen) = { value_entity: { … } } rpc GetCarts(GetCartsRequest) returns (stream Carts) { option (kalix.method).view = { query: "select * from carts where userid = :userid" }; } … option (kalix.codegen) = { event_sourced_entity: { … } } option (google.api.http) = { get: "/carts" };
  • 27.
    Step 3: Writebusiness logic // Tie the gRPC service to a JS function entity.setBehavior(cart => { 
 return { commandHandlers: { AddItem: addItem, } }); // Business logic function addItem(addItem, cart, ctx) { console.log("addItem", addItem); } Event State Context Event and State injected into the function Choose language and write the function
  • 28.
    State is injectedinto the function on an as-needed basis Event In User Function Deployment Event Out State In State Out
  • 29.
    If the Functionmanages the state, It is A Black BoX To the runtime The Problem
  • 30.
    The Problem Unconstrained databaseaccess Makes it hard to Automate operations
  • 31.
    Under the hood Executioncluster Project Service State proxy User code Linkerd
  • 32.
    In Summary Cloud developmentis too complex • Serverless is promising, but currently falls short • We need to continue to climb the ladder of abstractions • We need Vertical Integration not an integration project Edge Computing is already here • Opens up a new world of possibilities and challenges • We need to see Cloud and Edge as a continuum • Apps soon need to be both Cloud Native and Edge Native • We need to a new Programming Model and DX 
 designed to serve this Cloud to Edge continuum Kalix is here to help: • Polyglot, real-time, event-driven, reactive, zero-ops PaaS • Adaptive, resilient, and scalable Cloud-to-Edge Data Plane • Use it in the Cloud today, but be ready for future Edge use-cases
  • 33.