Living On the Edge ๐ŸŒโšกA Brave New (Post-Cloud) World ๐Ÿ›ฐโœจ

[โ€ฆ] by 2025, 75% of data will be processed outside the traditional data centre or cloud ~ IBM (paraphrasing a Gartner study)

Brooklyn Zelenka @expede

Brooklyn Zelenka @expede โ€ข CTO at Fission โ€ข https://fission.codes โ€ข Infra & browser SDK for edge apps โ€ข PLT, distributed systems โ€ข Specs: DIF, ETH Core โ€ข Meetups: Vancouver FP, Code & Co ee YVR ff โ€ข Libs: Witchcraft, Exceptional, Rescue, &c

WebNative ๐Ÿš€ Meta ๐Ÿ”ฎ โ€ข R&D from Fission & others โ€ข Future looking / an emerging area โ€ข Interesting tech, very exciting โ€ข โ€ฆbut not all problems solved today โ€ข Some advantages to flexible tech even before the network changes โ€ข Universal Hostless Substrate (2019)

WebNative ๐Ÿš€ Meta ๐Ÿ”ฎ โ€ข R&D from Fission & others โ€ข Future looking / an emerging area โ€ข Interesting tech, very exciting โ€ข โ€ฆbut not all problems solved today โ€ข Some advantages to flexible tech even before the network changes โ€ข Universal Hostless Substrate (2019)

WebNative ๐Ÿš€ Fission R&D โ€ข Local first โ€ข Edge only โ€ข No servers โ€ข Fully distributed โ€ข Encrypted at Rest, E2EE โ€ข User owned data @FISSIONCodes

WebNative ๐Ÿš€ Overview Part I: Motivation Part II: On the Edge How we got here Why BEAM What changed? Primer All About Data A Few Techniques

Part I Motivation ๐ŸŽญ

Motivation ๐ŸŽญ 90s Web

Motivation ๐ŸŽญ 90s Web ๐Ÿ’ ๐Ÿ–ฅ

Motivation ๐ŸŽญ 90s Web ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿข

Motivation ๐ŸŽญ 90s Web ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿข ๐Ÿ—ƒ

Motivation ๐ŸŽญ 90s Web ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿข โš™ ๐Ÿ—ƒ

Motivation ๐ŸŽญ 90s Web ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿข โš™ ๐Ÿ’ช ๐Ÿ—ƒ

Motivation ๐ŸŽญ 90s Web ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿข โš™ ๐Ÿ’ช ๐Ÿ—ƒ

Motivation ๐ŸŽญ 90s Web ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿข โš™ ๐Ÿ’ช ๐Ÿ—ƒ

Motivation ๐ŸŽญ 90s Web ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿข โš™ ๐Ÿ’ช ๐Ÿ—ƒ

Motivation ๐ŸŽญ 90s Web ๐Ÿ’ ๐Ÿ’ ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿข ๐Ÿ–ฅ ๐Ÿ–ฅ โš™ ๐Ÿ’ช ๐Ÿ—ƒ

Motivation ๐ŸŽญ 90s Web ๐Ÿ’ ๐Ÿ’ ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿข ๐Ÿ–ฅ ๐Ÿ–ฅ โš™ ๐Ÿ’ช ๐Ÿ” ๐Ÿ—ƒ

Motivation ๐ŸŽญ Scaling Up ๐Ÿ’ ๐Ÿ’ ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿ–ฅ ๐Ÿ–ฅ ๐Ÿ™ โš™ โš™ โš™ ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ—ƒ ๐Ÿ—ƒ ๐Ÿ—ƒ

Motivation ๐ŸŽญ Scaling Up ๐Ÿ’ ๐Ÿ’ ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿ–ฅ ๐Ÿ–ฅ ๐Ÿ™ โš™ โš™ โš™ ๐Ÿ” ๐Ÿ” ๐Ÿ” ๐Ÿ—ƒ ๐Ÿ—ƒ ๐Ÿ—ƒ

Motivation ๐ŸŽญ Scaling Up ๐Ÿ’ ๐Ÿ’ ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿ–ฅ ๐Ÿ–ฅ โš™ ๐Ÿ—ƒ โ€œThe Cloudโ€ ๐Ÿ” ๐Ÿ™โ˜โ˜โ˜โ˜โ˜โ˜ โš™ ๐Ÿ—ƒ ๐Ÿ” โš™ ๐Ÿ—ƒ ๐Ÿ”

Motivation ๐ŸŽญ Abstracting ๐Ÿ’ ๐Ÿ’ ๐Ÿ’ ๐Ÿ–ฅ ๐Ÿ–ฅ ๐Ÿ–ฅ โš™ ๐Ÿ—ƒ โ€œServerlessโ€ ๐Ÿ” ๐Ÿ™ โš™ ๐Ÿ—ƒ ฮปฮปฮปฮปฮปฮปฮปฮปฮปฮปฮปฮปฮป ๐Ÿ” โš™ ๐Ÿ—ƒ ๐Ÿ”

โ€ฆand so it was for many yearsโ€ฆ

โ€ฆand so it was for many yearsโ€ฆ ๐Ÿฆ–โ˜„๐ŸŒ‹๐ŸŒพ๐Ÿฐ๐Ÿข๐Ÿš€

Motivation ๐ŸŽญ Natural Consequences ๐Ÿƒ

Motivation ๐ŸŽญ Natural Consequences ๐Ÿƒ โ€ข Server-focus โ€ข More stack to learn โ€ข DevOps, Docker, k8s

Motivation ๐ŸŽญ Natural Consequences ๐Ÿƒ โ€ข Server-focus โ€ข More stack to learn โ€ข DevOps, Docker, k8s โ€ข Single source of truth โ€ข i.e. โ€œthe databaseโ€

Motivation ๐ŸŽญ Natural Consequences ๐Ÿƒ โ€ข Server-focus โ€ข More stack to learn โ€ข DevOps, Docker, k8s โ€ข Single source of truth โ€ข i.e. โ€œthe databaseโ€ โ€ข Client concerned with data sync

Motivation ๐ŸŽญ Natural Consequences ๐Ÿƒ โ€ข Server-focus โ€ข More stack to learn โ€ข DevOps, Docker, k8s โ€ข Single source of truth โ€ข i.e. โ€œthe databaseโ€ โ€ข Client concerned with data sync โ€ข AWS, Azure, GCP

Motivation ๐ŸŽญ Natural Consequences ๐Ÿƒ โ€ข Server-focus โ€ข More stack to learn โ€ข DevOps, Docker, k8s โ€ข Single source of truth โ€ข i.e. โ€œthe databaseโ€ โ€ข Client concerned with data sync f โ€ข AWS, Azure, GCP Source: 2021 Stack Over low Developer Survey

