rdm#2- the distributed web

118
RDM#2 LISBON Research & Development Meetup

Upload: david-dias

Post on 12-Apr-2017

438 views

Category:

Engineering


2 download

TRANSCRIPT

Page 1: RDM#2- The Distributed Web

RDM#2

LISBON

Research & Development Meetup

Page 2: RDM#2- The Distributed Web

LISBON

David Dias, P2P SE&R @ Protocol Labs

João Ascensão, Data Scientist @ Uniplaces

tw: @daviddias gh: @diasdavid

tw: @jtascensao gh: @jtascensao

Page 3: RDM#2- The Distributed Web

LISBON

What is RDM?

Page 4: RDM#2- The Distributed Web

LISBON

Space to invest time in learning things that are hard to grasp

Page 5: RDM#2- The Distributed Web

LISBON

world of possibilities

Page 6: RDM#2- The Distributed Web

LISBON

what actually gets researched

Page 7: RDM#2- The Distributed Web

LISBON

what gets developed

Page 8: RDM#2- The Distributed Web

LISBON

what gets deployed

Page 9: RDM#2- The Distributed Web

LISBON

what most people are doing

Page 10: RDM#2- The Distributed Web

PROTOCOL LABS

Page 11: RDM#2- The Distributed Web

LISBON

FORMAT

- New topics / Research - Hacking + Digesting + Publishing

Page 12: RDM#2- The Distributed Web

LISBON

TODAY

- The Distributed Web - Machine Learning / AI

Page 13: RDM#2- The Distributed Web
Page 14: RDM#2- The Distributed Web

The Distributed Web

Page 15: RDM#2- The Distributed Web
Page 16: RDM#2- The Distributed Web
Page 17: RDM#2- The Distributed Web
Page 18: RDM#2- The Distributed Web
Page 19: RDM#2- The Distributed Web
Page 20: RDM#2- The Distributed Web
Page 21: RDM#2- The Distributed Web
Page 22: RDM#2- The Distributed Web

Serve data to everywhere

Page 23: RDM#2- The Distributed Web

• Motivations

• IPFS, the Protocol

• MerkleDAG (Directed Acyclic Graph)

• DHT (Distributed Hash Table)

Page 24: RDM#2- The Distributed Web

• Motivations

• IPFS, the Protocol, MerkleDAG, IPNS, Network

• IPFS in action

• IPFS, the project

• filecoin

• libp2p

• starship

• gx

• full IPFS JavaScript implementation

• mutable file system and the files API

• Other DHT

• Structure P2P Networks

• Unstructured P2P Networks

• NAT Traversal

• Relay/Turn

• registry-mirror

• smart chunking

• Transports

• Multiplexers

• Self Describing Data Types

• Search

• Station

• and more

Page 25: RDM#2- The Distributed Web
Page 26: RDM#2- The Distributed Web
Page 27: RDM#2- The Distributed Web
Page 28: RDM#2- The Distributed Web

Location Addressing

Page 29: RDM#2- The Distributed Web

http://10.20.30.40/foo/bar/baz.png

location path

http://example.com/foo/bar/baz.png

Page 30: RDM#2- The Distributed Web

http://10.20.30.40/foo/bar/baz.png

you

Page 31: RDM#2- The Distributed Web

http://10.20.30.40/foo/bar/baz.png

10.20.30.40

you

Page 32: RDM#2- The Distributed Web

http://10.20.30.40/foo/bar/baz.png

10.20.30.40

you

Page 33: RDM#2- The Distributed Web
Page 34: RDM#2- The Distributed Web
Page 35: RDM#2- The Distributed Web
Page 36: RDM#2- The Distributed Web
Page 37: RDM#2- The Distributed Web

200 MB

Page 38: RDM#2- The Distributed Web

200 MB x 30 x 8 = 48 GB

Page 39: RDM#2- The Distributed Web

2,544,837,694

Page 40: RDM#2- The Distributed Web

2,387,990,609

508.968 PB

Page 41: RDM#2- The Distributed Web

Bandwidth

Page 42: RDM#2- The Distributed Web
Page 43: RDM#2- The Distributed Web

https://www.backblaze.com/blog/price-gap-storage-vs-bandwidth/

Page 44: RDM#2- The Distributed Web

