Living On the Edge
๐โกA Brave New (Post-Cloud) World ๐ฐโจ
Slide 2
Slide 3
[โฆ] by 2025, 75% of data will be processed outside the traditional data centre or cloud ~ IBM (paraphrasing a Gartner study)
Slide 4
Brooklyn Zelenka @expede
Slide 5
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
Slide 6
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)
Slide 7
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)
Slide 8
WebNative ๐
Fission R&D โข Local first โข Edge only โข No servers โข Fully distributed โข Encrypted at Rest, E2EE โข User owned data
@FISSIONCodes
Slide 9
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
Slide 10
Part I
Motivation ๐ญ
Slide 11
Motivation ๐ญ
90s Web
Slide 12
Motivation ๐ญ
90s Web
๐
๐ฅ
Slide 13
Motivation ๐ญ
90s Web
๐
๐ฅ ๐ข
Slide 14
Motivation ๐ญ
90s Web
๐
๐ฅ ๐ข
๐
Slide 15
Motivation ๐ญ
90s Web
๐
๐ฅ ๐ข
โ
๐
Slide 16
Motivation ๐ญ
90s Web
๐
๐ฅ ๐ข
โ
๐ช
๐
Slide 17
Motivation ๐ญ
90s Web
๐
๐ฅ ๐ข
โ
๐ช
๐
Slide 18
Motivation ๐ญ
90s Web
๐
๐ฅ ๐ข
โ
๐ช
๐
Slide 19
Motivation ๐ญ
90s Web
๐
๐ฅ ๐ข
โ
๐ช
๐
โฆand so it was for many yearsโฆ ๐ฆโ๐๐พ๐ฐ๐ข๐
Slide 28
Motivation ๐ญ
Natural Consequences ๐
Slide 29
Motivation ๐ญ
Natural Consequences ๐ โข Server-focus โข More stack to learn โข DevOps, Docker, k8s
Slide 30
Motivation ๐ญ
Natural Consequences ๐ โข Server-focus โข More stack to learn โข DevOps, Docker, k8s โข Single source of truth โข i.e. โthe databaseโ
Slide 31
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
Slide 32
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
Slide 33
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
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
Slide 52
New Environment ๐ฐ
New Biz Who Dis?
Slide 53
New Environment ๐ฐ
New Biz Who Dis? โข Paradigm shift means new opportunities
Slide 54
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
Slide 55
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
Slide 56
A New Environment
Low Latency ๐
Slide 57
Low Latency ๐
Latency is a Physical Barrier ๐ง
โข Speed of light / speed of causality โข <40ms = edge dominates โข 8ms is ideal โข Ultra Reliable Low Latency (URLLC)
Slide 58
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
Slide 59
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/
Slide 60
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/
Slide 61
Low Latency ๐
What 8ms Looks Like
Slide 62
Low Latency ๐
What 8ms Looks Like
Montevideo โก Rio de Janeiro Ideal Vacuum
Slide 63
Low Latency ๐
What 8ms Looks Like
Montevideo โก Rio de Janeiro Ideal Vacuum
Brasilia ๐ Salvador Ideal Vacuum
Slide 64
Low Latency ๐
What 8ms Looks Like
Montevideo โก Rio de Janeiro Ideal Vacuum
Brasilia ๐ Salvador Ideal Vacuum
Brasilia ๐ Barreiras Ideal Fiber
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)
Slide 73
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
Slide 74
Slide 75
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โ
Slide 76
High Volume ๐
Edge Absorbs Cloud (and MEC)
Slide 77
High Volume ๐
Edge Absorbs Cloud (and MEC)
๐คณ
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
Slide 89
Consequence ๐ธ
Tackling the Fallacies
Slide 90
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
Slide 91
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
Slide 92
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)
Slide 93
Consequence ๐ธ
Giving Up Topological Control
Slide 94
Consequence ๐ธ
Giving Up Topological Control โ
๐ฅ ๐ฑ
๐
๐ฑ
๐ผ
๐ฑ
๐ป ๐ฑ
๐
๐ฐ
Slide 95
Consequence ๐ธ
Data, Data, Data ๐พ
Slide 96
Consequence ๐ธ
Data, Data, Data ๐พ โข Only UI & data are essential
Slide 97
Consequence ๐ธ
Data, Data, Data ๐พ โข Only UI & data are essential โข New primitives โข Consistency (CRDTs, STM, Distributed Datalog) โข State transfer โก state synchronization โก state views
Slide 98
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)
Slide 99
Part II
On the Edge ๐ง
Slide 100
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
Slide 101
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 ๐ ๐ ๐
Slide 102
Slide 103
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โ
Slide 104
What if we turn Phoenix Live View
Upside Down? ๐
Slide 105
On the Edge ๐ง
Phoenix LiveView
Slide 106
On the Edge ๐ง
Phoenix LiveView Users ๐จ๐ซ๐ฉ๐ญ๐งโ๐ท Client ๐ฅ WSS / REST / GraphQL โ Controller Logic โ Data Store ๐ DevOps ๐ค Developer ๐ฉ๐ป
Slide 107
On the Edge ๐ง
Phoenix LiveView Users ๐จ๐ซ๐ฉ๐ญ๐งโ๐ท Client ๐ฅ WSS / REST / GraphQL โ Controller Logic โ Data Store ๐ DevOps ๐ค Developer ๐ฉ๐ป
๐ฅ ๐พ
Slide 108
On the Edge ๐ง
Phoenix LiveView Users ๐จ๐ซ๐ฉ๐ญ๐งโ๐ท Client ๐ฅ
โ
WSS / REST / GraphQL โ Controller Logic โ Data Store ๐ DevOps ๐ค Developer ๐ฉ๐ป
๐ฅ ๐พ
๐
Slide 109
On the Edge ๐ง
Phoenix LiveView Users ๐จ๐ซ๐ฉ๐ญ๐งโ๐ท Client ๐ฅ
๐พ๐พ๐พ๐พ ๐ โ
WSS / REST / GraphQL โ Controller Logic โ Data Store ๐ DevOps ๐ค Developer ๐ฉ๐ป
๐ฅ ๐พ
Slide 110
On the Edge ๐ง
Phoenix LiveView Users ๐จ๐ซ๐ฉ๐ญ๐งโ๐ท Client ๐ฅ
๐พ๐พ๐พ๐พ ๐ โ
WSS / REST / GraphQL โ Controller Logic โ Data Store ๐ DevOps ๐ค Developer ๐ฉ๐ป
๐ฅ ๐พ
Slide 111
On the Edge ๐ง
Phoenix LiveView Users ๐จ๐ซ๐ฉ๐ญ๐งโ๐ท Client ๐ฅ
๐พ๐พ๐พ๐พ ๐ โ
WSS / REST / GraphQL โ Controller Logic โ Data Store ๐ DevOps ๐ค Developer ๐ฉ๐ป
๐ฅ ๐พ
Slide 112
On the Edge ๐ง
Phoenix LiveView Users ๐จ๐ซ๐ฉ๐ญ๐งโ๐ท Client ๐ฅ
๐พ๐พ๐พ๐พ ๐ โ
WSS / REST / GraphQL โ Controller Logic โ Data Store ๐ DevOps ๐ค Developer ๐ฉ๐ป
๐ฅ ๐พ
Slide 113
On the Edge ๐ง
Phoenix LiveView Users ๐จ๐ซ๐ฉ๐ญ๐งโ๐ท Client ๐ฅ
๐พ๐พ๐พ๐พ ๐ โ
WSS / REST / GraphQL โ Controller Logic โ Data Store ๐ DevOps ๐ค Developer ๐ฉ๐ป
๐ฅ ๐พ
Slide 114
On the Edge ๐ง
Phoenix LiveView Users ๐จ๐ซ๐ฉ๐ญ๐งโ๐ท Client ๐ฅ
๐พ๐พ๐พ๐พ ๐ โ โ
WSS / REST / GraphQL โ Controller Logic โ Data Store ๐ DevOps ๐ค Developer ๐ฉ๐ป
๐ฅ ๐พ
Slide 115
On the Edge ๐ง
Phoenix LiveView Users ๐จ๐ซ๐ฉ๐ญ๐งโ๐ท Client ๐ฅ
๐พ๐พ๐พ๐พ ๐ โ โ
WSS / REST / GraphQL โ Controller Logic โ Data Store ๐ DevOps ๐ค Developer ๐ฉ๐ป
๐ฅ ๐พ
๐ฅ ๐พ
Slide 116
On the Edge ๐ง
Phoenix LiveView Users ๐จ๐ซ๐ฉ๐ญ๐งโ๐ท Client ๐ฅ
๐พ๐พ๐พ๐พ ๐ โ โ
WSS / REST / GraphQL โ Controller Logic โ Data Store ๐ DevOps ๐ค Developer ๐ฉ๐ป
๐ฅ ๐พ
๐ฅ ๐พ
Slide 117
On the Edge ๐ง
Upside Down
โ
๐ฅ
๐๐พ
๐พ๐พ๐พ
๐ฅ
๐พ๐พ
Slide 118
Itโs all about the
Data, Data, Data ๐
Slide 119
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
Slide 120
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
Slide 121
Itโs All About the Data ๐
CAP โก PACELC ๐ฆ๐ฆ
Slide 122
Itโs All About the Data ๐
CAP โก PACELC ๐ฆ๐ฆ โข If network partition (P) โข Choose between: โข Availability (A) โ Local-first & uptime โข Consistency (C)
Slide 123
Itโs All About the Data ๐
CAP โก PACELC ๐ฆ๐ฆ C
โข If network partition (P) โข Choose between: โข Availability (A) โ Local-first & uptime โข Consistency (C) A
Slide 124
Itโs All About the Data ๐
CAP โก PACELC ๐ฆ๐ฆ C
โข If network partition (P) โข Choose between:
P
โข Availability (A) โ Local-first & uptime โข Consistency (C) A
Slide 125
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
Slide 126
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
Slide 127
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
Slide 128
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
Slide 129
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
Slide 130
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
Slide 131
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
Slide 132
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
Slide 133
Itโs All About the Data ๐
Hash-Based Relationships
Slide 134
Itโs All About the Data ๐
Hash-Based Relationships
(CID ~ Data PID) { Qm123456โฆ: { data: nil, links: [ {name: โcompanyโ, hash: Qmabcdefโฆ} {name: โlicenseโ, hash: Qmzyxwvuโฆ} ] } }
Slide 135
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 ๐
Content IDs Are Easy [no network version]
Slide 138
Itโs All About the Data ๐
Partial Dependencies
Slide 139
Itโs All About the Data ๐
Partial Dependencies
t
Slide 140
Itโs All About the Data ๐
Partial Dependencies
t
Slide 141
Itโs All About the Data ๐
Partial Dependencies
t
Slide 142
Itโs All About the Data ๐
Partial Dependencies
t
Slide 143
Itโs All About the Data ๐
Partial Dependencies
t
Slide 144
Itโs All About the Data ๐
This all worksโฆ
Slide 145
Itโs All About the Data ๐
Associative
Slide 146
Itโs All About the Data ๐
Out of Order Delivery ๐
โ
๐ง
โ
๐ง
๐
๐
Slide 147
Itโs All About the Data ๐
Out of Order Delivery ๐
โ
๐ง
โ
๐ง
๐
๐
Slide 148
Itโs All About the Data ๐
Commutative Monoid (AKA Minimal CRDT)
Slide 149
Itโs All About the Data ๐
Commutative Monoid (AKA Minimal CRDT)
Sibling / Concurrent
Slide 150
Itโs All About the Data ๐
PNCounter
Slide 151
Itโs All About the Data ๐
PNCounter
Slide 152
Itโs All About the Data ๐
PNCounter
Slide 153
Itโs All About the Data ๐
PNCounter
Slide 154
Itโs All About the Data ๐
PNCounter
Slide 155
The Age of
Decentralized Systems ๐
Slide 156
Decentralized Systems ๐
Scale Curve
Adapted from http://www.perfdynamics.com/Manifesto/USLscalability.html
Slide 157
Decentralized Systems ๐
Scale Curve
Linear Ideal
Adapted from http://www.perfdynamics.com/Manifesto/USLscalability.html
Slide 158
Decentralized Systems ๐
Scale Curve
Linear Ideal Amdahlโs Law
Adapted from http://www.perfdynamics.com/Manifesto/USLscalability.html
Slide 159
Decentralized Systems ๐
Scale Curve
Linear Ideal Amdahlโs Law
Data Contention
Adapted from http://www.perfdynamics.com/Manifesto/USLscalability.html
Universal Scaling Law
Slide 160
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
Slide 161
Decentralized Systems ๐
Conflict Free Effects ๐๐งฑ Side Effect Stream
Pure Effect Stream
Pure Function Stream
Base Event Stream
Slide 162
Decentralized Systems ๐
Conflict Free Effects ๐๐งฑ Side Effect Stream
Pure Effect Stream
Pure Function Stream
Base Event Stream
t
Slide 163
Decentralized Systems ๐
GenEffect ๐
Slide 164
Decentralized Systems ๐
Different Clients ~ Schema Drift
Source: Project Cambria, Ink & Switch https://www.inkandswitch.com/cambria.html
Slide 165
Secure Decentralized Data Access
Fixing the Leaky Pipes ๐ฟ
Slide 166
Fixing the Leaky Pipes ๐ฟ
Object Capability Model (OCAP)
Slide 167
Fixing the Leaky Pipes ๐ฟ
Object Capability Model (OCAP)
โข ACL is โreactive authโ / OCAP is โproactive authโ
Slide 168
Fixing the Leaky Pipes ๐ฟ
Object Capability Model (OCAP)
โข ACL is โreactive authโ / OCAP is โproactive authโ โข OCAP contains all the info about access
Slide 169
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)
Slide 170
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)
Slide 171
Fixing the Leaky Pipes ๐ฟ
3rd-Party Subdelegation & Attenuation
Slide 172
Fixing the Leaky Pipes ๐ฟ
3rd-Party Subdelegation & Attenuation
๐ฅ
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
Slide 178
Fixing the Leaky Pipes ๐ฟ
Hierarchal Read Access
Fixing the Leaky Pipes ๐ฟ
Cryptree Sketch โ
Local stateful, remote stateless
Slide 182
How to Do O ine & Distributed Auth
ffl
Universal Auth & ID ๐
Slide 183
Universal Auth & ID ๐
Universal IDs
Slide 184
Universal Auth & ID ๐
Universal IDs โข W3C, DIF, Microsoft
Slide 185
Universal Auth & ID ๐
Universal IDs โข W3C, DIF, Microsoft โข Based on public-key cryptography
Slide 186
Universal Auth & ID ๐
Universal IDs โข W3C, DIF, Microsoft โข Based on public-key cryptography โข Truly โuniversalโ user IDs
Slide 187
Universal Auth & ID ๐
Universal IDs โข W3C, DIF, Microsoft โข Based on public-key cryptography โข Truly โuniversalโ user IDs โข Agnostic about backing
Slide 188
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
Slide 189
Universal Auth & ID ๐
JWT Encoded
Slide 190
Universal Auth & ID ๐
JWT Encoded
Slide 191
Universal Auth & ID ๐
JWT Encoded
Slide 192
Universal Auth & ID ๐
Auth Chaining
Slide 193
Universal Auth & ID ๐
OAuth vs UCAN Sequence
Slide 194
Universal Auth & ID ๐
OAuth vs UCAN Sequence
Slide 195
Universal Auth & ID ๐
OAuth vs UCAN Sequence
(Verifiable & user originated)
Slide 196
Universal Auth & ID ๐
Slide 197
Universal Auth & ID ๐
๐
External OIDC Server
๐ค
Service A
๐ฝ Service B
๐ User
Slide 198
Universal Auth & ID ๐
๐
External OIDC Server
๐ค
Service A
๐ฝ
๐
Service B
User
ff
UCAN with ๐ ID / email Describes o er for ๐ค
Slide 199
Universal Auth & ID ๐
๐
External OIDC Server
๐ค
Service A
๐ฝ
๐
Service B
User
UCAN with ๐ ID / email Describes o er for ๐ค
ff
OIDC Login
Slide 200
Universal Auth & ID ๐
๐
External OIDC Server
๐ค
Service A
๐ฝ
๐
Service B
User
UCAN with ๐ ID / email Describes o er for ๐ค OIDC Login
ff
OIDC Token
Slide 201
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 ๐๐
Slide 202
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?
Slide 203
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!
Slide 204
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
Slide 205
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 ๐
Slide 206
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
Slide 207
Summary ๐ฑ
Slide 208
Slide 209
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
Slide 210
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