Motivation ๐ŸŽญ Sending a โ€œDirectโ€ Message

Motivation ๐ŸŽญ Sending a โ€œDirectโ€ Message

Motivation ๐ŸŽญ Sending a โ€œDirectโ€ Message

Motivation ๐ŸŽญ Sending a โ€œDirectโ€ Message

Motivation ๐ŸŽญ What Even is a โ€œServerโ€? ๐Ÿง

  1. Auth gatekeeper (because multi-tenant data) 2. Resource availability 3. Out-of-band compute (e.g. batch tasks, cron, OLAP)

Motivation ๐ŸŽญ Network Topology ๐Ÿง 

Motivation ๐ŸŽญ Network Topology ๐Ÿง  โš™

Motivation ๐ŸŽญ Network Topology ๐Ÿง  โš™ ๐Ÿ‘จ๐ŸŽค ๐Ÿ‘ฉ๐ŸŒพ Centralized ๐Ÿง‘๐ŸŽจ

Motivation ๐ŸŽญ Network Topology ๐Ÿง  ๐Ÿ’พ โš™ ๐Ÿ‘จ๐ŸŽค ๐Ÿ‘ฉ๐ŸŒพ Centralized ๐Ÿง‘๐ŸŽจ โš™ ๐Ÿค– ๐Ÿ› 

Motivation ๐ŸŽญ Network Topology ๐Ÿง  ๐Ÿ’พ โš™ ๐Ÿ‘จ๐ŸŽค ๐Ÿ‘ฉ๐ŸŒพ Centralized โš™ ๐Ÿค– ๐Ÿ™ ๐Ÿง‘๐ŸŽจ ๐Ÿ› 

Motivation ๐ŸŽญ Network Topology ๐Ÿง  ๐Ÿ’พ โš™ โš™ ๐Ÿ‘จ๐ŸŽค ๐Ÿ‘ฉ๐ŸŒพ Centralized ๐Ÿค– ๐Ÿ›  ๐Ÿ™ ๐Ÿง‘๐ŸŽจ ๐Ÿง‘๐ŸŽจ ๐Ÿ‘ฉ๐ŸŒพ ๐Ÿ‘จ๐ŸŽค Hub (e.g. gateway or load balanced)

Motivation ๐ŸŽญ Network Topology ๐Ÿง  ๐Ÿ’พ โš™ โš™ ๐Ÿ‘จ๐ŸŽค ๐Ÿ‘ฉ๐ŸŒพ Centralized โš™ ๐Ÿค– ๐Ÿ›  ๐Ÿ™ ๐Ÿง‘๐ŸŽจ ๐Ÿง‘๐ŸŽจ ๐Ÿ‘ฉ๐ŸŒพ ๐Ÿ‘จ๐ŸŽค Hub (e.g. gateway or load balanced)

Motivation ๐ŸŽญ Network Topology ๐Ÿง  ๐Ÿ’พ โš™ โš™ ๐Ÿ‘จ๐ŸŽค ๐Ÿ‘ฉ๐ŸŒพ Centralized โš™ ๐Ÿค– ๐Ÿ›  ๐Ÿ™ ๐Ÿง‘๐ŸŽจ ๐Ÿง‘๐ŸŽจ ๐Ÿ‘ฉ๐ŸŒพ ๐Ÿ‘จ๐ŸŽค Hub (e.g. gateway or load balanced) ๐Ÿค– ๐Ÿ’พ

Motivation ๐ŸŽญ Network Topology ๐Ÿง  ๐Ÿ’พ โš™ โš™ ๐Ÿ‘จ๐ŸŽค ๐Ÿ‘ฉ๐ŸŒพ Centralized โš™ ๐Ÿค– ๐Ÿ›  ๐Ÿ™ ๐Ÿง‘๐ŸŽจ ๐Ÿง‘๐ŸŽจ ๐Ÿ‘ฉ๐ŸŒพ ๐Ÿง‘๐ŸŽจ ๐Ÿ‘จ๐ŸŽค Hub (e.g. gateway or load balanced) ๐Ÿค– ๐Ÿ’พ โš™ ๐Ÿ‘จ๐ŸŽค

Motivation ๐ŸŽญ Network Topology ๐Ÿง  ๐Ÿ’พ โš™ โš™ ๐Ÿ‘จ๐ŸŽค ๐Ÿ‘ฉ๐ŸŒพ Centralized โš™ ๐Ÿค– ๐Ÿ›  ๐Ÿ™ ๐Ÿง‘๐ŸŽจ ๐Ÿง‘๐ŸŽจ ๐Ÿ‘ฉ๐ŸŒพ ๐Ÿง‘๐ŸŽจ ๐Ÿ‘จ๐ŸŽค Hub (e.g. gateway or load balanced) ๐Ÿง‘๐ŸŽจ ๐Ÿค– ๐Ÿ’พ โš™ ๐Ÿ‘จ๐ŸŽค ๐Ÿ‘ฉ๐ŸŒพ Hierarchical or pipelined

Motivation ๐ŸŽญ Network Topology ๐Ÿง  ๐Ÿ’พ โš™ โš™ ๐Ÿ‘จ๐ŸŽค ๐Ÿ‘ฉ๐ŸŒพ Centralized โš™ ๐Ÿค– ๐Ÿ›  ๐Ÿ™ ๐Ÿง‘๐ŸŽจ ๐Ÿง‘๐ŸŽจ ๐Ÿ‘ฉ๐ŸŒพ ๐Ÿง‘๐ŸŽจ ๐Ÿ‘จ๐ŸŽค Hub (e.g. gateway or load balanced) ๐Ÿง‘๐ŸŽจ ๐Ÿค– ๐Ÿ’พ โš™ ๐Ÿ‘จ๐ŸŽค ๐Ÿ‘ฉ๐ŸŒพ Hierarchical or pipelined

A Challenger Emerges A New Environment ๐Ÿ›ฐ

New Environment ๐Ÿ›ฐ New Assumptions โ€ข Powerful client devices (e.g. M1 chips, smartphones, IoT) โ€ข Latency is the bottleneck โ€ข Mobile (i.e. smartphone) use only growing โ€ข Lose connection, drop when switching towers โ€ข Do more with the existing physical network โ€ข Not unlike how Mooreโ€™s Law lead to more parallelism

New Environment ๐Ÿ›ฐ New Biz Who Dis?

New Environment ๐Ÿ›ฐ New Biz Who Dis? โ€ข Paradigm shift means new opportunities

