IPFS: Re-distributing the Web

IPFS: Re-distributing the Web

Slides from my presentation at DTN Conf (http://dtn.is) on May 2015

A9670c143716320893863524a0efbaff?s=128

Juan Batiz-Benet

May 24, 2015
Tweet

Transcript

  1. ipfs.io @IPFSbot Juan Benet @juanbenet 2015-05-24 The Permanent Web

  2. WIFI SSID: / PASS:

  3. WIFI SSID: / PASS:

  4. ipfs.io @IPFSbot Juan Benet @juanbenet 2015-05-24 The Permanent Web

  5. ipfs.io @IPFSbot Juan Benet @juanbenet 2015-05-24 The Permanent Web Distribute

  6. ipfs.io @IPFSbot Juan Benet @juanbenet 2015-05-24 The Permanent Web Re-

  7. 1. What is IPFS? 2. IPFS Intro 3. Layering 4.

    Datastructures 5. Demo
  8. What is IPFS?

  9. What is IPFS?

  10. None
  11. None
  12. None
  13. None
  14. None
  15. None
  16. None
  17. A protocol to upgrade the web

  18. None
  19. Distributed

  20. Distributed Offline

  21. Permanent Distributed Offline

  22. Permanent Distributed Smarter Offline

  23. Permanent Distributed Safer Smarter Offline

  24. Permanent Distributed Safer Smarter Offline Faster

  25. None
  26. None
  27. None
  28. None
  29. None
  30. None
  31. 2026

  32. None
  33. None
  34. 2026

  35. 2026 1991

  36. 2026 1991 2015

  37. 2026 1991 2015 24 11

  38. 2026 1991 2015 24 11 11

  39. 2026 1991 2015 24 11 11

  40. None
  41. None
  42. What is IPFS?

  43. None
  44. hyperlinks

  45. hyperlinks media

  46. a hypermedia transport protocol HTTP

  47. web

  48. SFS web

  49. SFS web

  50. SFS web

  51. SFS web DHT

  52. SFS web DHT +

  53. None
  54. None
  55. None
  56. None
  57. None
  58. What is IPFS?

  59. 1. A Protocol Stack 2. Tools + Programs 3. A

    Live System
  60. web DHT SFS

  61. web DHT SFS routing network exchange merkledag naming applications The

    Stack
  62. routing network exchange merkledag naming applications The Stack

  63. routing network exchange merkledag naming applications The Stack Defining the

    Data Moving the Data Using the Data
  64. routing network exchange merkledag naming applications The Stack Defining the

    Data Moving the Data Using the Data
  65. routing network exchange merkledag naming applications IPNS Bitswap QUIC TCP

    uTP WebRTC WebSockets Git Bitcoin VLC Etherpad Chat UDT CJDNS Kad DHT mDNS
  66. routing network exchange merkledag naming applications IPNS Bitswap QUIC TCP

    uTP WebRTC WebSockets UDT CJDNS Kad DHT mDNS Git Bitcoin VLC Etherpad Chat
  67. routing network exchange merkledag naming applications IPNS DNS Namecoin Bitswap

    HTTP BitTorrent Kad DHT Chord mDNS Gossip Delegated FTP TOR QUIC TOR TCP uTP WebRTC WebSockets Git Bitcoin VLC Etherpad Chat I2P I2P CJDNS UDT
  68. IP UDP TCP SCTP Ethernet CSMA WIFI TP Coax Satellite

    Fiber Radio PPP HTTP SMTP FTP NFS Skype Pigeons Chat
  69. IP UDP TCP SCTP Ethernet CSMA WIFI TP Coax Satellite

    Fiber Radio PPP HTTP SMTP FTP NFS Skype Pigeons Chat
  70. None
  71. None
  72. None
  73. None
  74. None
  75. None
  76. None
  77. None
  78. Content Addressing 1. Motivation

  79. http://10.20.30.40/foo/bar/baz.png location path http://example.com/foo/bar/baz.png 1. Motivation

  80. http:// location path http:// 1. Motivation /ipns/example.com/foo/bar/baz.png /ipfs/QmW98pJrc6FZ6/foo/bar/baz.png content path

  81. http://10.20.30.40/foo/bar/baz.png you 1. Motivation /ipfs/QmW98pJrc6FZ6/foo/bar/baz.png

  82. http://10.20.30.40/foo/bar/baz.png 10.20.30.40 you 1. Motivation /ipfs/QmW98pJrc6FZ6/foo/bar/baz.png HTTP

  83. http://10.20.30.40/foo/bar/baz.png 10.20.30.40 you 1. Motivation /ipfs/QmW98pJrc6FZ6/foo/bar/baz.png IPFS

  84. 1. Motivation p2p distribution /ipfs/

  85. 1. Motivation p2p distribution /ipfs/

  86. merkledag 2. Overview the model IPFS nodes

  87. merkledag 2. Overview the model IPFS nodes (content) (programs)

  88. in IPFS data forms a merkle dag nodes have links

    and data [ (hash, size, name), … ] QmbTJW4iGGBS 3987 foo QmbTQmPMEFgh 1020 bar QmZFJguywFUY 6787 baz anything you want []byte links data 2. Overview
  89. can resolve unix-style paths across dag links 2. Overview QmbTJW4iGGBS

    3987 foo QmbTQmPMEFgh 1020 bar QmZFJguywFUY 6787 baz QmbTQmPMEFgh 1020 biff this node has some data… this node also has some data. but no links! 1 3 5 2 4 suppose links:
  90. can resolve unix-style paths across dag links 2. Overview QmbTJW4iGGBS

    3987 foo QmbTQmPMEFgh 1020 bar QmZFJguywFUY 6787 baz QmbTQmPMEFgh 1020 biff this node has some data… this node also has some data. but no links! suppose H(<1>) = QmW98pJrc6FZ We can resolve: /ipfs/QmW98pJrc6FZ as 1 /ipfs/QmW98pJrc6FZ/foo as 2 /ipfs/QmW98pJrc6FZ/bar as 3 /ipfs/QmW98pJrc6FZ/foo/biff as 3 /ipfs/QmW98pJrc6FZ/baz as 4 1 3 5 1 2 2 3 4 4 3 suppose links: 1
  91. can resolve unix-style paths across dag links 2. Overview QmbTJW4iGGBS

    3987 foo QmbTQmPMEFgh 1020 bar QmZFJguywFUY 6787 baz QmbTQmPMEFgh 1020 biff this node has some data… this node also has some data. but no links! suppose H(<1>) = QmW98pJrc6FZ We can resolve: /ipfs/QmW98pJrc6FZ as 1 /ipfs/QmW98pJrc6FZ/foo as 2 /ipfs/QmW98pJrc6FZ/bar as 3 /ipfs/QmW98pJrc6FZ/foo/biff as 3 /ipfs/QmW98pJrc6FZ/baz as 4 1 3 5 1 2 2 3 4 4 3 suppose links: 1
  92. can resolve unix-style paths across dag links 2. Overview QmbTJW4iGGBS

    3987 foo QmbTQmPMEFgh 1020 bar QmZFJguywFUY 6787 baz QmbTQmPMEFgh 1020 biff this node has some data… this node also has some data. but no links! suppose H(<1>) = QmW98pJrc6FZ We can resolve: /ipfs/QmW98pJrc6FZ as 1 /ipfs/QmW98pJrc6FZ/foo as 2 /ipfs/QmW98pJrc6FZ/bar as 3 /ipfs/QmW98pJrc6FZ/foo/biff as 3 /ipfs/QmW98pJrc6FZ/baz as 4 1 3 5 1 2 2 3 4 4 3 suppose links: 1
  93. can resolve unix-style paths across dag links 2. Overview QmbTJW4iGGBS

    3987 foo QmbTQmPMEFgh 1020 bar QmZFJguywFUY 6787 baz QmbTQmPMEFgh 1020 biff this node has some data… this node also has some data. but no links! suppose H(<1>) = QmW98pJrc6FZ We can resolve: /ipfs/QmW98pJrc6FZ as 1 /ipfs/QmW98pJrc6FZ/foo as 2 /ipfs/QmW98pJrc6FZ/bar as 3 /ipfs/QmW98pJrc6FZ/foo/biff as 3 /ipfs/QmW98pJrc6FZ/baz as 4 1 3 5 1 2 2 3 4 4 3 suppose links: 1
  94. can resolve unix-style paths across dag links 2. Overview QmbTJW4iGGBS

    3987 foo QmbTQmPMEFgh 1020 bar QmZFJguywFUY 6787 baz QmbTQmPMEFgh 1020 biff this node has some data… this node also has some data. but no links! suppose H(<1>) = QmW98pJrc6FZ We can resolve: /ipfs/QmW98pJrc6FZ as 1 /ipfs/QmW98pJrc6FZ/foo as 2 /ipfs/QmW98pJrc6FZ/bar as 3 /ipfs/QmW98pJrc6FZ/foo/biff as 3 /ipfs/QmW98pJrc6FZ/baz as 4 1 3 5 1 2 2 3 4 4 3 suppose links: 1
  95. can resolve unix-style paths across dag links 2. Overview QmbTJW4iGGBS

    3987 foo QmbTQmPMEFgh 1020 bar QmZFJguywFUY 6787 baz QmbTQmPMEFgh 1020 biff this node has some data… this node also has some data. but no links! suppose H(<1>) = QmW98pJrc6FZ We can resolve: /ipfs/QmW98pJrc6FZ as 1 /ipfs/QmW98pJrc6FZ/foo as 2 /ipfs/QmW98pJrc6FZ/bar as 3 /ipfs/QmW98pJrc6FZ/foo/biff as 3 /ipfs/QmW98pJrc6FZ/baz as 4 1 3 5 1 2 2 3 4 4 3 suppose links: 1
  96. any data structures are represented as dags 2. Overview

  97. 2. Overview unix files and dirs any data structures are

    represented as dags
  98. blob, tree, commit unix files and dirs any data structures

    are represented as dags 2. Overview
  99. blob, tree, commit unix files and dirs any data structures

    are represented as dags blocks, txns, wallets 2. Overview
  100. blob, tree, commit unix files and dirs any data structures

    are represented as dags blocks, txns, wallets kv-stores 2. Overview
  101. blob, tree, commit unix files and dirs any data structures

    are represented as dags blocks, txns, wallets kv-stores 2. Overview
  102. unixfs as a dag 2. Overview

  103. files are dag nodes unixfs as a dag 2. Overview

  104. files are dag nodes BIG files may be split into

    many unixfs as a dag 2. Overview
  105. directories are also dag nodes files are dag nodes BIG

    files may be split into many unixfs as a dag 2. Overview
  106. which link to others directories are also dag nodes files

    are dag nodes BIG files may be split into many unixfs as a dag 2. Overview
  107. ipfs paths /ipfs/<hash-of-object>/<name-path-to-object>

  108. ipfs paths /ipfs/<hash-of-object>/<name-path-to-object> /ipfs/XLYkgq61DYaQ8Nhk/foo/bar.txt

  109. ipfs paths /ipfs/<hash-of-object>/<name-path-to-object> /ipfs/XLYkgq61DYaQ8Nhk/foo/bar.txt XLYkgq61DYaQ8Nhk

  110. ipfs paths /ipfs/<hash-of-object>/<name-path-to-object> /ipfs/XLYkgq61DYaQ8Nhk/foo/bar.txt foo aCpDMGv XLYkgq61DYaQ8Nhk data1

  111. ipfs paths /ipfs/<hash-of-object>/<name-path-to-object> /ipfs/XLYkgq61DYaQ8Nhk/foo/bar.txt foo aCpDMGv XLYkgq61DYaQ8Nhk data1

  112. ipfs paths /ipfs/<hash-of-object>/<name-path-to-object> /ipfs/XLYkgq61DYaQ8Nhk/foo/bar.txt foo aCpDMGv XLYkgq61DYaQ8Nhk data1 aCpDMGvV2BGHeYER

  113. ipfs paths /ipfs/<hash-of-object>/<name-path-to-object> /ipfs/XLYkgq61DYaQ8Nhk/foo/bar.txt foo aCpDMGv XLYkgq61DYaQ8Nhk data1 bar.txt UEnRQAw

    aCpDMGvV2BGHeYER data2
  114. ipfs paths /ipfs/<hash-of-object>/<name-path-to-object> /ipfs/XLYkgq61DYaQ8Nhk/foo/bar.txt foo aCpDMGv XLYkgq61DYaQ8Nhk data1 bar.txt UEnRQAw

    aCpDMGvV2BGHeYER data2 UEnRQAwe3N8SzbUt data3
  115. ipfs paths: blockchain /ipfs/XLYkgq61DYaQ8Nhk/parent/tx/15

  116. ipfs paths: blockchain /ipfs/XLYkgq61DYaQ8Nhk/parent/tx/15 parent <hash1> XLYkgq61DYaQ8Nhk data1

  117. ipfs paths: blockchain /ipfs/XLYkgq61DYaQ8Nhk/parent/tx/15 parent <hash1> XLYkgq61DYaQ8Nhk data1 <hash1>

  118. ipfs paths: blockchain /ipfs/XLYkgq61DYaQ8Nhk/parent/tx/15 parent <hash1> XLYkgq61DYaQ8Nhk data1 tx <hash3>

    <hash1> data2 parent <hash2>
  119. ipfs paths: blockchain /ipfs/XLYkgq61DYaQ8Nhk/parent/tx/15 parent <hash1> XLYkgq61DYaQ8Nhk data1 tx <hash3>

    <hash1> data2 <hash3> parent <hash2>
  120. ipfs paths: blockchain /ipfs/XLYkgq61DYaQ8Nhk/parent/tx/15 parent <hash1> XLYkgq61DYaQ8Nhk data1 tx <hash3>

    <hash1> data2 <hash3> data3 15 <hash5> parent <hash2> 14 <hash4>
  121. ipfs paths: blockchain /ipfs/XLYkgq61DYaQ8Nhk/parent/tx/15 parent <hash1> XLYkgq61DYaQ8Nhk data1 tx <hash3>

    <hash1> data2 <hash3> data3 15 <hash5> <hash5> parent <hash2> 14 <hash4>
  122. ipfs paths: blockchain /ipfs/XLYkgq61DYaQ8Nhk/parent/tx/15 parent <hash1> XLYkgq61DYaQ8Nhk data1 tx <hash3>

    <hash1> data2 <hash3> data3 15 <hash5> <hash5> data4 input0 <hash6> parent <hash2> 14 <hash4> output0 <hash7>
  123. an IPFS node 2. Overview

  124. has pki based identity an IPFS node 2. Overview

  125. has pki based identity connects to others an IPFS node

    2. Overview
  126. can store part of the dag has pki based identity

    connects to others an IPFS node 2. Overview
  127. has pki based identity connects to others can get more

    from peers an IPFS node can store part of the dag 2. Overview
  128. has pki based identity connects to others can be run

    as a server can get more from peers an IPFS node can store part of the dag 2. Overview
  129. has pki based identity connects to others can be run

    as a server or embedded in apps app
 
 can get more from peers an IPFS node can store part of the dag 2. Overview
  130. 2. Overview IPFS nodes form p2p networks transport agnostic and

    with NAT traversal
  131. they find each other and content with routing systems, like

    DHTs 2. Overview
  132. and exchange dag nodes like files in http or bittorrent

    2. Overview
  133. and exchange dag nodes like files in http or bittorrent

    2. Overview
  134. and exchange dag nodes like files in http or bittorrent

    2. Overview
  135. DEMO

  136. 4 ways to install IPFS 0. wget from an ifs

    link 1. npm install -g go-ipfs 2. go get github.com/ipfs/go-ipfs/cmd/ipfs 3. install packages on the website
  137. in go-ipfs: ipfs node cli library http api http/ipfs gateway

    webui
  138. #ipfs on