SlideShare ist ein Scribd-Unternehmen logo
1 von 44
Downloaden Sie, um offline zu lesen
IPFS: a whole new world
Brought to you by Tyr Chen
1
Existing issues in internet
2
Addressing 3
Bandwith & Latency 4
Collaboration & O ine support 5
And something horrible…WTF on resiliency? 6
More horrible…WTF data security? 7
And the ultimate tragedy…in the history of mankind 8
What rst?
• web first
• mobile first
• data first
• AI first
• …
• …
• distributed, offline first?
9
Entering InterPlanetary File System world!
10
The big things before IPFS
• DHT: Ditributed Hash Table
• Kademlia DHT: query is . Used widely by Gnutella and BitTorrent
• Coral DSHT: make the storage and bandwidth usage more efficient than Kademlia
• s/kademlia DHT: add PoW to prevent attack (PoW on node id gen, ).
• BitTorrent: incentified by bit-for-tat and prioritized with rare block
• Git: Merkle DAG
O(log2N )
11
DHT
12
What is DHT?
A distributed hash table (DHT) is a class of a decentralized distributed system
that provides a lookup service similar to a hash table: (key, value) pairs are
stored in a DHT, and any participating node can efficiently retrieve the value
associated with a given key. Keys are unique identifiers which map to particular
values, which in turn can be anything from addresses, to documents, to
arbitrary data.[1] Responsibility for maintaining the mapping from keys to
values is distributed among the nodes, in such a way that a change in the set of
participants causes a minimal amount of disruption.
“
13
Chord, Pastry DHT 14
Node join / leave 15
BitTorrent / Kademlia DHT 16
IPFS & BitTorrent
• Similarity:
• exchange of data (blocks) in IPFS is inspired by BitTorrent
• tit-for-tat strategy (if you don’t share, you won’t get)
• get rare pieces first
• Difference:
• separate swarm for each file (BitTorrent), one swarm for all (BitSwap in IPFS)
17
IPFS & Git (copied from white paper)
1. Immutable objects represent Files (blob), Directories (tree), and Changes (commit).
2. Objects are content-addressed, by the cryptographic hash of their contents.
3. Links to other objects are embedded, forming a Merkle DAG. This provides many
useful integrity and workflow properties.
4. Most versioning metadata (branches, tags, etc.) are simply pointer references, and
thus inexpensive to create and update.
5. Version changes only update references or add objects.
6. Distributing version changes to other users is simply transferring objects and
updating remote references.
18
Merkle DAG 19
What are the use cases for Merkle DAG? 20
IPFS Design
21
IPFS Core Parts
• Identities: node identity generation & verification
• Network: p2p
• Routing: DHT
• Exchange: BitSwap
• Objects: Merkle DAG
• Files: versioned file system like Git
• Naming: self-certifying mutable name system
22
Exchange: BitSwap
• peers exchange which blocks they have (have_list) and which blocks they are looking
for (want_list) upon connecting
• to decide if a node will actually share data, it will apply its BitSwap Strategy
• based on previous data exchanges between these two peers
• peers keep track of the amount of data they share (builds credit) and the amount of
data they receive (builds debt)
• kept track of in the BitSwap Ledger
• if a peer has credit (shared more than received)
• our node will send the requested block
• if a peer has debt, our node will share or not share
• depending on a deterministic function where the chance of sharing becomes smaller when the
debt is bigger
• a data exchange always starts with the exchange of the ledger, if it is not identical our
node disconnects
23
BitSwap Ledger
type Ledger struct {
owner NodeId
partner NodeId
bytes_sent int
bytes_recv int
timestamp Timestamp
}
24
BitSwap Spec
// Additional state kept
type BitSwap struct {
ledgers map[NodeId]Ledger
// Ledgers known to this node, inc inactive
active map[NodeId]Peer
// currently open connections to other nodes
need_list []Multihash
// checksums of blocks this node needs
have_list []Multihash
// checksums of blocks this node has
}
type Peer struct {
nodeid NodeId
ledger Ledger
// Ledger between the node and this peer
last_seen Timestamp
// timestamp of last received message
want_list []Multihash
// checksums of all blocks wanted by peer
// includes blocks wanted by peer’s peers
}
// Protocol interface:
interface Peer {
open (nodeid :NodeId, ledger :Ledger);
send_want_list (want_list :WantList);
send_block (block :Block) -> (complete :Bool);
25
Files: unixfs
syntax = "proto2";
package unixfs.pb;
message Data {
enum DataType {
Raw = 0;
Directory = 1;
File = 2;
Metadata = 3;
Symlink = 4;
HAMTShard = 5;
}
required DataType Type = 1;
optional bytes Data = 2;
optional uint64 filesize = 3;
repeated uint64 blocksizes = 4;
optional uint64 hashType = 5;
optional uint64 fanout = 6;
}
message Metadata {
optional string MimeType = 1;
}
26
Naming: add mutability
• The root address of a node is /ipns/
• The content it points to can be changed by publishing an IPFS object to this address
• By publishing, the owner of the node (the person who knows the secret key that was
generated with ipfs init) cryptographically signs this “pointer”.
• This enables other users to verify the authenticity of the object published by the
owner.
• Just like IPFS paths, IPNS paths also start with a hash, followed by a Unix-like path.
• IPNS records are announced and resolved via the DHT.
27
IPFS stack 28
IPFS stack
• Moving the data easily and efficiently: libp2p
• Defining the data: IPLD, IPNS
• Using the data: IPFS app
29
Concepts
• CID: content identifier. Based on the content’s cryptographic hash.
• DNS link: use DNS TXT records to map a domain name (e.g. ipfs.io) to an IPFS address.
• IPNS: Inter-Planetary Name System is a system for creating and updating mutable
links to IPFS content. IPFS address changes everytime the content changes. A name in
IPNS is the hash of a public key.
• MFS: Mutible File System allows to treat files like a normal file system. It takes care of
all the work of updating links and hashes upon change of file.
• Pinning: IPFS nodes treads data like a cache so if you want something to be retained
long-term you can pin it.
• UinxFS: UnixFS is a data format to respresent files and all their links and metadata,
loosely based on how files work in Unix.
30
Node 31
IPNS 32
Exploring IPFS
33
Start IPFS
$ ipfs init
initializing IPFS node at /Users/tchen/.ipfs
generating 2048-bit RSA keypair...done
peer identity: QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6
to get started, enter:
ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme
$ brew services start ipfs
==> Successfully started `ipfs` (label: homebrew.mxcl.ipfs)
34
Add a le
$ echo 'hello world' | ipfs add
added QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
12 B / ? [--------------------------------------------------------------------------------------------------------------------------=------
$ ipfs cat QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
hello world
35
IPFS peers
$ ipfs swarm peers
/ip4/100.6.104.240/tcp/4001/ipfs/Qmb8unXAJNurpDkXKbJ33pTV8Yukdm6AXj2ReWVLFvFAvt
/ip4/103.26.76.33/tcp/4001/ipfs/QmTmFmwHfBQVb7xFRzxp2BsXPF1ouK8yY2tc6Wjb79BraZ
/ip4/103.60.164.126/tcp/4001/ipfs/QmaLvFXd1b5GcdbdPTEspnSkDMDojfCsSfwYmRotSovjas
/ip4/103.94.185.80/tcp/4001/ipfs/QmP3CNi3z2c3JivxQMrmegZWx8n7r2LQWAD5yGiUT6nPX1
/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
/ip4/104.190.120.58/tcp/58352/ipfs/QmQ3kYdbLMLEyF2sMgFb4eAygRmiPeNnFrE6xCQ2n4ifVe
/ip4/104.196.41.154/tcp/4001/ipfs/QmXJVVR32yC1ehjQhp5ZBiq7EymxZF9ZBB1F6FodW2JytF
/ip4/104.214.73.60/tcp/4001/ipfs/QmNe5CK9EWEZYttijNJ4gaGuHLsjNbjHbj9MdM6XAJR9es
36
IPFS id
$ ipfs id
{
"ID": "QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6",
"PublicKey": "CAASpgIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC0VFzN0Dv90LqJXTvRoS0G1nhHi6S0mONQ1jftl9QUUv8hTucf1XpWu+VfkSKcoWwr4MZZi5
"Addresses": [
"/ip4/127.0.0.1/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6",
"/ip4/192.168.86.208/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6",
"/ip6/::1/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6",
"/ip4/75.172.98.84/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6",
"/ip4/192.168.0.16/tcp/27891/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6"
],
"AgentVersion": "go-ipfs/0.4.18/aefc746",
"ProtocolVersion": "ipfs/0.1.0"
}
37
Providers
$ ipfs dht findprovs QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6
Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6
QmceZ5vcFtpcaPeAa66xnL79xo6fRrAmx6Gp6UZAFdkrDA
QmfFj5Am7Jw2DZm7s1aVdR5Ti5baT6a8B1ifcxCbya1vw5
QmVGkGSV25o3AMjcjjnPVb1PqJzrA1PvvhMiV57cMEuExb
QmaAbZQVFavUub1cvsXP8tfbk7p5i2cRVvimWv5La2E9U8
QmPDcnTLF5HftAhteRGVhAHnxwNfLzm541W7LL1rpaChy7
QmPDpBw1xsGvnNmkt9z9NsgNpezKzFNwVPcLcPVh2Weuwv
QmPMT3ZUATZWqZEiHd4Kjfe6H9UTTYjRJN4kqLvgWhrJpU
QmPR6Ggp5BTaKtvGJ9rwn3e86dMtzPRGRNmdLG8Yp7bhkP
QmNRZdPPtYycST9dPUPLQEqMoFq43fRx5pkKYBjYKuw1Fa
QmNSYDHzei4vn91k1sdF7oEcBHQWVTbibEBtXUpYSdkapX
QmNTXQyssJ5vMynxdW1jo5EcQq9XARS9nrGJykcYGKYbNH
QmNdtfrpDhP4yaRnPTUdqynnewBF4p5tUoq6Ngw1XFdmdj
QmNfFvrEoBThgW7dcPTkWjqAsicH1eq2GHsHrmCx8bMrxv
QmNjm16wkUUsUoRmr3b8QoQAPZYBwfBHcygkjGbSauTSWu
QmNkZvJVtf1AfkudwvkSwfV3Ru5hHFvitUugzvYBxtuPT7
QmNn2QFMrNcHstJVWnaT8XK31xe1e6HLvz7qg29yE2BGkS
QmNnnkCTY1ZbtusjMAtJ9Rn5arVtaDBjwRkFTf2WdPGmRq
QmNoBE4qVq7vuNtAMTqLhMYryL2YiWcrVB7eEbw4nYkjpW
38
Wait a moment, why everything starts with Qm ?
• sha2-256
• base58
• multihash
39
IPFS use cases
1. As a mounted global filesystem, under /ipfs and /ipns.
2. As a mounted personal sync folder that automatically versions, publishes, and backs
up any writes.
3. As an encrypted file or data sharing system.
4. As a versioned package manager for all software.
5. As the root filesystem of a Virtual Machine.
6. As the boot filesystem of a VM (under a hypervisor).
7. As a database: applications can write directly to the Merkle DAG data model and get
all the versioning, caching, and distribution IPFS provides.
8. As a linked (and encrypted) communications platform.
9. As an integrity checked CDN for large files (without SSL).
10. As an encrypted CDN.
11. On webpages, as a web CDN.
40
Problems in IPFS
• Data is not automatically replicated by default
• you may lose your data if nobody is using or pinning it, see this discussion
• at the moment it serves as a filesystem cache
• ipfs cluster allows files to be pinned across a cluster
• IPFS cluster is not efficient on replication
• at the moment, either accept it
• or build your own with eraser code like Reed-Solomon algo
41
IPFS for private usage 42
IPFS for blockchain 43
44

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to IPFS & Filecoin
Introduction to IPFS & FilecoinIntroduction to IPFS & Filecoin
Introduction to IPFS & FilecoinTinaBregovi
 
Secured (Kerberos-based) Spark Notebook for Data Science: Spark Summit East t...
Secured (Kerberos-based) Spark Notebook for Data Science: Spark Summit East t...Secured (Kerberos-based) Spark Notebook for Data Science: Spark Summit East t...
Secured (Kerberos-based) Spark Notebook for Data Science: Spark Summit East t...Spark Summit
 
Apache NiFi User Guide
Apache NiFi User GuideApache NiFi User Guide
Apache NiFi User GuideDeon Huang
 
Distributed Storage with IPFS and Python!
Distributed Storage with IPFS and Python!Distributed Storage with IPFS and Python!
Distributed Storage with IPFS and Python!Abhinav Srivastava
 
Building Applications with a Graph Database
Building Applications with a Graph DatabaseBuilding Applications with a Graph Database
Building Applications with a Graph DatabaseTobias Lindaaker
 
2014 한국 링크드 데이터 사례집
2014 한국 링크드 데이터 사례집2014 한국 링크드 데이터 사례집
2014 한국 링크드 데이터 사례집Hansung University
 
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...GetInData
 
Apache NiFi Meetup - Princeton NJ 2016
Apache NiFi Meetup - Princeton NJ 2016Apache NiFi Meetup - Princeton NJ 2016
Apache NiFi Meetup - Princeton NJ 2016Timothy Spann
 
What is new in Apache Hive 3.0?
What is new in Apache Hive 3.0?What is new in Apache Hive 3.0?
What is new in Apache Hive 3.0?DataWorks Summit
 
Types of interfaces in a Cisco Router
Types of interfaces in a Cisco RouterTypes of interfaces in a Cisco Router
Types of interfaces in a Cisco RouterNetProtocol Xpert
 
E2E Data Pipeline - Apache Spark/Airflow/Livy
E2E Data Pipeline - Apache Spark/Airflow/LivyE2E Data Pipeline - Apache Spark/Airflow/Livy
E2E Data Pipeline - Apache Spark/Airflow/LivyRikin Tanna
 
Dataflow Management From Edge to Core with Apache NiFi
Dataflow Management From Edge to Core with Apache NiFiDataflow Management From Edge to Core with Apache NiFi
Dataflow Management From Edge to Core with Apache NiFiDataWorks Summit
 
Spotify architecture - Pressing play
Spotify architecture - Pressing playSpotify architecture - Pressing play
Spotify architecture - Pressing playNiklas Gustavsson
 
Learning Computer Network Through Network Simulation Program
Learning Computer Network Through Network Simulation ProgramLearning Computer Network Through Network Simulation Program
Learning Computer Network Through Network Simulation ProgramI Putu Hariyadi
 

Was ist angesagt? (20)

Introduction to IPFS & Filecoin
Introduction to IPFS & FilecoinIntroduction to IPFS & Filecoin
Introduction to IPFS & Filecoin
 
Dataflow with Apache NiFi
Dataflow with Apache NiFiDataflow with Apache NiFi
Dataflow with Apache NiFi
 
Secured (Kerberos-based) Spark Notebook for Data Science: Spark Summit East t...
Secured (Kerberos-based) Spark Notebook for Data Science: Spark Summit East t...Secured (Kerberos-based) Spark Notebook for Data Science: Spark Summit East t...
Secured (Kerberos-based) Spark Notebook for Data Science: Spark Summit East t...
 
Avro introduction
Avro introductionAvro introduction
Avro introduction
 
Apache NiFi User Guide
Apache NiFi User GuideApache NiFi User Guide
Apache NiFi User Guide
 
Distributed Storage with IPFS and Python!
Distributed Storage with IPFS and Python!Distributed Storage with IPFS and Python!
Distributed Storage with IPFS and Python!
 
Dask: Scaling Python
Dask: Scaling PythonDask: Scaling Python
Dask: Scaling Python
 
Building Applications with a Graph Database
Building Applications with a Graph DatabaseBuilding Applications with a Graph Database
Building Applications with a Graph Database
 
2014 한국 링크드 데이터 사례집
2014 한국 링크드 데이터 사례집2014 한국 링크드 데이터 사례집
2014 한국 링크드 데이터 사례집
 
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
Best Practices for ETL with Apache NiFi on Kubernetes - Albert Lewandowski, G...
 
Apache NiFi Crash Course Intro
Apache NiFi Crash Course IntroApache NiFi Crash Course Intro
Apache NiFi Crash Course Intro
 
Apache NiFi Meetup - Princeton NJ 2016
Apache NiFi Meetup - Princeton NJ 2016Apache NiFi Meetup - Princeton NJ 2016
Apache NiFi Meetup - Princeton NJ 2016
 
What is new in Apache Hive 3.0?
What is new in Apache Hive 3.0?What is new in Apache Hive 3.0?
What is new in Apache Hive 3.0?
 
Apache NiFi in the Hadoop Ecosystem
Apache NiFi in the Hadoop Ecosystem Apache NiFi in the Hadoop Ecosystem
Apache NiFi in the Hadoop Ecosystem
 
Types of interfaces in a Cisco Router
Types of interfaces in a Cisco RouterTypes of interfaces in a Cisco Router
Types of interfaces in a Cisco Router
 
E2E Data Pipeline - Apache Spark/Airflow/Livy
E2E Data Pipeline - Apache Spark/Airflow/LivyE2E Data Pipeline - Apache Spark/Airflow/Livy
E2E Data Pipeline - Apache Spark/Airflow/Livy
 
Dataflow Management From Edge to Core with Apache NiFi
Dataflow Management From Edge to Core with Apache NiFiDataflow Management From Edge to Core with Apache NiFi
Dataflow Management From Edge to Core with Apache NiFi
 
Spotify architecture - Pressing play
Spotify architecture - Pressing playSpotify architecture - Pressing play
Spotify architecture - Pressing play
 
SQOOP PPT
SQOOP PPTSQOOP PPT
SQOOP PPT
 
Learning Computer Network Through Network Simulation Program
Learning Computer Network Through Network Simulation ProgramLearning Computer Network Through Network Simulation Program
Learning Computer Network Through Network Simulation Program
 

Ähnlich wie IPFS: A New Distributed World

Introduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer versionIntroduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer versionTinaBregovi
 
IPFS introduction
IPFS introductionIPFS introduction
IPFS introductionGenta M
 
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...CyberLab
 
Introduction to Filecoin
Introduction to Filecoin   Introduction to Filecoin
Introduction to Filecoin Vanessa Lošić
 
Spectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN CachingSpectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN CachingSandeep Patil
 
Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...Trishali Nayar
 
The State of Decentralized Storage
The State of Decentralized StorageThe State of Decentralized Storage
The State of Decentralized StorageCoinGecko
 
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica Sarbu
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica SarbuOSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica Sarbu
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica SarbuNETWAYS
 
Module: Content Routing in IPFS
Module: Content Routing in IPFSModule: Content Routing in IPFS
Module: Content Routing in IPFSIoannis Psaras
 
Storing and distributing data
Storing and distributing dataStoring and distributing data
Storing and distributing dataPhil Cryer
 
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat Security Conference
 

Ähnlich wie IPFS: A New Distributed World (20)

Introduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer versionIntroduction to IPFS & Filecoin - longer version
Introduction to IPFS & Filecoin - longer version
 
IPFS introduction
IPFS introductionIPFS introduction
IPFS introduction
 
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...
WHITEPAPER ON Serverless Hosting platform based on Blockchain and by Vivek Ch...
 
Decentralized storage
Decentralized storageDecentralized storage
Decentralized storage
 
Introduction to Filecoin
Introduction to Filecoin   Introduction to Filecoin
Introduction to Filecoin
 
Spectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN CachingSpectrum Scale Unified File and Object with WAN Caching
Spectrum Scale Unified File and Object with WAN Caching
 
Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...Software Defined Analytics with File and Object Access Plus Geographically Di...
Software Defined Analytics with File and Object Access Plus Geographically Di...
 
IPFSNov5.pptx
IPFSNov5.pptxIPFSNov5.pptx
IPFSNov5.pptx
 
The State of Decentralized Storage
The State of Decentralized StorageThe State of Decentralized Storage
The State of Decentralized Storage
 
Kfs presentation
Kfs presentationKfs presentation
Kfs presentation
 
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica Sarbu
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica SarbuOSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica Sarbu
OSDC 2016 - Unifying Logs and Metrics Data with Elastic Beats by Monica Sarbu
 
BitTorrent on iOS
BitTorrent on iOSBitTorrent on iOS
BitTorrent on iOS
 
Hadoop introduction
Hadoop introductionHadoop introduction
Hadoop introduction
 
HDFCloud Workshop: HDF5 in the Cloud
HDFCloud Workshop: HDF5 in the CloudHDFCloud Workshop: HDF5 in the Cloud
HDFCloud Workshop: HDF5 in the Cloud
 
Hadoop training in bangalore
Hadoop training in bangaloreHadoop training in bangalore
Hadoop training in bangalore
 
Module: Content Routing in IPFS
Module: Content Routing in IPFSModule: Content Routing in IPFS
Module: Content Routing in IPFS
 
P2P Lecture.ppt
P2P Lecture.pptP2P Lecture.ppt
P2P Lecture.ppt
 
Storing and distributing data
Storing and distributing dataStoring and distributing data
Storing and distributing data
 
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
BlueHat v17 || Dyre to Trickbot: An Inside Look at TLS-Encrypted Command-And-...
 
Hades
HadesHades
Hades
 

Mehr von ArcBlock

ArcBlock Introduction to Blockchain
ArcBlock Introduction to BlockchainArcBlock Introduction to Blockchain
ArcBlock Introduction to BlockchainArcBlock
 
Forge blockchain deployment made easy
Forge  blockchain deployment made easyForge  blockchain deployment made easy
Forge blockchain deployment made easyArcBlock
 
Designing Decentralized Apps: Programmable Tokens
Designing Decentralized Apps: Programmable TokensDesigning Decentralized Apps: Programmable Tokens
Designing Decentralized Apps: Programmable TokensArcBlock
 
Build a Decentralized, public verifiable Database with ex_abci and Tendermint
Build a Decentralized, public verifiable Database with ex_abci and TendermintBuild a Decentralized, public verifiable Database with ex_abci and Tendermint
Build a Decentralized, public verifiable Database with ex_abci and TendermintArcBlock
 
ArcBlock Presents 5 Winning Factors to Building a Successful DApp
ArcBlock Presents 5 Winning Factors to Building a Successful DAppArcBlock Presents 5 Winning Factors to Building a Successful DApp
ArcBlock Presents 5 Winning Factors to Building a Successful DAppArcBlock
 
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity Verification
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity VerificationQRCodes are Fun, Easy, and Useful for Links, Payments and Identity Verification
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity VerificationArcBlock
 
Designing Decentralized Applications (DApps)
Designing Decentralized Applications (DApps) Designing Decentralized Applications (DApps)
Designing Decentralized Applications (DApps) ArcBlock
 
Cryptography for everyone
Cryptography for everyoneCryptography for everyone
Cryptography for everyoneArcBlock
 
Introduction to HTTP/2 and How To Use It
Introduction to HTTP/2 and How To Use ItIntroduction to HTTP/2 and How To Use It
Introduction to HTTP/2 and How To Use ItArcBlock
 
Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1ArcBlock
 
Understanding hd wallets design and implementation
Understanding hd wallets  design and implementationUnderstanding hd wallets  design and implementation
Understanding hd wallets design and implementationArcBlock
 
Technical Learning Series - Elixir ExUnit
Technical Learning Series - Elixir ExUnitTechnical Learning Series - Elixir ExUnit
Technical Learning Series - Elixir ExUnitArcBlock
 
Tendermint in a nutshell
Tendermint in a nutshellTendermint in a nutshell
Tendermint in a nutshellArcBlock
 
Introduction to CQRS & Commended
Introduction to CQRS & CommendedIntroduction to CQRS & Commended
Introduction to CQRS & CommendedArcBlock
 
Decipher Multi-Factor Authentication - A Developers Introduction
Decipher Multi-Factor Authentication - A Developers IntroductionDecipher Multi-Factor Authentication - A Developers Introduction
Decipher Multi-Factor Authentication - A Developers IntroductionArcBlock
 
Introduction to aws data pipeline services
Introduction to aws data pipeline servicesIntroduction to aws data pipeline services
Introduction to aws data pipeline servicesArcBlock
 
Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts ArcBlock
 
ArcBlock Presents An Introduction to Blockchain
ArcBlock Presents An Introduction to BlockchainArcBlock Presents An Introduction to Blockchain
ArcBlock Presents An Introduction to BlockchainArcBlock
 

Mehr von ArcBlock (18)

ArcBlock Introduction to Blockchain
ArcBlock Introduction to BlockchainArcBlock Introduction to Blockchain
ArcBlock Introduction to Blockchain
 
Forge blockchain deployment made easy
Forge  blockchain deployment made easyForge  blockchain deployment made easy
Forge blockchain deployment made easy
 
Designing Decentralized Apps: Programmable Tokens
Designing Decentralized Apps: Programmable TokensDesigning Decentralized Apps: Programmable Tokens
Designing Decentralized Apps: Programmable Tokens
 
Build a Decentralized, public verifiable Database with ex_abci and Tendermint
Build a Decentralized, public verifiable Database with ex_abci and TendermintBuild a Decentralized, public verifiable Database with ex_abci and Tendermint
Build a Decentralized, public verifiable Database with ex_abci and Tendermint
 
ArcBlock Presents 5 Winning Factors to Building a Successful DApp
ArcBlock Presents 5 Winning Factors to Building a Successful DAppArcBlock Presents 5 Winning Factors to Building a Successful DApp
ArcBlock Presents 5 Winning Factors to Building a Successful DApp
 
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity Verification
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity VerificationQRCodes are Fun, Easy, and Useful for Links, Payments and Identity Verification
QRCodes are Fun, Easy, and Useful for Links, Payments and Identity Verification
 
Designing Decentralized Applications (DApps)
Designing Decentralized Applications (DApps) Designing Decentralized Applications (DApps)
Designing Decentralized Applications (DApps)
 
Cryptography for everyone
Cryptography for everyoneCryptography for everyone
Cryptography for everyone
 
Introduction to HTTP/2 and How To Use It
Introduction to HTTP/2 and How To Use ItIntroduction to HTTP/2 and How To Use It
Introduction to HTTP/2 and How To Use It
 
Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1Ethereum virtual machine for Developers Part 1
Ethereum virtual machine for Developers Part 1
 
Understanding hd wallets design and implementation
Understanding hd wallets  design and implementationUnderstanding hd wallets  design and implementation
Understanding hd wallets design and implementation
 
Technical Learning Series - Elixir ExUnit
Technical Learning Series - Elixir ExUnitTechnical Learning Series - Elixir ExUnit
Technical Learning Series - Elixir ExUnit
 
Tendermint in a nutshell
Tendermint in a nutshellTendermint in a nutshell
Tendermint in a nutshell
 
Introduction to CQRS & Commended
Introduction to CQRS & CommendedIntroduction to CQRS & Commended
Introduction to CQRS & Commended
 
Decipher Multi-Factor Authentication - A Developers Introduction
Decipher Multi-Factor Authentication - A Developers IntroductionDecipher Multi-Factor Authentication - A Developers Introduction
Decipher Multi-Factor Authentication - A Developers Introduction
 
Introduction to aws data pipeline services
Introduction to aws data pipeline servicesIntroduction to aws data pipeline services
Introduction to aws data pipeline services
 
Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts Introduction to Ethereum Smart Contracts
Introduction to Ethereum Smart Contracts
 
ArcBlock Presents An Introduction to Blockchain
ArcBlock Presents An Introduction to BlockchainArcBlock Presents An Introduction to Blockchain
ArcBlock Presents An Introduction to Blockchain
 

Kürzlich hochgeladen

Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 

Kürzlich hochgeladen (20)

Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 

IPFS: A New Distributed World

  • 1. IPFS: a whole new world Brought to you by Tyr Chen 1
  • 2. Existing issues in internet 2
  • 5. Collaboration & O ine support 5
  • 6. And something horrible…WTF on resiliency? 6
  • 8. And the ultimate tragedy…in the history of mankind 8
  • 9. What rst? • web first • mobile first • data first • AI first • … • … • distributed, offline first? 9
  • 10. Entering InterPlanetary File System world! 10
  • 11. The big things before IPFS • DHT: Ditributed Hash Table • Kademlia DHT: query is . Used widely by Gnutella and BitTorrent • Coral DSHT: make the storage and bandwidth usage more efficient than Kademlia • s/kademlia DHT: add PoW to prevent attack (PoW on node id gen, ). • BitTorrent: incentified by bit-for-tat and prioritized with rare block • Git: Merkle DAG O(log2N ) 11
  • 13. What is DHT? A distributed hash table (DHT) is a class of a decentralized distributed system that provides a lookup service similar to a hash table: (key, value) pairs are stored in a DHT, and any participating node can efficiently retrieve the value associated with a given key. Keys are unique identifiers which map to particular values, which in turn can be anything from addresses, to documents, to arbitrary data.[1] Responsibility for maintaining the mapping from keys to values is distributed among the nodes, in such a way that a change in the set of participants causes a minimal amount of disruption. “ 13
  • 15. Node join / leave 15
  • 17. IPFS & BitTorrent • Similarity: • exchange of data (blocks) in IPFS is inspired by BitTorrent • tit-for-tat strategy (if you don’t share, you won’t get) • get rare pieces first • Difference: • separate swarm for each file (BitTorrent), one swarm for all (BitSwap in IPFS) 17
  • 18. IPFS & Git (copied from white paper) 1. Immutable objects represent Files (blob), Directories (tree), and Changes (commit). 2. Objects are content-addressed, by the cryptographic hash of their contents. 3. Links to other objects are embedded, forming a Merkle DAG. This provides many useful integrity and workflow properties. 4. Most versioning metadata (branches, tags, etc.) are simply pointer references, and thus inexpensive to create and update. 5. Version changes only update references or add objects. 6. Distributing version changes to other users is simply transferring objects and updating remote references. 18
  • 20. What are the use cases for Merkle DAG? 20
  • 22. IPFS Core Parts • Identities: node identity generation & verification • Network: p2p • Routing: DHT • Exchange: BitSwap • Objects: Merkle DAG • Files: versioned file system like Git • Naming: self-certifying mutable name system 22
  • 23. Exchange: BitSwap • peers exchange which blocks they have (have_list) and which blocks they are looking for (want_list) upon connecting • to decide if a node will actually share data, it will apply its BitSwap Strategy • based on previous data exchanges between these two peers • peers keep track of the amount of data they share (builds credit) and the amount of data they receive (builds debt) • kept track of in the BitSwap Ledger • if a peer has credit (shared more than received) • our node will send the requested block • if a peer has debt, our node will share or not share • depending on a deterministic function where the chance of sharing becomes smaller when the debt is bigger • a data exchange always starts with the exchange of the ledger, if it is not identical our node disconnects 23
  • 24. BitSwap Ledger type Ledger struct { owner NodeId partner NodeId bytes_sent int bytes_recv int timestamp Timestamp } 24
  • 25. BitSwap Spec // Additional state kept type BitSwap struct { ledgers map[NodeId]Ledger // Ledgers known to this node, inc inactive active map[NodeId]Peer // currently open connections to other nodes need_list []Multihash // checksums of blocks this node needs have_list []Multihash // checksums of blocks this node has } type Peer struct { nodeid NodeId ledger Ledger // Ledger between the node and this peer last_seen Timestamp // timestamp of last received message want_list []Multihash // checksums of all blocks wanted by peer // includes blocks wanted by peer’s peers } // Protocol interface: interface Peer { open (nodeid :NodeId, ledger :Ledger); send_want_list (want_list :WantList); send_block (block :Block) -> (complete :Bool); 25
  • 26. Files: unixfs syntax = "proto2"; package unixfs.pb; message Data { enum DataType { Raw = 0; Directory = 1; File = 2; Metadata = 3; Symlink = 4; HAMTShard = 5; } required DataType Type = 1; optional bytes Data = 2; optional uint64 filesize = 3; repeated uint64 blocksizes = 4; optional uint64 hashType = 5; optional uint64 fanout = 6; } message Metadata { optional string MimeType = 1; } 26
  • 27. Naming: add mutability • The root address of a node is /ipns/ • The content it points to can be changed by publishing an IPFS object to this address • By publishing, the owner of the node (the person who knows the secret key that was generated with ipfs init) cryptographically signs this “pointer”. • This enables other users to verify the authenticity of the object published by the owner. • Just like IPFS paths, IPNS paths also start with a hash, followed by a Unix-like path. • IPNS records are announced and resolved via the DHT. 27
  • 29. IPFS stack • Moving the data easily and efficiently: libp2p • Defining the data: IPLD, IPNS • Using the data: IPFS app 29
  • 30. Concepts • CID: content identifier. Based on the content’s cryptographic hash. • DNS link: use DNS TXT records to map a domain name (e.g. ipfs.io) to an IPFS address. • IPNS: Inter-Planetary Name System is a system for creating and updating mutable links to IPFS content. IPFS address changes everytime the content changes. A name in IPNS is the hash of a public key. • MFS: Mutible File System allows to treat files like a normal file system. It takes care of all the work of updating links and hashes upon change of file. • Pinning: IPFS nodes treads data like a cache so if you want something to be retained long-term you can pin it. • UinxFS: UnixFS is a data format to respresent files and all their links and metadata, loosely based on how files work in Unix. 30
  • 34. Start IPFS $ ipfs init initializing IPFS node at /Users/tchen/.ipfs generating 2048-bit RSA keypair...done peer identity: QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6 to get started, enter: ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme $ brew services start ipfs ==> Successfully started `ipfs` (label: homebrew.mxcl.ipfs) 34
  • 35. Add a le $ echo 'hello world' | ipfs add added QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o 12 B / ? [--------------------------------------------------------------------------------------------------------------------------=------ $ ipfs cat QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o hello world 35
  • 36. IPFS peers $ ipfs swarm peers /ip4/100.6.104.240/tcp/4001/ipfs/Qmb8unXAJNurpDkXKbJ33pTV8Yukdm6AXj2ReWVLFvFAvt /ip4/103.26.76.33/tcp/4001/ipfs/QmTmFmwHfBQVb7xFRzxp2BsXPF1ouK8yY2tc6Wjb79BraZ /ip4/103.60.164.126/tcp/4001/ipfs/QmaLvFXd1b5GcdbdPTEspnSkDMDojfCsSfwYmRotSovjas /ip4/103.94.185.80/tcp/4001/ipfs/QmP3CNi3z2c3JivxQMrmegZWx8n7r2LQWAD5yGiUT6nPX1 /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ /ip4/104.190.120.58/tcp/58352/ipfs/QmQ3kYdbLMLEyF2sMgFb4eAygRmiPeNnFrE6xCQ2n4ifVe /ip4/104.196.41.154/tcp/4001/ipfs/QmXJVVR32yC1ehjQhp5ZBiq7EymxZF9ZBB1F6FodW2JytF /ip4/104.214.73.60/tcp/4001/ipfs/QmNe5CK9EWEZYttijNJ4gaGuHLsjNbjHbj9MdM6XAJR9es 36
  • 37. IPFS id $ ipfs id { "ID": "QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6", "PublicKey": "CAASpgIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC0VFzN0Dv90LqJXTvRoS0G1nhHi6S0mONQ1jftl9QUUv8hTucf1XpWu+VfkSKcoWwr4MZZi5 "Addresses": [ "/ip4/127.0.0.1/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6", "/ip4/192.168.86.208/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6", "/ip6/::1/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6", "/ip4/75.172.98.84/tcp/4001/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6", "/ip4/192.168.0.16/tcp/27891/ipfs/QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6" ], "AgentVersion": "go-ipfs/0.4.18/aefc746", "ProtocolVersion": "ipfs/0.1.0" } 37
  • 38. Providers $ ipfs dht findprovs QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o QmYu24HbZC3FTMxfKPJFNFM16tNdbMSJYtvfT2Kixe9Qo6 Qmbut9Ywz9YEDrz8ySBSgWyJk41Uvm2QJPhwDJzJyGFsD6 QmceZ5vcFtpcaPeAa66xnL79xo6fRrAmx6Gp6UZAFdkrDA QmfFj5Am7Jw2DZm7s1aVdR5Ti5baT6a8B1ifcxCbya1vw5 QmVGkGSV25o3AMjcjjnPVb1PqJzrA1PvvhMiV57cMEuExb QmaAbZQVFavUub1cvsXP8tfbk7p5i2cRVvimWv5La2E9U8 QmPDcnTLF5HftAhteRGVhAHnxwNfLzm541W7LL1rpaChy7 QmPDpBw1xsGvnNmkt9z9NsgNpezKzFNwVPcLcPVh2Weuwv QmPMT3ZUATZWqZEiHd4Kjfe6H9UTTYjRJN4kqLvgWhrJpU QmPR6Ggp5BTaKtvGJ9rwn3e86dMtzPRGRNmdLG8Yp7bhkP QmNRZdPPtYycST9dPUPLQEqMoFq43fRx5pkKYBjYKuw1Fa QmNSYDHzei4vn91k1sdF7oEcBHQWVTbibEBtXUpYSdkapX QmNTXQyssJ5vMynxdW1jo5EcQq9XARS9nrGJykcYGKYbNH QmNdtfrpDhP4yaRnPTUdqynnewBF4p5tUoq6Ngw1XFdmdj QmNfFvrEoBThgW7dcPTkWjqAsicH1eq2GHsHrmCx8bMrxv QmNjm16wkUUsUoRmr3b8QoQAPZYBwfBHcygkjGbSauTSWu QmNkZvJVtf1AfkudwvkSwfV3Ru5hHFvitUugzvYBxtuPT7 QmNn2QFMrNcHstJVWnaT8XK31xe1e6HLvz7qg29yE2BGkS QmNnnkCTY1ZbtusjMAtJ9Rn5arVtaDBjwRkFTf2WdPGmRq QmNoBE4qVq7vuNtAMTqLhMYryL2YiWcrVB7eEbw4nYkjpW 38
  • 39. Wait a moment, why everything starts with Qm ? • sha2-256 • base58 • multihash 39
  • 40. IPFS use cases 1. As a mounted global filesystem, under /ipfs and /ipns. 2. As a mounted personal sync folder that automatically versions, publishes, and backs up any writes. 3. As an encrypted file or data sharing system. 4. As a versioned package manager for all software. 5. As the root filesystem of a Virtual Machine. 6. As the boot filesystem of a VM (under a hypervisor). 7. As a database: applications can write directly to the Merkle DAG data model and get all the versioning, caching, and distribution IPFS provides. 8. As a linked (and encrypted) communications platform. 9. As an integrity checked CDN for large files (without SSL). 10. As an encrypted CDN. 11. On webpages, as a web CDN. 40
  • 41. Problems in IPFS • Data is not automatically replicated by default • you may lose your data if nobody is using or pinning it, see this discussion • at the moment it serves as a filesystem cache • ipfs cluster allows files to be pinned across a cluster • IPFS cluster is not efficient on replication • at the moment, either accept it • or build your own with eraser code like Reed-Solomon algo 41
  • 42. IPFS for private usage 42
  • 44. 44