Latency

Page 45: RDM#2- The Distributed Web

Amazon Google

DataCenters

Page 46: RDM#2- The Distributed Web

Disconnected / Offline

Page 47: RDM#2- The Distributed Web
Page 48: RDM#2- The Distributed Web
Page 49: RDM#2- The Distributed Web
Page 50: RDM#2- The Distributed Web
Page 51: RDM#2- The Distributed Web
Page 52: RDM#2- The Distributed Web
Page 53: RDM#2- The Distributed Web

low bw interference congestion travelisp outagedatacenter

Page 54: RDM#2- The Distributed Web

Permanence Security

IoT

Control

Offline

Bandwidth

Disconnected

Page 55: RDM#2- The Distributed Web

InterPlanetary FileSystem

Page 56: RDM#2- The Distributed Web

a protocol to upgrade the web

Page 57: RDM#2- The Distributed Web

InterPlanetary FileSystem

Page 58: RDM#2- The Distributed Web
Page 59: RDM#2- The Distributed Web

InterPlanetary FileSystem

Page 60: RDM#2- The Distributed Web

DISTRIBUTEDPERMANENT

MERKLETHE WEB

Page 61: RDM#2- The Distributed Web

PermanentDistributed Safer

SmarterOffline

Faster

Page 62: RDM#2- The Distributed Web

SFS

web

DHT+

Page 63: RDM#2- The Distributed Web

web

DHT

SFS

routing

network

exchange

merkledag

naming

applications

The Stack

Page 64: RDM#2- The Distributed Web

routing

network

exchange

merkledag

naming

applicationsThe Stack

Defining the Data

Moving the Data

Using the Data

IPLD

libp2p

IPNS

Page 65: RDM#2- The Distributed Web
Page 66: RDM#2- The Distributed Web

8AyaTQMhJklMoGa3WaDgwcAEPcKQeipgDu64qajkr3fNcVt1LVMD

KQsXSobGtbNhFsv3qA44E7iXAygcuSfVhW8RV3zR9F3MFvbVaqf9

Page 67: RDM#2- The Distributed Web

8AyaTQMhJklMoGa3WaDgwcAEPcKQeipgDu64qajkr3fNcVt1LVMD

hash( ) -> KQsXSobGtbNhF

KQsXSobGtbNhFsv3qA44E7iXAygcuSfVhW8RV3zR9F3MFvbVaqf9

Page 68: RDM#2- The Distributed Web

8AyaTQMhJklMoGa3WaDgwcAEPcKQeipgDu64qajkr3fNcVt1LVMD

hash( ) -> KQsXSobGtbNhF

KQsXSobGtbNhFsv3qA44E7iXAygcuSfVhW8RV3zR9F3MFvbVaqf9

MERKLE LINK

Page 69: RDM#2- The Distributed Web
Page 70: RDM#2- The Distributed Web
Page 71: RDM#2- The Distributed Web
Page 72: RDM#2- The Distributed Web
Page 73: RDM#2- The Distributed Web
Page 74: RDM#2- The Distributed Web
Page 75: RDM#2- The Distributed Web

cvs/svn

Page 76: RDM#2- The Distributed Web

cvs/svn

Page 77: RDM#2- The Distributed Web

cvs/svn

Page 78: RDM#2- The Distributed Web
Page 79: RDM#2- The Distributed Web
Page 80: RDM#2- The Distributed Web
Page 81: RDM#2- The Distributed Web
Page 82: RDM#2- The Distributed Web
Page 83: RDM#2- The Distributed Web

merkledag

Page 84: RDM#2- The Distributed Web

in IPFS data forms a dag

it’s called the merkle dagbecause the links are hashes

Page 85: RDM#2- The Distributed Web

any data structures are represented as dags

Page 86: RDM#2- The Distributed Web

unix files and dirs

any data structures are represented as dags

Page 87: RDM#2- The Distributed Web

blob, tree, commit

unix files and dirs

any data structures are represented as dags

Page 88: RDM#2- The Distributed Web

blob, tree, commit

unix files and dirs

any data structures are represented as dags

blocks, txns, wallets

Page 89: RDM#2- The Distributed Web

blob, tree, commit

unix files and dirs

any data structures are represented as dags

