SlideShare a Scribd company logo
ipfs.io
@juanbenet
2015-11-17
DATASTRUCTURES
IN + ON
InfoQ.com: News & Community Site
• 750,000 unique visitors/month
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• News 15-20 / week
• Articles 3-4 / week
• Presentations (videos) 12-15 / week
• Interviews 2-3 / week
• Books 1 / month
Watch the video with slide
synchronization on InfoQ.com!
http://www.infoq.com/presentations
/data-ipfs-ipld
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon San Francisco
www.qconsf.com
ÐΞVCON1
1. IPFS introduction
2. structs in IPFS
3. structs on IPFS
ÐΞVCON1
1. IPFS introduction
2. structs in IPFS
3. structs on IPFS
DISTRIBUTED
PERMANENT
MERKLE
THE WEB
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
2,387,990,609
2,387,990,609
477.6 PB
Disconnected / Offline
Ubiquitous Computing + IoT
Natural Disasters
surprise oppression censorship
Human Disasters
Data Control
Awful Security Model
Data Structures in and on IPFS
NOT AUTHENTICATED
NOT ENCRYPTED
AT REST
Data Structures in and on IPFS
PermanentDistributed Safer
SmarterOffline
Faster
Data Structures in and on IPFS
a protocol to upgrade the web
a web of merkle-links
SFS
web
DHT+
web
DHT
SFS
routing
network
exchange
merkledag
naming
applications
The Stack
routing
network
exchange
IPLD
naming
applications
IPNS
Bitswap
Kad DHT mDNS
QUIC TCPuTP WebRTC WebSockets
Git ChatVLCEtherpad Bitcoin
CJDNS UDT
routing
network
exchange
IPLD
naming
applications
IPNSDNS Namecoin
Bitswap HTTPBitTorrent
Kad DHTChord mDNSGossip Delegated
FTP
TOR
QUIC TORTCPuTP WebRTC WebSockets
Git BitcoinVLCEtherpad
I2P
I2P
CJDNS UDT
Ethereum
EthNames
Chat
routing
network
exchange
merkldag
naming
applicationsThe Stack
Defining the Data
Moving the Data
Using the Data
IPLD
libp2p
IPNS
routing
network
exchange
merkldag
naming
applicationsThe Stack
Defining the Data
Moving the Data
Using the Data
IPLD
libp2p
IPNS
routing
network
exchange Bitswap HTTPBitTorrent
Kad DHTChord mDNSGossip Delegated
FTP
TOR
QUIC TORTCPuTP WebRTC WebSockets I2P
I2P
CJDNS UDT
libp2p - a collection of peer-to-peer protocols
for finding peers, and connecting to them
for finding content, and transferring it
libp2p - a collection of peer-to-peer protocols
TCP uTP QUIC SCTP BLE TOR I2PTransports
mDNS
boot
strap
DNS
Kad
DHT
PEX PKIDiscovery
Peer Routing mDNS
Kad
DHT
DNS DVs
mDNS
pub
sub
Kad
DHT
Content Routing
STUN TURN
ICE
Kad
ICE
NAT
Traversal
Transports
Discovery
Peer Routing
NAT Traversal
Content Routing
libp2p
Transports
Discovery
Peer Routing
NAT Traversal
Content Routing
libp2p
routing
network
exchange
merkldag
naming
applicationsThe Stack
Defining the Data
Moving the Data
Using the Data
IPLD
libp2p
IPNS
routing
network
exchange
merkledag
naming
applications
IPNSDNS Namecoin
Bitswap HTTPBitTorrent
Kad DHTChord mDNSGossip Delegated
FTP
TOR
QUIC TORTCPuTP WebRTC WebSockets
Git BitcoinVLCEtherpad Chat
I2P
I2P
CJDNS UDT
INTERNET
OF
DATA
routing
network
exchange
merkledag
naming
applications
IPNSDNS Namecoin
Bitswap HTTPBitTorrent
Kad DHTChord mDNSGossip Delegated
FTP
TOR
QUIC TORTCPuTP WebRTC WebSockets
Git BitcoinVLCEtherpad Chat
I2P
I2P
CJDNS UDT
INTERNET
OF
DATA STRUCTURES
WEB 2.0
WEB 3.0
Data Structures in and on IPFS
bundled in FreeNAS
used by dozens of co’s/org’s
used to archive data of
Data Structures in and on IPFS
Data Structures in and on IPFS
a web of merkle-links
http://10.20.30.40/foo/bar/baz.png
location path
http://example.com/foo/bar/baz.png
http://10.20.30.40/foo/bar/baz.png
you
http://10.20.30.40/foo/bar/baz.png
10.20.30.40
you
HTTP
http://10.20.30.40/foo/bar/baz.png
location path
http://example.com/foo/bar/baz.png
QmW98pJrc6FZ6hash( ) ->
http://
location path
http://
/ipns/example.com/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
content path
http://10.20.30.40/foo/bar/baz.png
10.20.30.40
you
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
HTTP
http://10.20.30.40/foo/bar/baz.png
10.20.30.40
you
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
IPFS
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
immutable
content addr
MERKLE LINK “URI”
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
immutable
content addr
MERKLE LINK
fs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
“URI”
ipfs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
key name
MAZIERES LINK
mutability
content addr
fs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
ipfs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
/ipns/example.com/foo/bar/baz.png
key name
dns name
/dns/example.com/foo/bar/baz.png
human readability
content addr
fs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
ipfs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
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
ÐΞVCON1
1. IPFS introduction
2. structs in IPFS
3. structs on IPFS
ÐΞVCON1
2. structs in IPFS
- Merkle DAGs and Merkle Links
- IPLD: JSON + Merkle-Links
- IPRS: Records
- Mazieres Links for Good
- IPNS: Key Addressing
- DNS and other Human Friendly Names
- Git Versioning with Commits
- unixfs: representing POSIX files
ÐΞVCON1
2. structs in IPFS
- Merkle DAGs and Merkle Links
- IPLD: JSON + Merkle-Links
- IPRS: Records
- Mazieres Links for Good
- IPNS: Key Addressing
- DNS and other Human Friendly Names
- Git Versioning with Commits
- unixfs: representing POSIX files
a web of merkle-links
Data Structures in and on IPFS
Data Structures in and on IPFS
cvs/svn
cvs/svn
cvs/svn
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
merkle tree
plan9: fossil + venti
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
a web of merkle-links
http://10.20.30.40/foo/bar/baz.png
10.20.30.40
you
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
IPFS
/ipns/example.com/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
content path
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
content path
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
content path
foo
bar
baz.png
QmW98pJrc6FZ6
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
content path
foo:HB
HB
HC
HD
bar:HC
baz.png:HDQmW98pJrc6FZ6
foo
bar
baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
content path
foo:HB
HB
HC
HD
bar:HC
baz.png:HDQmW98pJrc6FZ6
foo
bar
baz.png
MERKLE LINK
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
immutable
content addr
MERKLE LINK “URI”
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
immutable
content addr
MERKLE LINK
fs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
“URI”
ipfs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
ÐΞVCON1
2. structs in IPFS
- Merkle DAGs and Merkle Links
- IPLD: JSON + Merkle-Links
- IPRS: Records
- Mazieres Links for Good
- IPNS: Key Addressing
- DNS and other Human Friendly Names
- Git Versioning with Commits
- unixfs: representing POSIX files
a common hash-chain format
IPLD
for distributed data structures
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
content path
foo:HB
HB
HC
HD
bar:HC
baz.png:HDQmW98pJrc6FZ6
foo
bar
baz.png
MERKLE LINK
jbenet @ earth : ~ > ipfs add -r ~/demo/basic
added QmajFHHivh25Qb2cNbnnnEeUe1gDLHX9ta7hs2XKX1vazb basic/cat.jpg
added QmZ7uhHuR3zctKYgiyEntay5xreRyE9NtE8TDQSnxvkE2R basic/foo.jpg
added QmTz3oc4gdpRMKP2sdGUPZTAGRngqjsi99BPoztyP53JMM basic/test/bar
added QmTz3oc4gdpRMKP2sdGUPZTAGRngqjsi99BPoztyP53JMM basic/test/baz/b
added QmYNmQKp6SuaVrpgWRsPTgCQCnpxUYGq76YEKBXuj2N4H6 basic/test/baz/f
added QmX1ebVUtfY11ZCpVmqyE5mDoN62SpLd8eLPpg5GGV1ABt basic/test/baz
added QmYNmQKp6SuaVrpgWRsPTgCQCnpxUYGq76YEKBXuj2N4H6 basic/test/foo
added QmNtpA5TBNqHrKf3cLQ1AiUKXiE4JmUodbG5gXrajg8wdv basic/test
added QmWNj1pTSjbauDHpdyg5HQ26vYcNWnubg1JehmwAE9NnU9 basic/tree-in-cosmos.jpg
added QmbtJUxwLnQ1UF1E8xnjgcZsdGaDdztz7S6rg3rNYcGV9m basic/vm/Makefile
added QmTagEY4NYY8WZkfSWM2xpyH71J7z78Usz2QJRoDaaE8qJ basic/vm/disk.vdi
added QmeLW1ZJPDeLMp7WC4gWTkYvQyAMQECwSVsox3jWdvQpJ5 basic/vm/vbox
added QmbtJUxwLnQ1UF1E8xnjgcZsdGaDdztz7S6rg3rNYcGV9m basic/vm/vm/Makefile
added QmRXgisKJmSSii3UUTn9QqvhKoAAcyt7CqNbFFSpGamB9k basic/vm/vm/disk.vdi
added QmQjgMyaqgouThuGFkZQNNaJpa7QawR4P2yRv7N1Y2ffsE basic/vm/vm
added QmVu5LxhbDo866EmmFJF8zNNfdXvn35FjavhREHrfxWGuA basic/vm
added QmTToTPSAn4y9KRxueN8zHtNye7cupdFstVP3ChJKizpJv basic
Data Structures in and on IPFS
jbenet @ earth : ~ > ipfs object get --enc=json QmTToTPSAn4y9KRxueN8zHtNye7cupdFstVP3ChJK
{
"Links": [
{
"Name": "cat.jpg",
"Hash": "QmajFHHivh25Qb2cNbnnnEeUe1gDLHX9ta7hs2XKX1vazb",
"Size": 139795
},
{
"Name": "foo.jpg",
"Hash": "QmZ7uhHuR3zctKYgiyEntay5xreRyE9NtE8TDQSnxvkE2R",
"Size": 1048832
},
{
"Name": "test",
"Hash": "QmNtpA5TBNqHrKf3cLQ1AiUKXiE4JmUodbG5gXrajg8wdv",
"Size": 277
},
{
"Name": "tree-in-cosmos.jpg",
jbenet @ earth : ~ > ipfs object get --enc=protobuf QmTToTPSAn4y9KRxueN8zHtNye7cupdFstVP3
1
" .̧,EfZ;!˄nlr8cat.jpg1
" ,JU>ttX^o)P>LHNfoo.jpg@-
"=D"YЯ
~_[}test<
" weoۡJ
C<H83Ctree-in-cosmos.jpg4-
" pP?ALuzG|Jbvm
Data Structures in and on IPFS
IPLD
- merkle-links secure, immutable
- merkle-paths /ipfs/Qmabc…xyz/foo/bar.jpg
- universal nestable URIs
- serialization JSON, PB, XML, RLP
- canonical hashing safe
JSON
{
"username": "@VannevarBush",
"followers": [
"@FredTerman",
"@ClaudeShannon",
"@DougEngelbart",
...
]
}
JSON —> IPLD
{
"username": "@VannevarBush",
"followers": [
"@FredTerman",
"@ClaudeShannon",
"@DougEngelbart",
...
]
}
{
"username": "/ipfs/QmWxCC8BrWSUJR2AJQZu7TE
"followers": [
"/ipfs/QmP8AmEKHHMnaBaQsEJVGs7ZbBSQAxhPn
"/ipfs/QmVDGZWUgo4beprgwcmppoaBXxSainGHd
"/ipfs/QmfVQwj2cyhrKQV1BY1y2nAcQcjiKEkvE
...
]
}
JSON —> IPLD
{
"user": "14321431543254",
"followers": [
"76547653654363",
"85876587647564",
"53476458759856",
...
]
}
{
"user": "/ipfs/QmWxCC8BrWSUJR2AJQZu7TEniAa
"followers": [
"/ipfs/QmP8AmEKHHMnaBaQsEJVGs7ZbBSQAxhPn
"/ipfs/QmVDGZWUgo4beprgwcmppoaBXxSainGHd
"/ipfs/QmfVQwj2cyhrKQV1BY1y2nAcQcjiKEkvE
...
]
}
YML —> IPLD
---
username: @VannevarBush
followers:
- @FredTerman
- @ClaudeShannon
- @DougEngelbart
---
username: /ipfs/QmWxCC8BrWSUJR2AJQZu7TEniAa6
followers:
- /ipfs/QmP8AmEKHHMnaBaQsEJVGs7ZbBSQAxhPn9
- /ipfs/QmVDGZWUgo4beprgwcmppoaBXxSainGHdt
- /ipfs/QmfVQwj2cyhrKQV1BY1y2nAcQcjiKEkvEY
jbenet @ earth : ~ > ipld cat —-fmt json QmWxCC8BrWSUJR2AJQZu7TEniAa6ZinkDLB6zNwBdWTZkL
{
"username": "@VannevarBush"
"name": "Vannevar Bush"
}
Representing Objects
jbenet @ earth : ~ > ipld cat —-fmt json QmWxCC8BrWSUJR2AJQZu7TEniAa6ZinkDLB6zNwBdWTZkL
{
"username": "@VannevarBush"
"name": "Vannevar Bush"
}
jbenet @ earth : ~ > ipld cat —-fmt json QmZqLhjZiFsp7gz1BQ5oBaLY6JegUuKbHyVQY6jFK36KBW
{
"user": {"mlink": "/ipfs/QmWxCC8BrWSUJR2AJQZu7TEniAa6ZinkDLB6zNwBdWTZkL"},
"followers": [
{"mlink": "/ipfs/QmP8AmEKHHMnaBaQsEJVGs7ZbBSQAxhPn9zP2jHQy6Uekj"},
{"mlink": "/ipfs/QmVDGZWUgo4beprgwcmppoaBXxSainGHdtBfhcXXqHUV5Y"},
{"mlink": "/ipfs/QmfVQwj2cyhrKQV1BY1y2nAcQcjiKEkvEYJDGwWFUHcHaQ"},
...
]
}
Representing Objects
jbenet @ earth : ~ > ipld cat —-fmt json QmZqLhjZiFsp7gz1BQ5oBaLY6JegUuKbHyVQY6jFK36KBW
{
"user": {"mlink": "/ipfs/QmWxCC8BrWSUJR2AJQZu7TEniAa6ZinkDLB6zNwBdWTZkL"},
"followers": [
{"mlink": "/ipfs/QmP8AmEKHHMnaBaQsEJVGs7ZbBSQAxhPn9zP2jHQy6Uekj"},
{"mlink": "/ipfs/QmVDGZWUgo4beprgwcmppoaBXxSainGHdtBfhcXXqHUV5Y"},
{"mlink": "/ipfs/QmfVQwj2cyhrKQV1BY1y2nAcQcjiKEkvEYJDGwWFUHcHaQ"},
...
]
}
jbenet @ earth : ~ > ipld cat —-fmt json 
QmZqLhjZiFsp7gz1BQ5oBaLY6JegUuKbHyVQY6jFK36KBW/followers
[
{"mlink": "/ipfs/QmP8AmEKHHMnaBaQsEJVGs7ZbBSQAxhPn9zP2jHQy6Uekj"},
{"mlink": "/ipfs/QmVDGZWUgo4beprgwcmppoaBXxSainGHdtBfhcXXqHUV5Y"},
{"mlink": "/ipfs/QmfVQwj2cyhrKQV1BY1y2nAcQcjiKEkvEYJDGwWFUHcHaQ"},
...
]
Merkle Path Traversals
jbenet @ earth : ~ > ipld cat —-fmt json 
QmZqLhjZiFsp7gz1BQ5oBaLY6JegUuKbHyVQY6jFK36KBW/followers
[
{"mlink": "/ipfs/QmP8AmEKHHMnaBaQsEJVGs7ZbBSQAxhPn9zP2jHQy6Uekj"},
{"mlink": "/ipfs/QmVDGZWUgo4beprgwcmppoaBXxSainGHdtBfhcXXqHUV5Y"},
{"mlink": "/ipfs/QmfVQwj2cyhrKQV1BY1y2nAcQcjiKEkvEYJDGwWFUHcHaQ"},
...
]
jbenet @ earth : ~ > ipld cat —-fmt json 
QmZqLhjZiFsp7gz1BQ5oBaLY6JegUuKbHyVQY6jFK36KBW/followers/0
{
"username": "@FredTerman"
"name": "Fred Terman"
}
Merkle Path Traversals
jbenet @ earth : ~ > ipld cat —-fmt json $dir
{
"foo": {
"mlink": "/ipfs/QmP8AmEKHHMnaBaQsEJVGs7ZbBSQAxhPn9zP2jHQy6Uekj"
"mode": "0755",
"owner": "jbenet"
},
"cat.jpg": {
"mlink": "/ipfs/QmVDGZWUgo4beprgwcmppoaBXxSainGHdtBfhcXXqHUV5Y"
"mode": "0644",
"owner": "jbenet"
},
"doge.jpg": {
"mlink": "/ipfs/QmfVQwj2cyhrKQV1BY1y2nAcQcjiKEkvEYJDGwWFUHcHaQ",
"mode": "0644",
"owner": "jbenet"
}
}
Link Properties
jbenet @ earth : ~ > ipld cat —-fmt json $dir
{
"foo": {
"mlink": "/ipfs/QmP8AmEKHHMnaBaQsEJVGs7ZbBSQAxhPn9zP2jHQy6Uekj"
"mode": "0755",
"owner": "jbenet"
},
"cat.jpg": {
"mlink": "/ipfs/QmVDGZWUgo4beprgwcmppoaBXxSainGHdtBfhcXXqHUV5Y"
"mode": "0644",
"owner": "jbenet"
},
"doge.jpg": {
"mlink": "/ipfs/QmfVQwj2cyhrKQV1BY1y2nAcQcjiKEkvEYJDGwWFUHcHaQ",
"mode": "0644",
"owner": "jbenet"
}
}
file systems - dir
jbenet @ earth : ~ > ipld cat —-fmt yml $gitcommit
---
tree: {mlink: e4647147e940e2fab134e7f3d8a40c2022cb36f3}
parents:
- {mlink: /ipfs/QmP8AmEKHHMnaBaQsEJVGs7ZbBSQAxhPn9zP2jHQy6Uekj}
- {mlink: /ipfs/QmfVQwj2cyhrKQV1BY1y2nAcQcjiKEkvEYJDGwWFUHcHaQ}
author:
mlink: /ipfs/QmVoXUXmES4ujTdJ9CQAs8D3jMag2enjtBn2towYHmKxYa
name: Juan Batiz-Benet
email: juan@benet.ai
time: "1435398707 -0700"
committer:
mlink: /ipfs/QmVoXUXmES4ujTdJ9CQAs8D3jMag2enjtBn2towYHmKxYa
name: Juan Batiz-Benet
email: juan@benet.ai
time: "1435398707 -0700"
message: "Merge pull request #7 from ipldnn(WIP) records + merkledag specs"
versioning data structures - git
WEB 3.0
user: @juanbenet
name: Juan Benet
user: @daviddias
name: David Dias
@juanbenet
follows
@daviddias
user: @timbl
name: Tim Berners-Lee
@juanbenet
follows
@timbl
@juanbenet follows
WEBAPP DATA
AUTHENTICATED
WEBAPP DATA
user: @juanbenet
name: Juan Benet
user: @daviddias
name: David Dias
@juanbenet
follows
@daviddias
user: @timbl
name: Tim Berners-Lee
@juanbenet
follows
@timbl
@juanbenet follows
signed by @juanbenet
Contract
LEGAL RECORDS
Signed Contract
signed by “Bill”
signed by “Joe”
Joe’s Legal Agreements
Secure Timestamp
Data Structures in and on IPFS
ÐΞVCON1
2. structs in IPFS
- Merkle DAGs and Merkle Links
- IPLD: JSON + Merkle-Links
- IPRS: Records
- Mazieres Links for Good
- IPNS: Key Addressing
- DNS and other Human Friendly Names
- Git Versioning with Commits
- unixfs: representing POSIX files
DNS
is used for all
sorts of things
DNS
is used for all
sorts of things
type: A
sub: subdomain
value: 104.236.176.52
TTL: 180s
IPRS
is used for all
sorts of things
value: QmW98pJrc6FZ6
validity: _____________
key: QmYJPtosPTfoC
sig: Qme8K1jxR7GPG
value: QmW98pJrc6FZ6
validity: _____________
key: QmYJPtosPTfoC
sig: Qme8K1jxR7GPG
IPRS
is used for all
sorts of things
Records
are just IPLD objects
that link to other objects
value
value: QmW98pJrc6FZ6
validity: _____________
key: QmYJPtosPTfoC
sig: Qme8K1jxR7GPG
IPRS
is used for all
sorts of things
Records
are just IPLD objects
that link to other objects
value
key
public key
used to sign
IPRS Validity
- App-specific value
- Timestamps + TTL
- Cryptographic Freshness
- Ancestry (hash chain)
IPRS
is used for all
sorts of things
value: QmW98pJrc6FZ6
validity: _____________
key: QmYJPtosPTfoC
sig: Qme8K1jxR7GPG
Records
are just IPLD objects
that link to other objects
ÐΞVCON1
2. structs in IPFS
- Merkle DAGs and Merkle Links
- IPLD: JSON + Merkle-Links
- IPRS: Records
- Mazieres Links for Good
- IPNS: Key Addressing
- DNS and other Human Friendly Names
- Git Versioning with Commits
- unixfs: representing POSIX files
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
key name
MAZIERES LINK
mutability
content addr
fs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
ipfs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
Data Structures in and on IPFS
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
QmYJPtosPTfoC
public
key
secret
key
QmW98pJrc6FZ6
public
key
QmW98pJrc6FZ6
secret
key
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
QmYJPtosPTfoC
QmW98pJrc6FZ6
public
key
QmW98pJrc6FZ6
secret
key
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
QmYJPtosPTfoC
signed by
QmYJPtosPTfoC
QmW98pJrc6FZ6
public
key
QmW98pJrc6FZ6
secret
key
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
QmYJPtosPTfoC
signed by
QmYJPtosPTfoC
QmW98pJrc6FZ6
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.pngcontent addr
/ipns/jbenet.eth/foo/bar/baz.png
key name
human readability
/eth/jbenet/foo/bar/baz.png
eth name
fs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
ipfs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
ÐΞVCON1
2. structs in IPFS
- Merkle DAGs and Merkle Links
- IPLD: JSON + Merkle-Links
- IPRS: Records
- Mazieres Links for Good
- IPNS: Key Addressing
- DNS and other Human Friendly Names
- Git Versioning with Commits
- unixfs: representing POSIX files
public
key
QmW98pJrc6FZ6
secret
key
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
QmYJPtosPTfoC
signed by
QmYJPtosPTfoC
QmW98pJrc6FZ6
public
key
QmW98pJrc6FZ6
secret
key
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
QmYJPtosPTfoC
value: QmW98pJrc6FZ6
key: QmYJPtosPTfoC
validity: _____________
sig: Qme8K1jxR7GPG
IPRS Record
ÐΞVCON1
2. structs in IPFS
- Merkle DAGs and Merkle Links
- IPLD: JSON + Merkle-Links
- IPRS: Records
- Mazieres Links for Good
- IPNS: Key Addressing
- DNS and other Human Friendly Names
- Git Versioning with Commits
- unixfs: representing POSIX files
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
/ipns/example.com/foo/bar/baz.png
key name
dns name
/dns/example.com/foo/bar/baz.png
human readability
content addr
fs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
ipfs:/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
jbenet @ earth : ~ > dig TXT ipfs.io
; <<>> DiG 9.8.3-P1 <<>> TXT ipfs.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37227
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;ipfs.io. IN TXT
;; ANSWER SECTION:
ipfs.io. 120 IN TXT "dnslink=/ipfs/QmTgNJEgQaCqRht9KSXNyZsCp2xpHZmBRms28NRMmtcERp"
;; Query time: 169 msec
;; SERVER: 209.244.0.3#53(209.244.0.3)
;; WHEN: Tue Nov 17 16:44:28 2015
;; MSG SIZE rcvd: 98
DNS Links
jbenet @ earth : ~ > dig TXT ipfs.io
; <<>> DiG 9.8.3-P1 <<>> TXT ipfs.io
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37227
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;ipfs.io. IN TXT
;; ANSWER SECTION:
ipfs.io. 120 IN TXT "dnslink=/ipfs/QmTgNJEgQaCqRht9KSXNyZsCp2xpHZmBRms28NRMmtcERp"
;; Query time: 169 msec
;; SERVER: 209.244.0.3#53(209.244.0.3)
;; WHEN: Tue Nov 17 16:44:28 2015
;; MSG SIZE rcvd: 98
DNS Links
jbenet @ earth : ~ > dig TXT ipfs.io
ipfs.io. 120 IN TXT "dnslink=/ipfs/QmTgNJEgQaCqRht9KSXNyZsCp2xpHZmBRms28NRMmtcERp"
DNS Links
jbenet @ earth : ~ > dig TXT ipfs.io
ipfs.io. 120 IN TXT "dnslink=/ipfs/QmTgNJEgQaCqRht9KSXNyZsCp2xpHZmBRms28NRMmtcERp"
DNS Links
/ipns/ipfs.io/foo/bar/baz.png
dns name
/dns/ipfs.io/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.pngcontent addr
jbenet @ earth : ~ > dig TXT ipfs.io
ipfs.io. 120 IN TXT "dnslink=/ipfs/QmTgNJEgQaCqRht9KSXNyZsCp2xpHZmBRms28NRMmtcERp"
DNS Links
/ipns/ipfs.io/foo/bar/baz.png
dns name
/dns/ipfs.io/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.pngcontent addr
∞
60s-5m
jbenet @ earth : ~ > dig TXT ipfs.io
ipfs.io. 120 IN TXT "dnslink=/ipns/QmYJPtosPTfoCht9KSXNyZsCp2xpHZmBRms28NRMmtcERp"
DNS Links
/ipns/ipfs.io/foo/bar/baz.png
dns name
/dns/ipfs.io/foo/bar/baz.png
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
key name
content addr
60s-5m
∞
jbenet @ earth : ~ > dig TXT ipfs.io
ipfs.io. 120 IN TXT "dnslink=/ipns/QmYJPtosPTfoCht9KSXNyZsCp2xpHZmBRms28NRMmtcERp"
DNS Links
/ipns/ipfs.io/foo/bar/baz.png
dns name
/dns/ipfs.io/foo/bar/baz.png
/ipns/QmYJPtosPTfoC/foo/bar/baz.png
/ipfs/QmW98pJrc6FZ6/foo/bar/baz.png
key name
content addr
∞
1ms-1s
60s-5m
2. structs in IPFS
- Merkle DAGs and Merkle Links
- IPLD: JSON + Merkle-Links
- IPRS: Records
- Mazieres Links for Good
- IPNS: Key Addressing
- DNS and other Human Friendly Names
- Git Versioning with Commits
- unixfs: representing POSIX files
versioning data structures - git
jbenet @ earth : ~ > ipld cat —-fmt yml $gitcommit
---
tree: {mlink: e4647147e940e2fab134e7f3d8a40c2022cb36f3}
parents:
- {mlink: /ipfs/QmP8AmEKHHMnaBaQsEJVGs7ZbBSQAxhPn9zP2jHQy6Uekj}
- {mlink: /ipfs/QmfVQwj2cyhrKQV1BY1y2nAcQcjiKEkvEYJDGwWFUHcHaQ}
author:
mlink: /ipfs/QmVoXUXmES4ujTdJ9CQAs8D3jMag2enjtBn2towYHmKxYa
name: Juan Batiz-Benet
email: juan@benet.ai
time: "1435398707 -0700"
committer:
mlink: /ipfs/QmVoXUXmES4ujTdJ9CQAs8D3jMag2enjtBn2towYHmKxYa
name: Juan Batiz-Benet
email: juan@benet.ai
time: "1435398707 -0700"
message: "Merge pull request #7 from ipldnn(WIP) records + merkledag specs"
versioning data structures - git
2. structs in IPFS
- Merkle DAGs and Merkle Links
- IPLD: JSON + Merkle-Links
- IPRS: Records
- Mazieres Links for Good
- IPNS: Key Addressing
- DNS and other Human Friendly Names
- Git Versioning with Commits
- unixfs: representing POSIX files
unixfs: representing POSIX files
which link
to others
directories are
also dag nodes
files are dag nodes
BIG files may be
split into many
unixfs as a dag
unixfs: representing POSIX files
unixfs: representing POSIX files
unixfs: representing POSIX files
ÐΞVCON1
1. IPFS introduction
2. structs in IPFS
3. structs on IPFS
ÐΞVCON1
3. structs on IPFS
- unixfs: Files as you know them
- commit: Git style versioning
- CRDTs: sane mutable data
- keychain: PKI and crypto artifacts
- persona: identity management
- post: sane communication
- html: hey! websites!
- boards: forums, reddit, 4chan
- starship: containers at hyperspeed
- blockchains: interconnected
ÐΞVCON1
3. structs on IPFS
- unixfs: Files as you know them
- commit: Git style versioning
- CRDTs: sane mutable data
- keychain: PKI and crypto artifacts
- persona: identity management
- post: sane communication
- html: hey! websites!
- boards: forums, reddit, 4chan
- starship: containers at hyperspeed
- blockchains: interconnected
CRDTs: lattices as IPFS objects
CRDTs: lattices as IPFS objects
ÐΞVCON1
3. structs on IPFS
- unixfs: Files as you know them
- commit: Git style versioning
- CRDTs: sane mutable data
- keychain: PKI and crypto artifacts
- persona: identity management
- post: sane communication
- html: hey! websites!
- boards: forums, reddit, 4chan
- starship: containers at hyperspeed
- blockchains: interconnected
value: QmW98pJrc6FZ6
validity: _____________
key: QmYJPtosPTfoC
sig: Qme8K1jxR7GPG
IPRS
is used for all
sorts of things
Records
are just IPLD objects
that link to other objects
value
key
public key
used to sign
Keychain - cryptographic artifacts as IPFS objects
parent: QmPARENT1
key fmt: _____________
keydata: _____________
parent: QmPARENT2
key fmt: _____________
keydata: _____________
Keychain - cryptographic artifacts as IPFS objects
parent: QmPARENT1
key fmt: _____________
keydata: _____________
parent: QmPARENT2
key fmt: _____________
keydata: _____________
parent: 0
key fmt: _____________
keydata: _____________
Keychain - cryptographic artifacts as IPFS objects
for CA system
Keychain - cryptographic artifacts as IPFS objects
for Web of Trust
ÐΞVCON1
3. structs on IPFS
- unixfs: Files as you know them
- commit: Git style versioning
- CRDTs: sane mutable data
- keychain: PKI and crypto artifacts
- persona: identity management
- post: sane communication
- html: hey! websites!
- boards: forums, reddit, 4chan
- starship: containers at hyperspeed
- blockchains: interconnected
ÐΞVCON1
3. structs on IPFS
- unixfs: Files as you know them
- commit: Git style versioning
- CRDTs: sane mutable data
- keychain: PKI and crypto artifacts
- persona: identity management
- post: sane communication
- html: hey! websites!
- boards: forums, reddit, 4chan
- starship: containers at hyperspeed
- blockchains: interconnected
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
Data Structures in and on IPFS
ÐΞVCON1
3. structs on IPFS
- unixfs: Files as you know them
- commit: Git style versioning
- CRDTs: sane mutable data
- keychain: PKI and crypto artifacts
- persona: identity management
- post: sane communication
- html: hey! websites!
- boards: forums, reddit, 4chan
- starship: containers at hyperspeed
- blockchains: interconnected
Data Structures in and on IPFS
Data Structures in and on IPFS
3. structs on IPFS
- unixfs: Files as you know them
- commit: Git style versioning
- CRDTs: sane mutable data
- keychain: PKI and crypto artifacts
- persona: identity management
- post: sane communication
- html: hey! websites!
- boards: forums, reddit, 4chan
- starship: containers at hyperspeed
- blockchains: interconnected
merkle-containers
3. structs on IPFS
- unixfs: Files as you know them
- commit: Git style versioning
- CRDTs: sane mutable data
- keychain: PKI and crypto artifacts
- persona: identity management
- post: sane communication
- html: hey! websites!
- boards: forums, reddit, 4chan
- starship: containers at hyperspeed
- blockchains: interconnected
Data Structures in and on IPFS
ipfs.io
@juanbenet
2015-11-17
DATASTRUCTURES
IN + ON
Watch the video with slide synchronization on
InfoQ.com!
http://www.infoq.com/presentations/data-
ipfs-ipld

More Related Content

PDF
IPFS: The Permanent Web
PPTX
Interplanetary File System.pptx
PDF
Real-time Analytics with Upsert Using Apache Kafka and Apache Pinot | Yupeng ...
PPTX
InterPlanetary File System (IPFS)
PPTX
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
PDF
Designing a complete ci cd pipeline using argo events, workflow and cd products
PDF
Introduction to Filecoin
PDF
Introduction to Apache NiFi 1.11.4
IPFS: The Permanent Web
Interplanetary File System.pptx
Real-time Analytics with Upsert Using Apache Kafka and Apache Pinot | Yupeng ...
InterPlanetary File System (IPFS)
Change Data Capture to Data Lakes Using Apache Pulsar and Apache Hudi - Pulsa...
Designing a complete ci cd pipeline using argo events, workflow and cd products
Introduction to Filecoin
Introduction to Apache NiFi 1.11.4

What's hot (20)

PPTX
Apache Knox Gateway "Single Sign On" expands the reach of the Enterprise Users
PDF
IPFS introduction
PDF
Redecentralizing the Web: IPFS and Filecoin
PPTX
Hadoop Security Today & Tomorrow with Apache Knox
PDF
NiFi Developer Guide
PPTX
OpenStack Architecture and Use Cases
PPTX
The Modern Telco Network: Defining The Telco Cloud
PDF
Introduction to Apache NiFi dws19 DWS - DC 2019
PPTX
Envoy and Kafka
PDF
Web3 Infrastructure Thesis
PDF
Observability, Distributed Tracing, and Open Source: The Missing Primer
PPT
Hadoop Security Architecture
PDF
SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...
PDF
Mss solution guide
PPTX
FIWARE: Managing Context Information at large scale
PDF
How VXLAN works on Linux
PPTX
Introduction to Distributed Tracing
PPTX
Observability
PDF
Smart contracts using web3.js
PDF
An Introduction to Blockchain Technology
Apache Knox Gateway "Single Sign On" expands the reach of the Enterprise Users
IPFS introduction
Redecentralizing the Web: IPFS and Filecoin
Hadoop Security Today & Tomorrow with Apache Knox
NiFi Developer Guide
OpenStack Architecture and Use Cases
The Modern Telco Network: Defining The Telco Cloud
Introduction to Apache NiFi dws19 DWS - DC 2019
Envoy and Kafka
Web3 Infrastructure Thesis
Observability, Distributed Tracing, and Open Source: The Missing Primer
Hadoop Security Architecture
SingleStore & Kafka: Better Together to Power Modern Real-Time Data Architect...
Mss solution guide
FIWARE: Managing Context Information at large scale
How VXLAN works on Linux
Introduction to Distributed Tracing
Observability
Smart contracts using web3.js
An Introduction to Blockchain Technology
Ad

Similar to Data Structures in and on IPFS (20)

PDF
IPFS: A Whole New World
PDF
ipfs-171229085327.pdf
PPTX
PDF
the ipfs white paper. A P2P file decentralized file system.
PDF
Module: InterPlanetary Linked Data (IPLD)
PDF
Engineering a Semantic Web (Spring 2018)
PDF
Module: Mutable Content in IPFS
PPTX
Introduction to IPFS & Filecoin
PDF
Module: Content Addressing in IPFS
PDF
Productive web applications that run only on the frontend
PDF
Module: Content Routing in IPFS
PDF
Introduction to IPFS & Filecoin - longer version
PDF
ITWS Capstone: Engineering a Semantic Web (Fall 2022)
PDF
Engineering a Semantic Web: ITWS Capstone Lecture (Spring 2014)
PDF
SF Ceph Users Jan. 2014
PPTX
Decentralized storage
PDF
ITWS 4310: Building and Consuming the Web of Data (Fall 2013)
PDF
InterPlanetary Wayback: The Next Step Towards Decentralized Web Archiving
PDF
Encode club introduction_to_libp2p
PPTX
Web 3.0 & io t (en)
IPFS: A Whole New World
ipfs-171229085327.pdf
the ipfs white paper. A P2P file decentralized file system.
Module: InterPlanetary Linked Data (IPLD)
Engineering a Semantic Web (Spring 2018)
Module: Mutable Content in IPFS
Introduction to IPFS & Filecoin
Module: Content Addressing in IPFS
Productive web applications that run only on the frontend
Module: Content Routing in IPFS
Introduction to IPFS & Filecoin - longer version
ITWS Capstone: Engineering a Semantic Web (Fall 2022)
Engineering a Semantic Web: ITWS Capstone Lecture (Spring 2014)
SF Ceph Users Jan. 2014
Decentralized storage
ITWS 4310: Building and Consuming the Web of Data (Fall 2013)
InterPlanetary Wayback: The Next Step Towards Decentralized Web Archiving
Encode club introduction_to_libp2p
Web 3.0 & io t (en)
Ad

More from C4Media (20)

PDF
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
PDF
Next Generation Client APIs in Envoy Mobile
PDF
Software Teams and Teamwork Trends Report Q1 2020
PDF
Understand the Trade-offs Using Compilers for Java Applications
PDF
Kafka Needs No Keeper
PDF
High Performing Teams Act Like Owners
PDF
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
PDF
Service Meshes- The Ultimate Guide
PDF
Shifting Left with Cloud Native CI/CD
PDF
CI/CD for Machine Learning
PDF
Fault Tolerance at Speed
PDF
Architectures That Scale Deep - Regaining Control in Deep Systems
PDF
ML in the Browser: Interactive Experiences with Tensorflow.js
PDF
Build Your Own WebAssembly Compiler
PDF
User & Device Identity for Microservices @ Netflix Scale
PDF
Scaling Patterns for Netflix's Edge
PDF
Make Your Electron App Feel at Home Everywhere
PDF
The Talk You've Been Await-ing For
PDF
Future of Data Engineering
PDF
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Streaming a Million Likes/Second: Real-Time Interactions on Live Video
Next Generation Client APIs in Envoy Mobile
Software Teams and Teamwork Trends Report Q1 2020
Understand the Trade-offs Using Compilers for Java Applications
Kafka Needs No Keeper
High Performing Teams Act Like Owners
Does Java Need Inline Types? What Project Valhalla Can Bring to Java
Service Meshes- The Ultimate Guide
Shifting Left with Cloud Native CI/CD
CI/CD for Machine Learning
Fault Tolerance at Speed
Architectures That Scale Deep - Regaining Control in Deep Systems
ML in the Browser: Interactive Experiences with Tensorflow.js
Build Your Own WebAssembly Compiler
User & Device Identity for Microservices @ Netflix Scale
Scaling Patterns for Netflix's Edge
Make Your Electron App Feel at Home Everywhere
The Talk You've Been Await-ing For
Future of Data Engineering
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More

Recently uploaded (20)

PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Approach and Philosophy of On baking technology
PPTX
Spectroscopy.pptx food analysis technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Empathic Computing: Creating Shared Understanding
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Machine learning based COVID-19 study performance prediction
PDF
cuic standard and advanced reporting.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Chapter 3 Spatial Domain Image Processing.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Building Integrated photovoltaic BIPV_UPV.pdf
Approach and Philosophy of On baking technology
Spectroscopy.pptx food analysis technology
Unlocking AI with Model Context Protocol (MCP)
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Empathic Computing: Creating Shared Understanding
The AUB Centre for AI in Media Proposal.docx
Understanding_Digital_Forensics_Presentation.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

Data Structures in and on IPFS