Slide 1

Slide 1 text

Tackling the 
 The Cloud to Edge Continuum Jonas Bonér 
 @jboner

Slide 2

Slide 2 text

Today’s Cloud Infrastructure is Great

Slide 3

Slide 3 text

Today’s Cloud Infrastructure is Complex

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

The Promise of the Serverless DX 
 is Revolutionary

Slide 7

Slide 7 text

ZeroOps Means Less Complexity Your Function Your Function Your Function Your Function Cache Database Event Broker

Slide 8

Slide 8 text

…but can quickly become a complex integration project Even if all the APIs are Serverless themselves

Slide 9

Slide 9 text

Can we do be tt er? What lies beyond Serverless?

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

Civilization advances by extending the number of important operations which we can perform without thinking of them. “ Alfred North Whitehead

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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)

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

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…

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

Freedom is not so much the absence of restrictions as finding the right ones, the liberating restrictions. “ Timothy Keller

Slide 21

Slide 21 text

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:

Slide 22

Slide 22 text

• 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)

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

How do you build a service? 3 2 1 State model API description Business logic

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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" };

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

State is injected into the function on an as-needed basis Event In User Function Deployment Event Out State In State Out

Slide 29

Slide 29 text

If the Function manages the state, It is A Black BoX To the runtime The Problem

Slide 30

Slide 30 text

The Problem Unconstrained database access Makes it hard to Automate operations

Slide 31

Slide 31 text

Under the hood Execution cluster Project Service State proxy User code Linkerd

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

Thank You Learn more at kalix.io