blocks, txns, wallets

kv-stores

Page 90: RDM#2- The Distributed Web

blob, tree, commit

unix files and dirs

any data structures are represented as dags

blocks, txns, wallets

kv-stores

Page 91: RDM#2- The Distributed Web

unixfs as a dag

Page 92: RDM#2- The Distributed Web

files are dag nodes

unixfs as a dag

Page 93: RDM#2- The Distributed Web

files are dag nodes

BIG files may be split into many

unixfs as a dag

Page 94: RDM#2- The Distributed Web

directories are also dag nodes

files are dag nodes

BIG files may be split into many

unixfs as a dag

Page 95: RDM#2- The Distributed Web

which link to others

directories are also dag nodes

files are dag nodes

BIG files may be split into many

unixfs as a dag

Page 96: RDM#2- The Distributed Web

http://10.20.30.40/foo/bar/baz.pnglocation path

http://example.com/foo/bar/baz.png

Page 97: RDM#2- The Distributed Web

http://10.20.30.40/foo/bar/baz.pnglocation path

http://example.com/foo/bar/baz.png

/ipns/example.com/foo/bar/baz.png

/ipfs/QmW98pJrc6FZ6/foo/bar/baz.pngcontent path

Page 98: RDM#2- The Distributed Web

10.20.30.40

you

HTTP

http://10.20.30.40/foo/bar/baz.png

/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png

Page 99: RDM#2- The Distributed Web

http://10.20.30.40/foo/bar/baz.png

10.20.30.40

you

/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png

IPFS

Page 100: RDM#2- The Distributed Web

/ipfs/QmW98pJrc6FZ6/foo/bar/baz.pngcontent path

Page 101: RDM#2- The Distributed Web

/ipfs/QmW98pJrc6FZ6/foo/bar/baz.pngcontent path

Page 102: RDM#2- The Distributed Web

/ipfs/QmW98pJrc6FZ6/foo/bar/baz.pngcontent path

foo

bar

baz.png

QmW98pJrc6FZ6

Page 103: RDM#2- The Distributed Web

/ipfs/QmW98pJrc6FZ6/foo/bar/baz.pngcontent path

foo:HB

HBHC

HD

bar:HC

baz.png:HDQmW98pJrc6FZ6

foo

bar

baz.png

Page 104: RDM#2- The Distributed Web

DHT

Page 105: RDM#2- The Distributed Web

DHT are the Holy Grail* of P2P Networks

*from a survey paper

Page 106: RDM#2- The Distributed Web

15

610

50

55

Page 107: RDM#2- The Distributed Web

1 10 12 20 30 50 54 58 70 88 81 83 88 90 92 95 97 99 101105 300411 500

Page 108: RDM#2- The Distributed Web

1 10 12 20 30 50 54 58 70 88 81 83 88 90 92 95 97 99 101105 300411 500

Page 109: RDM#2- The Distributed Web

1 10 12 20 30 50 54 58 70 88 81 83 88 90 92 95 97 99 101105 300411 500

hash( )

Page 110: RDM#2- The Distributed Web

1 10 12 20 30 50 54 58 70 88 81 83 88 90 92 95 97 99 101105 300411 500

hash( ) = 91

Page 111: RDM#2- The Distributed Web

1 10 12 20 30 50 54 58 70 88 81 83 88 90 92 95 97 99 101105 300411 500

hash( ) = 91

Page 112: RDM#2- The Distributed Web

1 10 12 20 30 50 54 58 70 88 81 83 88 90 92 95 97 99 101105 300411 500

Who has fim , which hash( ) = 91?

Page 113: RDM#2- The Distributed Web

The Distributed Web

Page 114: RDM#2- The Distributed Web

• Applications with no-origin

• Leverage network cache

• Resilient to network splits

Page 115: RDM#2- The Distributed Web

Serve data to everywhere

Page 116: RDM#2- The Distributed Web

Serve data from everywhere

Page 117: RDM#2- The Distributed Web

David Dias - http://daviddias.me IPFS http://ipfs.io Protocol Labs http://ipn.io

Page 118: RDM#2- The Distributed Web

Thank you!David Dias - http://daviddias.me IPFS http://ipfs.io Protocol Labs http://ipn.io