New Environment ๐Ÿ›ฐ New Biz Who Dis? โ€ข Paradigm shift means new opportunities โ€ข 5G networks & Starlink โ€ข Put an edge PoP right on the base station โ€ข Low-latency compute across the street

New Environment ๐Ÿ›ฐ New Biz Who Dis? โ€ข Paradigm shift means new opportunities โ€ข 5G networks & Starlink โ€ข Put an edge PoP right on the base station โ€ข Low-latency compute across the street โ€ข Edge PoPs in retail stores (yes really) โ€ข 90% of Americans live <16km from a Walmart โ€ข Walmart has lots of floor space โ€ข Add servers to Walmart = Walmart Edge

A New Environment Low Latency ๐Ÿ‡

Low Latency ๐Ÿ‡ Latency is a Physical Barrier ๐Ÿšง โ€ข Speed of light / speed of causality โ€ข <40ms = edge dominates โ€ข 8ms is ideal โ€ข Ultra Reliable Low Latency (URLLC)

Low Latency ๐Ÿ‡ Latency is a Physical Barrier ๐Ÿšง โ€ข Speed of light / speed of causality โ€ข <40ms = edge dominates โ€ข 8ms is ideal โ€ข Ultra Reliable Low Latency (URLLC) f Source: Ericsson http://cscn2017.ieee-cscn.org/ iles/2017/08/Janne_Peisa_Ericsson_CSCN2017.pdf

Low Latency ๐Ÿ‡ Spherical Cow Assumption ๐Ÿฎ โ€ข No compute, straight line, in a vacuum, guaranteed delivery, etc โ€ข 40ms โ€ข Sรฃo Paulo โžก NYC, Vancouver, Stockholm โ€ข Sรฃo Paulo โŒ Sidney, Tokyo, Seoul Credit: Keenan Crane http://www.cs.cmu.edu/~kmcrane/Projects/ModelRepository/

Low Latency ๐Ÿ‡ Spherical Cow Assumption ๐Ÿฎ โ€ข No compute, straight line, in a vacuum, guaranteed delivery, etc โ€ข 40ms โ€ข Sรฃo Paulo โžก NYC, Vancouver, Stockholm โ€ข Sรฃo Paulo โŒ Sidney, Tokyo, Seoul Credit: Keenan Crane http://www.cs.cmu.edu/~kmcrane/Projects/ModelRepository/

Low Latency ๐Ÿ‡ What 8ms Looks Like

Low Latency ๐Ÿ‡ What 8ms Looks Like Montevideo โžก Rio de Janeiro Ideal Vacuum

Low Latency ๐Ÿ‡ What 8ms Looks Like Montevideo โžก Rio de Janeiro Ideal Vacuum Brasilia ๐Ÿ” Salvador Ideal Vacuum

Low Latency ๐Ÿ‡ What 8ms Looks Like Montevideo โžก Rio de Janeiro Ideal Vacuum Brasilia ๐Ÿ” Salvador Ideal Vacuum Brasilia ๐Ÿ” Barreiras Ideal Fiber

Low Latency ๐Ÿ‡ Causal Islands ๐Ÿ–๐Ÿ

Low Latency ๐Ÿ‡ Causal Islands ๐Ÿ–๐Ÿ

Low Latency ๐Ÿ‡ Causal Islands ๐Ÿ–๐Ÿ

Low Latency ๐Ÿ‡ Causal Islands ๐Ÿ–๐Ÿ

Low Latency ๐Ÿ‡ Light Cone & Relativistic Ordering

Low Latency ๐Ÿ‡ Light Cone & Relativistic Ordering Source: Duesentrieb via Wikimedia Commons

Turning Up High Volume ๐ŸŒŠ

High Volume ๐ŸŒŠ Unprecedented Volume ๐Ÿฆ– โ€ข We have high scale NOW? Only more devices & usage in the future! โ€ข Sensors everywhere: IoT devices, continuous health data โ€ข Geospatial data (e.g. autonomous vehicles, XR)

High Volume ๐ŸŒŠ Feedback Cycle Source: Microsoft โ€ข Remote surgery โ€ข Extended reality โ€ข Location transparency โ€ข Competitive cloud gaming Source: YouTube, South China Morning Post โ€ข Realtime manufacturing โ€ข Continuous ML training Source: Google & Bungie

Sensor data explosion will kill the cloud. Sensors will produce massive amounts of data, but the existing infrastructure will not be able to handle the volumes or the rates [โ€ฆ] We are absolutely going to return to a peer-to-peer computing model [โ€ฆ] not unlike the distributed computing model We are going to move to a world of data-centric programming. ~ a16z, โ€œThe End of Cloud Computingโ€

High Volume ๐ŸŒŠ Edge Absorbs Cloud (and MEC)

High Volume ๐ŸŒŠ Edge Absorbs Cloud (and MEC) ๐Ÿคณ

High Volume ๐ŸŒŠ Edge Absorbs Cloud (and MEC) ๐Ÿคณ ๐Ÿ—ผ ๐Ÿ’พโš™

High Volume ๐ŸŒŠ Edge Absorbs Cloud (and MEC) ๐Ÿคณ ๐Ÿ—ผ ๐Ÿ’พโš™ ๐Ÿข ๐Ÿ’พโš™

High Volume ๐ŸŒŠ Edge Absorbs Cloud (and MEC) ๐Ÿคณ ๐Ÿ›ฐ ๐Ÿ›ฐ ๐Ÿ—ผ ๐Ÿข ๐Ÿ’พโš™ ๐Ÿ’พโš™

High Volume ๐ŸŒŠ Edge Absorbs Cloud (and MEC) ๐Ÿ›ฐ ๐Ÿคณ ๐Ÿ—ผ ๐Ÿ’พโš™ ๐Ÿ›ฐ ๐Ÿ›ฐ ๐Ÿข โ˜ ๐Ÿ’พโš™ ๐Ÿ’พโš™ โš™ ๐Ÿ’พ โš™ ๐Ÿ’พ โš™ ๐Ÿ’พ ๐Ÿ’พโš™ โš™

High Volume ๐ŸŒŠ Edge Absorbs Cloud (and MEC) ๐Ÿ›ฐ Local ๐Ÿคณ First ๐Ÿ—ผ ๐Ÿ’พโš™ ๐Ÿ›ฐ ๐Ÿ›ฐ ๐Ÿข โ˜ ๐Ÿ’พโš™ ๐Ÿ’พโš™ โš™ ๐Ÿ’พ โš™ ๐Ÿ’พ โš™ ๐Ÿ’พ ๐Ÿ’พโš™ โš™

