A presentation at Øredev 2019 in in Malmö, Sweden by Brooklyn Zelenka
✨ UNIVERSAL HOSTLESS S U B S T R AT E 🌖 🌑 FO R A P O ST-S E R V E R L E S S F U T U R E 🚀
A U N I V E R S A L H O S T L E S S S U B S T R AT E B R O O K LY N Z E L E N K A , @ e x p e d e
A U N I V E R S A L H O S T L E S S S U B S T R AT E B R O O K LY N Z E L E N K A , @ e x p e d e • Cofounder/CTO at Fission • https://fission.codes • PLT & VMs • Previously an Ethereum Core Dev • EIPs 615, 902, 1066, 1444 • ECIP 1050 • Now spending a lot of time with IPFS & DIDs • Lots of R&D (but still have to deal with segfaults, &c)
A U N I V E R S A L H O S T L E S S S U B S T R AT E TA L K G O A L S
A U N I V E R S A L H O S T L E S S S U B S T R AT E TA L K G O A L S • Be as fringe as this track gets 😛🤭 • Expose you to a lot of ideas in broad strokes • Nothing that’s science fiction! • A peek at what’s coming in the next 2-5 years
A U N I V E R S A L H O S T L E S S S U B S T R AT E TA L K G O A L S • Be as fringe as this track gets 😛🤭 • Expose you to a lot of ideas in broad strokes • Nothing that’s science fiction! • A peek at what’s coming in the next 2-5 years
A U N I V E R S A L H O S T L E S S S U B S T R AT E TA L K G O A L S • Be as fringe as this track gets 😛🤭 • Expose you to a lot of ideas in broad strokes • Nothing that’s science fiction! • A peek at what’s coming in the next 2-5 years 🚫
A U N I V E R S A L H O S T L E S S S U B S T R AT E PA R A D I G M W AV E S
A U N I V E R S A L H O S T L E S S S U B S T R AT E PA R A D I G M W AV E S C O N TA I N E R S
A U N I V E R S A L H O S T L E S S S U B S T R AT E PA R A D I G M W AV E S C O N TA I N E R S
A U N I V E R S A L H O S T L E S S S U B S T R AT E PA R A D I G M W AV E S C O N TA I N E R S SERVERLESS ☁ λ
A U N I V E R S A L H O S T L E S S S U B S T R AT E PA R A D I G M W AV E S C O N TA I N E R S SERVERLESS UNIVERSAL ☁ 🌐 λ
A U N I V E R S A L H O S T L E S S S U B S T R AT E N AT I V E S D K F O R T H E W E B
A U N I V E R S A L H O S T L E S S S U B S T R AT E N AT I V E S D K F O R T H E W E B
A U N I V E R S A L H O S T L E S S S U B S T R AT E N AT I V E S D K F O R T H E W E B
A U N I V E R S A L H O S T L E S S S U B S T R AT E N AT I V E S D K F O R T H E W E B
A U N I V E R S A L H O S T L E S S S U B S T R AT E N AT I V E S D K F O R T H E W E B
A U N I V E R S A L H O S T L E S S S U B S T R AT E N AT I V E S D K F O R T H E W E B
A U N I V E R S A L H O S T L E S S S U B S T R AT E N AT I V E S D K F O R T H E W E B
A U N I V E R S A L H O S T L E S S S U B S T R AT E U P S H OT ?
A U N I V E R S A L H O S T L E S S S U B S T R AT E U P S H OT ? • Go from zero to production on a plane ✈ • Move data to compute and vice versa 🔄 • Scale linearly 📈 • Serve areas that lack sufficient cloud hardware 🖥 • Anyone can be a service provider (lower bar to entry) 💁/
A U N I V E R S A L H O S T L E S S S U B S T R AT E WHY NOW?
A U N I V E R S A L H O S T L E S S S U B S T R AT E WHY NOW? Social & Business • Licensing innovation (yes, really) • Data ethics • Platform lock-in & profiteering
A U N I V E R S A L H O S T L E S S S U B S T R AT E WHY NOW? Social & Business Technical • Licensing innovation (yes, really) • Commons infrastructure • Data ethics • Content addressing • Platform lock-in & profiteering • Cryptographic advancements • Distributed computing advancements • Universality (location, provider, & time independence)
A U N I V E R S A L H O S T L E S S S U B S T R AT E W H Y N OT N OW ?
A U N I V E R S A L H O S T L E S S S U B S T R AT E W H Y N OT N OW ?
COMMONS INFRASTRUCTURE
COMMONS INFRASTRUCTURE 🤝 A S U B S T R AT E F O R E V E R Y O N E 🌍
COMMONS INFRASTRUCTURE OPEN SOURCE Lots of people work on it, everybody benefits from it, and then people can build upon it (even in a revenue generating fashion) 🔑 TED LEUNG (2005)
COMMONS INFRASTRUCTURE OPEN NETWORKS Lots of people work on it, everybody benefits from it, people can build upon it (even in a revenue generating fashion), and it’s “owned” by everyone. By participating — even with competitive goals — you are cooperating by serving the content and running compute of others. 🌌
IPFS PRIMER
IPFS PRIMER 🕸 M E E T T H E C O N T E N T-A D D R E S S A B L E W E B 👋
IPFS PRIMER I N T E R P L A N E TA R Y F I L E S Y S T E M
IPFS PRIMER I N T E R P L A N E TA R Y F I L E S Y S T E M
IPFS PRIMER I N T E R P L A N E TA R Y F I L E S Y S T E M
IPFS PRIMER I N T E R P L A N E TA R Y F I L E S Y S T E M
IPFS PRIMER T H E W E B T O D AY
IPFS PRIMER T H E W E B T O D AY • Predominantly single-source (per file) server/client
IPFS PRIMER T H E W E B T O D AY • Predominantly single-source (per file) server/client • Like a key/value store {ip => {path => content}}
IPFS PRIMER T H E W E B T O D AY • Predominantly single-source (per file) server/client • Like a key/value store {ip => {path => content}} • “Location addressing” • DNS maps names to IP addresses • Focused on the physical network VIRTUAL ADDRESS P H Y S I C A L L O C AT I O N
IPFS PRIMER T H E W E B T O D AY • Predominantly single-source (per file) server/client • Like a key/value store {ip => {path => content}} • “Location addressing” • DNS maps names to IP addresses • Focused on the physical network VIRTUAL ADDRESS P H Y S I C A L L O C AT I O N • Mutable addressing • www.foo.com/baz may be JSON today, but a video tomorrow • …or altered content
IPFS PRIMER CONTENT ADDRESSING VIRTUAL ADDRESS P H Y S I C A L L O C AT I O N
IPFS PRIMER CONTENT ADDRESSING • A layer of abstraction above location CONTENT ID VIRTUAL ADDRESS P H Y S I C A L L O C AT I O N
IPFS PRIMER CONTENT ADDRESSING • A layer of abstraction above location • Like a key/value store {hash(content) => content} CONTENT ID • Content hash AKA “content identifier” or CID • Special “universal” relationship to content VIRTUAL ADDRESS P H Y S I C A L L O C AT I O N
IPFS PRIMER CONTENT ADDRESSING • A layer of abstraction above location • Like a key/value store {hash(content) => content} CONTENT ID • Content hash AKA “content identifier” or CID • Special “universal” relationship to content VIRTUAL ADDRESS • Focused on the data P H Y S I C A L L O C AT I O N
IPFS PRIMER CONTENT ADDRESSING • A layer of abstraction above location • Like a key/value store {hash(content) => content} CONTENT ID • Content hash AKA “content identifier” or CID • Special “universal” relationship to content VIRTUAL ADDRESS • Focused on the data • Does not care where it lives P H Y S I C A L L O C AT I O N
IPFS PRIMER CONTENT ADDRESSING • A layer of abstraction above location • Like a key/value store {hash(content) => content} CONTENT ID • Content hash AKA “content identifier” or CID • Special “universal” relationship to content VIRTUAL ADDRESS • Focused on the data • Does not care where it lives • Still have paths • Immutable DAG • Why no loops? P H Y S I C A L L O C AT I O N
IPFS PRIMER L I N K E D D ATA
IPFS PRIMER L I N K E D D ATA { } Qm123456…: { data: “Hello world”, links: [ {name: “company”, hash: Qmabcdef…} {name: “license”, hash: Qmzyxwvu…} ] }
IPFS PRIMER L I N K E D D ATA { } Qm123456…: { data: “Hello world”, links: [ {name: “company”, hash: Qmabcdef…} {name: “license”, hash: Qmzyxwvu…} ] } { } Qmabcdef…: { data: “FISSION”, links: [ {name: “city”, hash: Qm1gb5sn…}, {name: “about”, hash: Qmzyxwvu…} ] }
IPFS PRIMER L I N K E D D ATA { } Qm123456…: { data: “Hello world”, links: [ {name: “company”, hash: Qmabcdef…} {name: “license”, hash: Qmzyxwvu…} ] } { } Qmabcdef…: { data: “FISSION”, links: [ {name: “city”, hash: Qm1gb5sn…}, {name: “about”, hash: Qmzyxwvu…} ] } ipfs cat /ipfs/Qm123456…/company/about/founder => “Brooke”
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊 💁
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊 💁
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊 💁
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊 💻 💻 ☕ 💻 💁
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊 💻 💻 ☕ 💻 💁
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊 💻 💻 💻 💻 💻 ☕ 💻 💻 💁 💻 💻 💻 💻 💻
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊 💻 💻 💻 💻 💻 ☕ 💻 💻 💁 💻 💻 💻 💻 💻
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊 💻 💻 💻 💻 💻 ☕ 💻 💻 💁 💻 💻 💻 💻 💻
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊 💻 💻 💻 💻 💻 ☕ 💻 💻 💁 💻 💻 💻 💻 💻
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊 💻 💻 💁 💻
IPFS PRIMER RO U T I N G & LO O KU P 🔍🌊 💻 💻 💁 💻
IPFS PRIMER A U T H E N T I C D ATA ( F I N G E R P R I N T I N G )
IPFS PRIMER A U T H E N T I C D ATA ( F I N G E R P R I N T I N G )
IPFS PRIMER O N E H U G E N A M E S PA C E T O R U L E T H E M A L L 💍 🌋
IPFS PRIMER O N E H U G E N A M E S PA C E T O R U L E T H E M A L L 💍 🌋 • Same file = same hash • No matter when 🕓 • No matter where 🌍🌌 • No matter who =🤖?@🦊
IPFS PRIMER O N E H U G E N A M E S PA C E T O R U L E T H E M A L L 💍 🌋 • Same file = same hash • Zero file duplication per node • No matter when 🕓 • Replication = CDN-ish features • No matter where 🌍🌌 • Immutable data structures • No matter who =🤖?@🦊 • Files & data living together! •
DIDS
DIDS 🔑 H I G H LY A U T H E N T I C B
DIDS S TA N D A R D I Z AT I O N
DIDS S TA N D A R D I Z AT I O N • W3C • Microsoft • Government of British Columbia • Based on public-key cryptography • Truly “universal” UUIDs • Agnostic about backing • For users, devices, and more
DIDS CLAIMS
DIDS CLAIMS • Principle of least information • “Can attest that this user is over 18” • All claims signed with private key • Age, credentials, country residency, job history, event attendance, …
DIDS W H AT A B O U T T R A C K I N G , P R I VA C Y , R E C O V E R Y
DIDS W H AT A B O U T T R A C K I N G , P R I VA C Y , R E C O V E R Y • Hierarchical deterministic wallets
DIDS W H AT A B O U T T R A C K I N G , P R I VA C Y , R E C O V E R Y • Hierarchical deterministic wallets • Keychains • Generally on a blockchain • Some cases on DNS
DIDS SELF-SOVEREIGN IDENTITY (SSI)
DIDS SELF-SOVEREIGN IDENTITY (SSI) • Generate your own ID!
DIDS SELF-SOVEREIGN IDENTITY (SSI) • Generate your own ID! • As many as you like 🤷
DIDS SELF-SOVEREIGN IDENTITY (SSI) • Generate your own ID! • As many as you like 🤷 • Generally use commons infrastructure like a blockchain or DNS
P O R TA B L E C O M P U T E
P O R TA B L E C O M P U T E ⚡ JUST ADD MORE POWER TO JS & WASM AND STIR 🤖
P O R TA B L E C O M P U T E D Y N A M I C FA A S
P O R TA B L E C O M P U T E D Y N A M I C FA A S • Run everything locally by default • Good for devs with powerful machines • Slow for students with Chromebooks
P O R TA B L E C O M P U T E D Y N A M I C FA A S • Run everything locally by default • Good for devs with powerful machines • Slow for students with Chromebooks • Farm out longer running computation to service providers • …dynamically at runtime
P O R TA B L E C O M P U T E D Y N A M I C FA A S • Run everything locally by default • Good for devs with powerful machines • Slow for students with Chromebooks • Farm out longer running computation to service providers • …dynamically at runtime • Heavy compute, parallel workloads, &c
P O R TA B L E C O M P U T E APPROACH & TRADE-OFFS
P O R TA B L E C O M P U T E APPROACH & TRADE-OFFS • Code-as-data • Memoization • Compiler techniques at web scale (“world computer”) • Network latency (normally zero, now x) • Restricted subset (e.g. total) • Event-based w/ two-phase commit • Trusted (incl. AWS Lambda 🤷)
P O R TA B L E C O M P U T E T O TA L I T Y
P O R TA B L E C O M P U T E T O TA L I T Y Side Effects Pure Functions E
P O R TA B L E C O M P U T E T O TA L I T Y Side Effects Pure Functions E
P O R TA B L E C O M P U T E T O TA L I T Y Side Effects Pure Functions E
P O R TA B L E C O M P U T E E V E N T B AS E D ( A B ST R ACT U S E R ST R E A M, C R DTS )
P O R TA B L E C O M P U T E E V E N T B AS E D ( A B ST R ACT U S E R ST R E A M, C R DTS ) Off-Platform Side Effect Stream Platform Effect Stream Pure Function Stream Base Event Stream
P O R TA B L E C O M P U T E E V E N T B AS E D ( A B ST R ACT U S E R ST R E A M, C R DTS ) Off-Platform Side Effect Stream Platform Effect Stream Pure Function Stream Base Event Stream
P O R TA B L E C O M P U T E E V E N T B AS E D ( A B ST R ACT U S E R ST R E A M, C R DTS ) Off-Platform Side Effect Stream Platform Effect Stream Pure Function Stream Base Event Stream
P O R TA B L E C O M P U T E E V E N T B AS E D ( A B ST R ACT U S E R ST R E A M, C R DTS ) Off-Platform Side Effect Stream Platform Effect Stream Pure Function Stream Base Event Stream
P O R TA B L E C O M P U T E E V E N T B AS E D ( A B ST R ACT U S E R ST R E A M, C R DTS ) Off-Platform Side Effect Stream Platform Effect Stream Pure Function Stream Base Event Stream
P O R TA B L E C O M P U T E E V E N T B AS E D ( A B ST R ACT U S E R ST R E A M, C R DTS ) Off-Platform Side Effect Stream Platform Effect Stream Pure Function Stream Base Event Stream
P O R TA B L E C O M P U T E E V E N T B AS E D ( A B ST R ACT U S E R ST R E A M, C R DTS ) Off-Platform Side Effect Stream Platform Effect Stream Pure Function Stream Base Event Stream
ENCRYPTED COMPUTE
ENCRYPTED COMPUTE 🙈 T R U S T L E S S D LY S E N D , R U N , & V E R I F Y 💌
ENCRYPTED COMPUTE ZERO-KNOWLEDGE PROOFS
ENCRYPTED COMPUTE ZERO-KNOWLEDGE PROOFS
ENCRYPTED COMPUTE ZERO-KNOWLEDGE PROOFS
ENCRYPTED COMPUTE ZERO-KNOWLEDGE PROOFS 🏥✴ 🙆😭 ✴😅 😛🏥 🐶 😅 🙆 😭 😻👋 🙆 😻🏥 😻 😛 😭 👋 🌳 😅✴ 🐶😻 😭🌳 🌳🏥 😻 👋 🐶 🙆✴ 🌳
ENCRYPTED COMPUTE ZERO-KNOWLEDGE PROOFS 🏥✴ 🙆😭 ✴😅 😛🏥 🐶 😅 🙆 😭 😻👋 🙆 😻🏥 😻 😛 😭 👋 🌳 😅✴ 🐶😻 😭🌳 🌳🏥 😻 👋 🐶 🙆✴ 🌳 • Verify compute result • Reveal no information • Interesting for trustless compute providers
ENCRYPTED COMPUTE C O M P U T I N G O V E R E N C R Y P T E D D ATA Cleartext encrypt compute’ compute Clear Result Cyphertext encrypt Encrypted Result
L I C E N S I N G I N N O V AT I O N
L I C E N S I N G I N N O V AT I O N ⚖ FOR THE FIRST TIME IN 15 YEARS!
L I C E N S E I N N O VAT I O N WHY NOW?
L I C E N S E I N N O VAT I O N WHY NOW? • Cloud providers making record profits on top of FLOSS projects
L I C E N S E I N N O VAT I O N WHY NOW? • Cloud providers making record profits on top of FLOSS projects • e.g. Mongo relicensing
L I C E N S E I N N O VAT I O N WHY NOW? • Cloud providers making record profits on top of FLOSS projects • e.g. Mongo relicensing • Why does macOS Catalina ship with zsh instead of bash?
L I C E N S E I N N O VAT I O N WHY NOW? • Cloud providers making record profits on top of FLOSS projects • e.g. Mongo relicensing • Why does macOS Catalina ship with zsh instead of bash?
L I C E N S E I N N O VAT I O N AS A SHIELD 🛡
L I C E N S E I N N O VAT I O N AS A SHIELD 🛡 • Do you think current licenses are the best we’ll ever have?
L I C E N S E I N N O VAT I O N AS A SHIELD 🛡 • Do you think current licenses are the best we’ll ever have? • Anti 996-License-1.0 • Derived from MIT License • Chinese expression “996.ICU”
L I C E N S E I N N O VAT I O N D ATA E T H I C S / D ATA L I C E N S E S
L I C E N S E I N N O VAT I O N D ATA E T H I C S / D ATA L I C E N S E S • In 2001, people stored credit card details directly in their DB • Why do people think it’s okay to store PII? • These techniques & platforms make it so you can’t touch user data!
MAKING LIFE EASIER
MAKING LIFE EASIER 🧱 PUT TING IT ALL TOGE THER 🥳
MAKING LIFE EASIER T H E N E X T W AV E O F P L AT F O R M S
MAKING LIFE EASIER Global Storage T H E N E X T W AV E O F P L AT F O R M S FILES 📄 D ATA B A S E 🛢
MAKING LIFE EASIER Global Storage FILES 📄 D ATA B A S E 🛢 Digital Scarcity T H E N E X T W AV E O F P L AT F O R M S IDENTITY 🙋 CHECKPOINTS 🕚
MAKING LIFE EASIER Global Storage FILES 📄 D ATA B A S E 🛢 Digital Scarcity IDENTITY 🙋 CHECKPOINTS 🕚 Portable Compute T H E N E X T W AV E O F P L AT F O R M S DISTRIBUTED COMPUTE 🖥 SMART CONTRACTS 📝
A U N I V E R S A L H O S T L E S S S U B S T R AT E RECAP
A U N I V E R S A L H O S T L E S S S U B S T R AT E RECAP • Build and use fully locally • No such thing as “deployment” • Zero config • Default: only serve the app, not data • Efficient bandwidth
A U N I V E R S A L H O S T L E S S S U B S T R AT E RECAP • One login for all accounts • Build and use fully locally • Device-based authentication • No such thing as “deployment” • Military-grade security • Zero config • User owned data • Default: only serve the app, not data • Share nothing with site/app by default • Efficient bandwidth • Flexible FaaS without pre-deployment • Offline-first and local-network aware
A U N I V E R S A L H O S T L E S S S U B S T R AT E T H E E N D O F H I STO RY
A U N I V E R S A L H O S T L E S S S U B S T R AT E T H E E N D O F H I STO RY High Touch Invisible Custom Product / Rental Commodity / Utility
A U N I V E R S A L H O S T L E S S S U B S T R AT E T H E E N D O F H I STO RY High Touch Ba rrie r to En try Invisible Custom Product / Rental Commodity / Utility
A U N I V E R S A L H O S T L E S S S U B S T R AT E T H E E N D O F H I STO RY High Touch Bespoke Ba Private Ownership rrie r to En try Shared Hosting Serverless Universal Invisible Custom Product / Rental Commodity / Utility
https://fission.codes https://talk .fission.codes https://tools.fission.codes Y THANK YOU, MALMÖ 🎉 brooklyn@fission.codes g i t h u b . c o m /e x p e d e @expede
Key takeaways
The last 60 years has seen the rise and fall of several models of computing: mainframes, private server, shared hosting, containers, and serverless (to name a few). We have one final phase left: “hostless” or universal apps. By leveraging technologies like secure multiparty compute, the content-addressable web, blockchain, and the rise of Wasm, we are seeing the beginnings of a future liberated from specialized providers, acting on a distributed substrate of store and compute. With all this in place, users fully control their own data (and it never touches your servers), deployment is as simple as setting a flag on your local environment, and developers maintain zero infrastructure. Come learn about what is being built today for the next wave of computing, how we evolve past the serverless paradigm, and how it can make life simpler for developers and end users!