Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Serverless meets Serverfree

Paul Frazee
October 21, 2016

Serverless meets Serverfree

The Decentralized Web accomplishes the same business goals as Serverless while providing new benefits for users

Paul Frazee

October 21, 2016

Other Decks in Technology


  1. Serverless meets Serverfree

  2. What is Serverless?

  3. Abstrac(ng servers away

  4. Why? Management costs ,me and money but doesn't deliver core

  5. How? Let someone else do it! Lambda, OpenWhisk, Azure, etc.

  6. Thinking in Func+ons Applica'ons become a collec'on of events that

    trigger func)ons • Frees up engineering ,me and resources (less ops) • Scaling and availability built-in • Cost-efficient
  7. Serverless A Solu'on for be-er business: How can we do

    more for less?
  8. None
  9. Serverfree Decentralized Web and P2P

  10. Unserved User Needs • Work offline & control data •

    Independent publishing • Confiden:ality
  11. Unserved User Needs Plus the usual stuff • Cheaper •

    Faster • Easier
  12. The New Technologies • Blockchain variants • BitTorrent variants •

  13. Blockchain variants • Bitcoin • Ethereum • Blockstack • Zcash

    • etc
  14. BitTorrent variants • BitTorrent / WebTorrent • IPFS • Dat

  15. Others • InterLedger Protocol • Matrix • GNU Social •

  16. Trustless compu-ng Both Blockchains and "BitTorrents"

  17. Trustless compu-ng No need to entrust a host with decisions

  18. Trustless compu-ng: Blockchains • Proof-of-Work consensus • Nodes take turns

    wri5ng transac5on-blocks • All nodes validate the blocks • In math (and protocol) we trust
  19. Trustless compu-ng: BitTorrents • Content-addressing • Pubkey address replaces IP

    address • Benefits: • No host/content binding • Cheap domain alloca?on • Buil?n horizontal scaling
  20. Trustless compu-ng Enables serverfree

  21. Serverfree Applica'ons run on the device, and use device resources

    • No central host • Store data on the device • Interact with device and protocol APIs
  22. Serverfree Feature advantages • Work offline: Download and run from

    cache • Independent publishing: Cheap and easy domain alloca>on • Confiden>ality: • Store data on the device • P2P and E2E Encryp>on
  23. None
  24. Serverless, Serverfree How can they relate?

  25. Serverless... Business advantages • Less ops • Buil,n scaling •

  26. Serverfree The same business advantages • Less ops: so)ware runs

    on user device • Buil5n scaling: discovery network • Cost-efficient: hos5ng is reduced to cost of content-delivery
  27. The Takeaway Serverfree accomplishes the same business goals as Serverless

    while providing new benefits for users
  28. The Tradeoff A very different execu/on environment: a distributed network

    of user devices
  29. What is that environment going to be like? Depends on

    the stack
  30. Trustless Hypermedia Replace HTTP with IPFS and Dat

  31. Dat: URLs

  32. Shortnames dat://beaker.com/ DNS TXT record: dat://39bf8a..04/

  33. Versioning • Dats are mutable & versioned • Version history

    by append-only log • Enables lookup @ specific version
  34. Versioned URLs

  35. Secret sharing • URL is unguessable • URL is used

    to encrypt connec6on • URL is hashed before pu9ng it into the discovery network • Result: you have to know the URL to download the Dat
  36. Dat • Hostless, P2P • Shortnames • Versioned • Confiden7al

  37. IPFS • Hostless, P2P • Shortnames (ipfs:/ipns/{name}) • Filecoin (coming

  38. Demo

  39. How will applica*ons change?

  40. More like desktop/mobile apps • Store data on device •

    Network as-needed • Tightly sandboxed and permissioned
  41. Most fun change: Interac(ng with the protocols

  42. Create a new archive: var archive = dat.createArchive() Write v1.0.0:

    await archive.writeFile('hello.txt', 'hello world') await archive.checkpoint('1.0.0') Host on the network: archive.share() archive.getURL()
  43. How does an applica.on store data? Files: Offline Dats Maybe

    also SQLite
  44. Content Publishing Example Write /statuses/1476158881976.json {"message":"Hello, World!"}

  45. Separa&ng app from data • Seman'c data sets: Album, User

    Profile, Chat-log • Applica'ons register as handlers • "Open with..." • Perhaps also intents
  46. ServiceWorkers • Server on the device • Dynamic client-side Web

  47. Web Services Some%mes, you just need a service.

  48. P2P vs Centralized It's about consensus • Eventual Consistency: BitTorrents

    • Strict Consistency: Services & Blockchains
  49. P2P vs Centralized It's also about transac.ons • Async, NO

    transac.ons: BitTorrents • Async, has transac.ons: Blockchains • Sync or Async: Services
  50. Web Services Some%mes, you just need a service. ...but it

    can probably be serverless.
  51. None