High Volume ๐ŸŒŠ Edge Absorbs Cloud (and MEC) ๐Ÿ›ฐ Local ๐Ÿคณ First Realtime, Storage, Caching, OLTP ๐Ÿ’พโš™ ๐Ÿ—ผ ๐Ÿ›ฐ ๐Ÿ›ฐ ๐Ÿข โ˜ ๐Ÿ’พโš™ ๐Ÿ’พโš™ โš™ ๐Ÿ’พ โš™ ๐Ÿ’พ โš™ ๐Ÿ’พ ๐Ÿ’พโš™ โš™

High Volume ๐ŸŒŠ Edge Absorbs Cloud (and MEC) ๐Ÿ›ฐ Local ๐Ÿคณ First Realtime, Storage, Caching, OLTP ๐Ÿ’พโš™ ๐Ÿ—ผ ๐Ÿ›ฐ Relay, Replication, Consistency, Tasks ๐Ÿข ๐Ÿ’พโš™ ๐Ÿ›ฐ โ˜ ๐Ÿ’พโš™ โš™ ๐Ÿ’พ โš™ ๐Ÿ’พ โš™ ๐Ÿ’พ ๐Ÿ’พโš™ โš™

High Volume ๐ŸŒŠ Edge Absorbs Cloud (and MEC) ๐Ÿ›ฐ Local ๐Ÿคณ First Realtime, Storage, Caching, OLTP ๐Ÿ’พโš™ ๐Ÿ—ผ ๐Ÿ›ฐ Relay, Replication, Consistency, Tasks ๐Ÿข ๐Ÿ’พโš™ ๐Ÿ›ฐ โ˜ Aggregation, Batching, Training, โš™ ๐Ÿ’พ โš™ ๐Ÿ’พ OLAP ๐Ÿ’พโš™ โš™ ๐Ÿ’พ ๐Ÿ’พโš™ โš™

What does this all mean? Consequence ๐Ÿ›ธ

Consequence ๐Ÿ›ธ New Assumptions, New Approach

Consequence ๐Ÿ›ธ New Assumptions, New Approach โ€ข New features naturally fall out of the architecture โ€ข Recognize that weโ€™re increasingly connected/networked โ€ข Local-first means network e cient (in the normal case) ffi โ€ข Data can run anywhere = commons networks

Consequence ๐Ÿ›ธ Tackling the Fallacies

Consequence ๐Ÿ›ธ Tackling the Fallacies Latency is zero Bandwidth is infinite Transport cost is zero The network is secure There is one administrator The network is reliable The network is homogeneous Topology doesnโ€™t change

Consequence ๐Ÿ›ธ Tackling the Fallacies Latency is zero Bandwidth is infinite Transport cost is zero The network is secure There is one administrator The network is reliable The network is homogeneous Topology doesnโ€™t change We need to handle 100% of these up front

Consequence ๐Ÿ›ธ Tackling the Fallacies Latency is zero Treat latency directly (speed of causality) Treat (order of causality / relativistic) Bandwidth is infinite Apps continue to work with zero bandwidth Only push when & what needed Transport cost is zero Minimize network use The network is secure Assume that the pipes are broken Direct access control There is one administrator Fine grained, delegate capabilities (OCAP) The network is reliable Time, delivery, & order independence The network is homogeneous Device agnostic Topology doesnโ€™t change atomic unit is the edge device (same like the atomic unit is the actor)

Consequence ๐Ÿ›ธ Giving Up Topological Control

Consequence ๐Ÿ›ธ Giving Up Topological Control โš™ ๐Ÿ–ฅ ๐Ÿ“ฑ ๐Ÿš™ ๐Ÿ“ฑ ๐Ÿ—ผ ๐Ÿ“ฑ ๐Ÿ’ป ๐Ÿ“ฑ ๐Ÿ“€ ๐Ÿ›ฐ

Consequence ๐Ÿ›ธ Data, Data, Data ๐Ÿ’พ

Consequence ๐Ÿ›ธ Data, Data, Data ๐Ÿ’พ โ€ข Only UI & data are essential

Consequence ๐Ÿ›ธ Data, Data, Data ๐Ÿ’พ โ€ข Only UI & data are essential โ€ข New primitives โ€ข Consistency (CRDTs, STM, Distributed Datalog) โ€ข State transfer โžก state synchronization โžก state views

Consequence ๐Ÿ›ธ Data, Data, Data ๐Ÿ’พ โ€ข Only UI & data are essential โ€ข New primitives โ€ข Consistency (CRDTs, STM, Distributed Datalog) โ€ข State transfer โžก state synchronization โžก state views โ€ข Access control needs to be inherent โ€ข OCAP & CBC methods (AKA cryptography)

Part II On the Edge ๐Ÿง—

On the Edge ๐Ÿง— Why Functional Programming โ€ข Data-oriented โ€ข Pure functions on data is just data โ€ข Shared nothing architectures โ€ข Immutability, easy concurrency โ€ข Manage complexity by being declarative โ€ข What > how โ€ข Data > process

On the Edge ๐Ÿง— Why the BEAM Specifically โ€ข Low conceptual distance from actor model to OCAP โ€ข Community experience with distributed systems โ€ข Used to building up complexity from simple parts โ€ข Weโ€™re already using a bunch of this! โ€ข e.g. Phoenix Presence ๐Ÿ‘‰ ๐Ÿ‘‰ ๐Ÿ‘‰

Whatโ€™s special about Phoenixโ€™s implementation is we have a system that applies cutting edge CS research to tackle day-to-day problems in the applications we all write. Phoenix Presence - has no single point of failure - has no single source of truth - relies entirely on the standard library with no operational dependencies - self heals ~ Chris McCord, โ€œWhat Makes Phoenix Presence Specialโ€

What if we turn Phoenix Live View Upside Down? ๐Ÿ”

On the Edge ๐Ÿง— Phoenix LiveView

On the Edge ๐Ÿง— Phoenix LiveView Users ๐Ÿ‘จ๐Ÿซ๐Ÿ‘ฉ๐Ÿญ๐Ÿง‘โš•๐Ÿ‘ท Client ๐Ÿ–ฅ WSS / REST / GraphQL โ†• Controller Logic โš™ Data Store ๐Ÿ—ƒ DevOps ๐Ÿ“ค Developer ๐Ÿ‘ฉ๐Ÿ’ป

On the Edge ๐Ÿง— Phoenix LiveView Users ๐Ÿ‘จ๐Ÿซ๐Ÿ‘ฉ๐Ÿญ๐Ÿง‘โš•๐Ÿ‘ท Client ๐Ÿ–ฅ WSS / REST / GraphQL โ†• Controller Logic โš™ Data Store ๐Ÿ—ƒ DevOps ๐Ÿ“ค Developer ๐Ÿ‘ฉ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿ’พ

On the Edge ๐Ÿง— Phoenix LiveView Users ๐Ÿ‘จ๐Ÿซ๐Ÿ‘ฉ๐Ÿญ๐Ÿง‘โš•๐Ÿ‘ท Client ๐Ÿ–ฅ โš™ WSS / REST / GraphQL โ†• Controller Logic โš™ Data Store ๐Ÿ—ƒ DevOps ๐Ÿ“ค Developer ๐Ÿ‘ฉ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿ’พ ๐Ÿ—ƒ

On the Edge ๐Ÿง— Phoenix LiveView Users ๐Ÿ‘จ๐Ÿซ๐Ÿ‘ฉ๐Ÿญ๐Ÿง‘โš•๐Ÿ‘ท Client ๐Ÿ–ฅ ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ ๐Ÿ—ƒ โš™ WSS / REST / GraphQL โ†• Controller Logic โš™ Data Store ๐Ÿ—ƒ DevOps ๐Ÿ“ค Developer ๐Ÿ‘ฉ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿ’พ

On the Edge ๐Ÿง— Phoenix LiveView Users ๐Ÿ‘จ๐Ÿซ๐Ÿ‘ฉ๐Ÿญ๐Ÿง‘โš•๐Ÿ‘ท Client ๐Ÿ–ฅ ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ ๐Ÿ—ƒ โš™ WSS / REST / GraphQL โ†• Controller Logic โš™ Data Store ๐Ÿ—ƒ DevOps ๐Ÿ“ค Developer ๐Ÿ‘ฉ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿ’พ

On the Edge ๐Ÿง— Phoenix LiveView Users ๐Ÿ‘จ๐Ÿซ๐Ÿ‘ฉ๐Ÿญ๐Ÿง‘โš•๐Ÿ‘ท Client ๐Ÿ–ฅ ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ ๐Ÿ—ƒ โš™ WSS / REST / GraphQL โ†• Controller Logic โš™ Data Store ๐Ÿ—ƒ DevOps ๐Ÿ“ค Developer ๐Ÿ‘ฉ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿ’พ

On the Edge ๐Ÿง— Phoenix LiveView Users ๐Ÿ‘จ๐Ÿซ๐Ÿ‘ฉ๐Ÿญ๐Ÿง‘โš•๐Ÿ‘ท Client ๐Ÿ–ฅ ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ ๐Ÿ—ƒ โš™ WSS / REST / GraphQL โ†• Controller Logic โš™ Data Store ๐Ÿ—ƒ DevOps ๐Ÿ“ค Developer ๐Ÿ‘ฉ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿ’พ

On the Edge ๐Ÿง— Phoenix LiveView Users ๐Ÿ‘จ๐Ÿซ๐Ÿ‘ฉ๐Ÿญ๐Ÿง‘โš•๐Ÿ‘ท Client ๐Ÿ–ฅ ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ ๐Ÿ—ƒ โš™ WSS / REST / GraphQL โ†• Controller Logic โš™ Data Store ๐Ÿ—ƒ DevOps ๐Ÿ“ค Developer ๐Ÿ‘ฉ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿ’พ

On the Edge ๐Ÿง— Phoenix LiveView Users ๐Ÿ‘จ๐Ÿซ๐Ÿ‘ฉ๐Ÿญ๐Ÿง‘โš•๐Ÿ‘ท Client ๐Ÿ–ฅ ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ ๐Ÿ—ƒ โš™ โš™ WSS / REST / GraphQL โ†• Controller Logic โš™ Data Store ๐Ÿ—ƒ DevOps ๐Ÿ“ค Developer ๐Ÿ‘ฉ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿ’พ

On the Edge ๐Ÿง— Phoenix LiveView Users ๐Ÿ‘จ๐Ÿซ๐Ÿ‘ฉ๐Ÿญ๐Ÿง‘โš•๐Ÿ‘ท Client ๐Ÿ–ฅ ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ ๐Ÿ—ƒ โš™ โš™ WSS / REST / GraphQL โ†• Controller Logic โš™ Data Store ๐Ÿ—ƒ DevOps ๐Ÿ“ค Developer ๐Ÿ‘ฉ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿ’พ ๐Ÿ–ฅ ๐Ÿ’พ

On the Edge ๐Ÿง— Phoenix LiveView Users ๐Ÿ‘จ๐Ÿซ๐Ÿ‘ฉ๐Ÿญ๐Ÿง‘โš•๐Ÿ‘ท Client ๐Ÿ–ฅ ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ ๐Ÿ—ƒ โš™ โš™ WSS / REST / GraphQL โ†• Controller Logic โš™ Data Store ๐Ÿ—ƒ DevOps ๐Ÿ“ค Developer ๐Ÿ‘ฉ๐Ÿ’ป ๐Ÿ–ฅ ๐Ÿ’พ ๐Ÿ–ฅ ๐Ÿ’พ

On the Edge ๐Ÿง— Upside Down โš™ ๐Ÿ–ฅ ๐Ÿ—ƒ๐Ÿ’พ ๐Ÿ’พ๐Ÿ’พ๐Ÿ’พ ๐Ÿ–ฅ ๐Ÿ’พ๐Ÿ’พ

Itโ€™s all about the Data, Data, Data ๐Ÿ“Š

Data dominates. If youโ€™ve chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming. Rob Pike, 5 Rules of Programming

Itโ€™s All About the Data ๐Ÿ“Š f Problems! Property Consequence Run anywhere No process in charge of access control Casual islands Inconsistent views of data (or downtime) Unstable topology No consistent connections Local irst In accessible, no replicas

Itโ€™s All About the Data ๐Ÿ“Š CAP โžก PACELC ๐Ÿ“ฆ๐ŸฆŒ

Itโ€™s All About the Data ๐Ÿ“Š CAP โžก PACELC ๐Ÿ“ฆ๐ŸฆŒ โ€ข If network partition (P) โ€ข Choose between: โ€ข Availability (A) โœ… Local-first & uptime โ€ข Consistency (C)

Itโ€™s All About the Data ๐Ÿ“Š CAP โžก PACELC ๐Ÿ“ฆ๐ŸฆŒ C โ€ข If network partition (P) โ€ข Choose between: โ€ข Availability (A) โœ… Local-first & uptime โ€ข Consistency (C) A

Itโ€™s All About the Data ๐Ÿ“Š CAP โžก PACELC ๐Ÿ“ฆ๐ŸฆŒ C โ€ข If network partition (P) โ€ข Choose between: P โ€ข Availability (A) โœ… Local-first & uptime โ€ข Consistency (C) A

Itโ€™s All About the Data ๐Ÿ“Š CAP โžก PACELC ๐Ÿ“ฆ๐ŸฆŒ C โ€ข If network partition (P) โ€ข Choose between: P โ€ข Availability (A) โœ… Local-first & uptime โ€ข Consistency (C) โ€ข Else (E) when running normally: โ€ข Choose between: โ€ข Latency (L) โœ… โ€ข Consistency (C) A

Itโ€™s All About the Data ๐Ÿ“Š CAP โžก PACELC ๐Ÿ“ฆ๐ŸฆŒ C โ€ข If network partition (P) โ€ข Choose between: P โ€ข Availability (A) โœ… Local-first & uptime E โ€ข Consistency (C) โ€ข Else (E) when running normally: โ€ข Choose between: โ€ข Latency (L) โœ… โ€ข Consistency (C) A L

Itโ€™s All About the Data ๐Ÿ“Š CAP โžก PACELC ๐Ÿ“ฆ๐ŸฆŒ C โ€ข If network partition (P) โ€ข Choose between: P โ€ข Availability (A) โœ… Local-first & uptime E โ€ข Consistency (C) โ€ข Else (E) when running normally: โ€ข Choose between: โ€ข Latency (L) โœ… โ€ข Consistency (C) A L

Itโ€™s All About the Data ๐Ÿ“Š CAP โžก PACELC ๐Ÿ“ฆ๐ŸฆŒ C โ€ข If network partition (P) โ€ข Choose between: P โ€ข Availability (A) โœ… Local-first & uptime E โ€ข Consistency (C) โ€ข Else (E) when running normally: โ€ข Choose between: โ€ข Latency (L) โœ… โ€ข Consistency (C) A L PA/EL

Itโ€™s All About the Data ๐Ÿ“Š Mutable Content โ€ข Predominantly single-source (per file) server/client โ€ข %{node_id => %{path => content}} โ€ข DNS maps names to IP addresses โ€ข PIDs associate processes with numbers โ€ข e.g. send(:example@42.123.45.6, :ping) โ€ข Focused on the physical network โ€ข Referential opacity ff โ€ข Calling same PID often will return di erent data

Itโ€™s All About the Data ๐Ÿ“Š Mutable Content โ€ข Predominantly single-source (per file) server/client โ€ข %{node_id => %{path => content}} โ€ข DNS maps names to IP addresses โ€ข PIDs associate processes with numbers โ€ข e.g. send(:example@42.123.45.6, :ping) โ€ข Focused on the physical network โ€ข Referential opacity ff โ€ข Calling same PID often will return di erent data V I R T UA L A D D R E S S P H Y S I C A L L O C AT I O N

Itโ€™s All About the Data ๐Ÿ“Š Consistent Keys โ€ข A layer of abstraction above location โ€ข %{hash(content) => content} โ€ข Hash AKA โ€œcontent identifierโ€ or CID โ€ข Special โ€œuniversalโ€ relationship to content โ€ข Focused on the data โ€ข Stored anywhere, same ID โ€ข E cient caching โ€ข Immutable data++ ffi โ€ข Not just consistent pointers; consistent data V I R T UA L A D D R E S S P H Y S I C A L L O C AT I O N

Itโ€™s All About the Data ๐Ÿ“Š Consistent Keys โ€ข A layer of abstraction above location โ€ข %{hash(content) => content} CONTENT ID โ€ข Hash AKA โ€œcontent identifierโ€ or CID โ€ข Special โ€œuniversalโ€ relationship to content โ€ข Focused on the data โ€ข Stored anywhere, same ID โ€ข E cient caching โ€ข Immutable data++ ffi โ€ข Not just consistent pointers; consistent data V I R T UA L A D D R E S S P H Y S I C A L L O C AT I O N

Itโ€™s All About the Data ๐Ÿ“Š Hash-Based Relationships

Itโ€™s All About the Data ๐Ÿ“Š Hash-Based Relationships (CID ~ Data PID) { Qm123456โ€ฆ: { data: nil, links: [ {name: โ€œcompanyโ€, hash: Qmabcdefโ€ฆ} {name: โ€œlicenseโ€, hash: Qmzyxwvuโ€ฆ} ] } }

Itโ€™s All About the Data ๐Ÿ“Š Hash-Based Relationships (CID ~ Data PID) { { Qm123456โ€ฆ: { data: nil, links: [ {name: โ€œcompanyโ€, hash: Qmabcdefโ€ฆ} {name: โ€œlicenseโ€, hash: Qmzyxwvuโ€ฆ} ] } } Qmabcdefโ€ฆ: { data: โ€œFissionโ€, links: [ {name: โ€œcityโ€, hash: Qm1gb5snโ€ฆ}, {name: โ€œaboutโ€, hash: Qmzyxwvuโ€ฆ} ] } }

Itโ€™s All About the Data ๐Ÿ“Š Hash-Based Relationships (CID ~ Data PID) { { Qm123456โ€ฆ: { data: nil, links: [ {name: โ€œcompanyโ€, hash: Qmabcdefโ€ฆ} {name: โ€œlicenseโ€, hash: Qmzyxwvuโ€ฆ} ] } } Qmabcdefโ€ฆ: { data: โ€œFissionโ€, links: [ {name: โ€œcityโ€, hash: Qm1gb5snโ€ฆ}, {name: โ€œaboutโ€, hash: Qmzyxwvuโ€ฆ} ] } } Qm123456โ€ฆ/company/about/ceo => โ€œBoris Mannโ€

Itโ€™s All About the Data ๐Ÿ“Š Content IDs Are Easy [no network version]

Itโ€™s All About the Data ๐Ÿ“Š Partial Dependencies

Itโ€™s All About the Data ๐Ÿ“Š Partial Dependencies t

Itโ€™s All About the Data ๐Ÿ“Š Partial Dependencies t

Itโ€™s All About the Data ๐Ÿ“Š Partial Dependencies t

Itโ€™s All About the Data ๐Ÿ“Š Partial Dependencies t

Itโ€™s All About the Data ๐Ÿ“Š Partial Dependencies t

Itโ€™s All About the Data ๐Ÿ“Š This all worksโ€ฆ

Itโ€™s All About the Data ๐Ÿ“Š Associative

Itโ€™s All About the Data ๐Ÿ“Š Out of Order Delivery ๐Ÿ’Œ โœ‰ ๐Ÿ“ง โš™ ๐Ÿ“ง ๐Ÿ’Œ ๐Ÿ’Œ

Itโ€™s All About the Data ๐Ÿ“Š Out of Order Delivery ๐Ÿ’Œ โœ‰ ๐Ÿ“ง โš™ ๐Ÿ“ง ๐Ÿ’Œ ๐Ÿ’Œ

Itโ€™s All About the Data ๐Ÿ“Š Commutative Monoid (AKA Minimal CRDT)

Itโ€™s All About the Data ๐Ÿ“Š Commutative Monoid (AKA Minimal CRDT) Sibling / Concurrent

Itโ€™s All About the Data ๐Ÿ“Š PNCounter

Itโ€™s All About the Data ๐Ÿ“Š PNCounter

Itโ€™s All About the Data ๐Ÿ“Š PNCounter

Itโ€™s All About the Data ๐Ÿ“Š PNCounter

Itโ€™s All About the Data ๐Ÿ“Š PNCounter

The Age of Decentralized Systems ๐ŸŒˆ

Decentralized Systems ๐ŸŒˆ Scale Curve Adapted from http://www.perfdynamics.com/Manifesto/USLscalability.html

Decentralized Systems ๐ŸŒˆ Scale Curve Linear Ideal Adapted from http://www.perfdynamics.com/Manifesto/USLscalability.html

Decentralized Systems ๐ŸŒˆ Scale Curve Linear Ideal Amdahlโ€™s Law Adapted from http://www.perfdynamics.com/Manifesto/USLscalability.html

Decentralized Systems ๐ŸŒˆ Scale Curve Linear Ideal Amdahlโ€™s Law Data Contention Adapted from http://www.perfdynamics.com/Manifesto/USLscalability.html Universal Scaling Law

Decentralized Systems ๐ŸŒˆ Scale Curve ๐Ÿคฏ Linear Ideal Shared Adaptive Memoization (โ€œTheoretical) Amdahlโ€™s Law Data Contention Adapted from http://www.perfdynamics.com/Manifesto/USLscalability.html Universal Scaling Law

Decentralized Systems ๐ŸŒˆ Conflict Free Effects ๐Ÿ•Š๐Ÿงฑ Side Effect Stream Pure Effect Stream Pure Function Stream Base Event Stream

Decentralized Systems ๐ŸŒˆ Conflict Free Effects ๐Ÿ•Š๐Ÿงฑ Side Effect Stream Pure Effect Stream Pure Function Stream Base Event Stream t

Decentralized Systems ๐ŸŒˆ GenEffect ๐Ÿš€

Decentralized Systems ๐ŸŒˆ Different Clients ~ Schema Drift Source: Project Cambria, Ink & Switch https://www.inkandswitch.com/cambria.html

Secure Decentralized Data Access Fixing the Leaky Pipes ๐Ÿšฟ

Fixing the Leaky Pipes ๐Ÿšฟ Object Capability Model (OCAP)

Fixing the Leaky Pipes ๐Ÿšฟ Object Capability Model (OCAP) โ€ข ACL is โ€œreactive authโ€ / OCAP is โ€œproactive authโ€

Fixing the Leaky Pipes ๐Ÿšฟ Object Capability Model (OCAP) โ€ข ACL is โ€œreactive authโ€ / OCAP is โ€œproactive authโ€ โ€ข OCAP contains all the info about access

Fixing the Leaky Pipes ๐Ÿšฟ Object Capability Model (OCAP) โ€ข ACL is โ€œreactive authโ€ / OCAP is โ€œproactive authโ€ โ€ข OCAP contains all the info about access โ€ข Generally some reference, proof, or key โ€ข โ€ฆnot unlike having a PID โ€ข Rights to anything directly created (parenthood) โ€ข The right to delegate subset of access to another (introduction)

Fixing the Leaky Pipes ๐Ÿšฟ Object Capability Model (OCAP) โ€ข ACL is โ€œreactive authโ€ / OCAP is โ€œproactive authโ€ โ€ข OCAP contains all the info about access โ€ข Generally some reference, proof, or key โ€ข โ€ฆnot unlike having a PID โ€ข Rights to anything directly created (parenthood) โ€ข The right to delegate subset of access to another (introduction) โ€ข Long history (e.g. X.509, SDSI, SPKI, Macaroons)

Fixing the Leaky Pipes ๐Ÿšฟ 3rd-Party Subdelegation & Attenuation

Fixing the Leaky Pipes ๐Ÿšฟ 3rd-Party Subdelegation & Attenuation ๐Ÿ–ฅ

Fixing the Leaky Pipes ๐Ÿšฟ 3rd-Party Subdelegation & Attenuation ๐Ÿ–ฅ โš™

Fixing the Leaky Pipes ๐Ÿšฟ 3rd-Party Subdelegation & Attenuation ๐Ÿ–ฅ ๐Ÿ”Ÿ โš™

Fixing the Leaky Pipes ๐Ÿšฟ 3rd-Party Subdelegation & Attenuation ๐Ÿ–ฅ ๐Ÿ”Ÿ โš™ ๐Ÿ› 

Fixing the Leaky Pipes ๐Ÿšฟ 3rd-Party Subdelegation & Attenuation ๐Ÿ–ฅ ๐Ÿ”Ÿ โš™ 2โƒฃ ๐Ÿ› 

Fixing the Leaky Pipes ๐Ÿšฟ Direct Access Control โ€ขAdvantages โ€ขProactive โ€ขProactive โ€ขWorks o ine โ€ขRevocation โ€ขAttenuation โ€ขGive up (more) access stats โ€ขEasy to understand rules โ€ขUser control (GDPR, CCPA) โ€ขInteroperable ffl โ€ขChallenges

Fixing the Leaky Pipes ๐Ÿšฟ Hierarchal Read Access

Fixing the Leaky Pipes ๐Ÿšฟ Cryptree ๐ŸŽ„ JSON Binary Encrypted Node ๐Ÿ”’ AES256 + ๐Ÿ”‘ Virtual Node = Index ๐Ÿ”‘ ๐Ÿ”‘ Metadata ๐Ÿ”‘

Fixing the Leaky Pipes ๐Ÿšฟ Cryptree Sketch โœ

Fixing the Leaky Pipes ๐Ÿšฟ Cryptree Sketch โœ Local stateful, remote stateless

How to Do O ine & Distributed Auth ffl Universal Auth & ID ๐Ÿ—

Universal Auth & ID ๐Ÿ— Universal IDs

Universal Auth & ID ๐Ÿ— Universal IDs โ€ข W3C, DIF, Microsoft

Universal Auth & ID ๐Ÿ— Universal IDs โ€ข W3C, DIF, Microsoft โ€ข Based on public-key cryptography

Universal Auth & ID ๐Ÿ— Universal IDs โ€ข W3C, DIF, Microsoft โ€ข Based on public-key cryptography โ€ข Truly โ€œuniversalโ€ user IDs

Universal Auth & ID ๐Ÿ— Universal IDs โ€ข W3C, DIF, Microsoft โ€ข Based on public-key cryptography โ€ข Truly โ€œuniversalโ€ user IDs โ€ข Agnostic about backing

Universal Auth & ID ๐Ÿ— Universal IDs โ€ข W3C, DIF, Microsoft โ€ข Based on public-key cryptography โ€ข Truly โ€œuniversalโ€ user IDs โ€ข Agnostic about backing โ€ข For users, devices, and more

Universal Auth & ID ๐Ÿ— JWT Encoded

Universal Auth & ID ๐Ÿ— JWT Encoded

Universal Auth & ID ๐Ÿ— JWT Encoded

Universal Auth & ID ๐Ÿ— Auth Chaining

Universal Auth & ID ๐Ÿ— OAuth vs UCAN Sequence

Universal Auth & ID ๐Ÿ— OAuth vs UCAN Sequence

Universal Auth & ID ๐Ÿ— OAuth vs UCAN Sequence (Verifiable & user originated)

Universal Auth & ID ๐Ÿ—

Universal Auth & ID ๐Ÿ— ๐Ÿ›‚ External OIDC Server ๐Ÿค– Service A ๐Ÿ‘ฝ Service B ๐Ÿ’ User

Universal Auth & ID ๐Ÿ— ๐Ÿ›‚ External OIDC Server ๐Ÿค– Service A ๐Ÿ‘ฝ ๐Ÿ’ Service B User ff UCAN with ๐Ÿ’ ID / email Describes o er for ๐Ÿค–

Universal Auth & ID ๐Ÿ— ๐Ÿ›‚ External OIDC Server ๐Ÿค– Service A ๐Ÿ‘ฝ ๐Ÿ’ Service B User UCAN with ๐Ÿ’ ID / email Describes o er for ๐Ÿค– ff OIDC Login

Universal Auth & ID ๐Ÿ— ๐Ÿ›‚ External OIDC Server ๐Ÿค– Service A ๐Ÿ‘ฝ ๐Ÿ’ Service B User UCAN with ๐Ÿ’ ID / email Describes o er for ๐Ÿค– OIDC Login ff OIDC Token

Universal Auth & ID ๐Ÿ— ๐Ÿ›‚ External OIDC Server ๐Ÿค– Service A ๐Ÿ‘ฝ ๐Ÿ’ Service B User UCAN with ๐Ÿ’ ID / email Describes o er for ๐Ÿค– OIDC Login OIDC Token ff ff O er for ๐Ÿค–+๐Ÿ’ Secured with signature ๐Ÿ‘ฝ and HMAC ๐Ÿ’๐Ÿ›‚

Universal Auth & ID ๐Ÿ— ๐Ÿ›‚ External OIDC Server ๐Ÿค– Service A ๐Ÿ‘ฝ ๐Ÿ’ Service B User UCAN with ๐Ÿ’ ID / email Describes o er for ๐Ÿค– OIDC Login OIDC Token O er for ๐Ÿค–+๐Ÿ’ Secured with signature ๐Ÿ‘ฝ and HMAC ๐Ÿ’๐Ÿ›‚ ff ff ๐Ÿ’โ€™s OIDC token?

Universal Auth & ID ๐Ÿ— ๐Ÿ›‚ External OIDC Server ๐Ÿค– Service A ๐Ÿ‘ฝ ๐Ÿ’ Service B User UCAN with ๐Ÿ’ ID / email Describes o er for ๐Ÿค– OIDC Login OIDC Token O er for ๐Ÿค–+๐Ÿ’ Secured with signature ๐Ÿ‘ฝ and HMAC ๐Ÿ’๐Ÿ›‚ ๐Ÿ’โ€™s OIDC token? ff ff ๐Ÿ’โ€™s OIDC token!

Universal Auth & ID ๐Ÿ— ๐Ÿ›‚ External OIDC Server ๐Ÿค– Service A ๐Ÿ‘ฝ ๐Ÿ’ Service B User UCAN with ๐Ÿ’ ID / email Describes o er for ๐Ÿค– OIDC Login OIDC Token O er for ๐Ÿค–+๐Ÿ’ Secured with signature ๐Ÿ‘ฝ and HMAC ๐Ÿ’๐Ÿ›‚ ๐Ÿ’โ€™s OIDC token? ๐Ÿ’โ€™s OIDC token! ff ff Check ๐Ÿ’ HMAC and ๐Ÿ‘ฝ signature

Universal Auth & ID ๐Ÿ— ๐Ÿ›‚ External OIDC Server ๐Ÿค– Service A ๐Ÿ‘ฝ ๐Ÿ’ Service B User UCAN with ๐Ÿ’ ID / email Describes o er for ๐Ÿค– OIDC Login OIDC Token O er for ๐Ÿค–+๐Ÿ’ Secured with signature ๐Ÿ‘ฝ and HMAC ๐Ÿ’๐Ÿ›‚ ๐Ÿ’โ€™s OIDC token? ๐Ÿ’โ€™s OIDC token! Check ๐Ÿ’ HMAC and ๐Ÿ‘ฝ signature ff ff Update ๐Ÿค– subscription for ๐Ÿ’

Universal Auth & ID ๐Ÿ— ๐Ÿ›‚ External OIDC Server ๐Ÿค– ๐Ÿ‘ฝ Service A ๐Ÿ’ Service B User UCAN with ๐Ÿ’ ID / email Describes o er for ๐Ÿค– OIDC Login OIDC Token O er for ๐Ÿค–+๐Ÿ’ Secured with signature ๐Ÿ‘ฝ and HMAC ๐Ÿ’๐Ÿ›‚ ๐Ÿ’โ€™s OIDC token? ๐Ÿ’โ€™s OIDC token! Check ๐Ÿ’ HMAC and ๐Ÿ‘ฝ signature Update ๐Ÿค– subscription for ๐Ÿ’ ff ff 204 Accepted

Summary ๐Ÿฑ

Instead of immediately asking โ€œwhich database would be best to hold presences?โ€, we could ask โ€œhow can we best replicate data in a distributed system without the user having to worry about it?โ€. The platforms you build on top of drive the design decisions you make in your products. With Elixir, you are empowered to tackle problems that in other platforms would feel impossible to solve without tradeoffs with heavy dependencies. ~ Chris McCord, What Makes Phoenix Presence Special

Getting Ready ๐Ÿฑ Data > Compute โ€ข Focus on data & structure โ€ข Clarify โ€œrealโ€ dependencies on data โ€ข Start thinking about the properties in your code โ€ข Adopt OCAP โ€ข Use abstraction for declarative interfaces

๐Ÿ‡ง๐Ÿ‡ท Thank You, CodeBEAM BR ๐ŸŽ‰ brooklyn@fission.codes https://fission.codes github.com/expede @expede