IPFS - Essentials

in #ipfs8 years ago

IPFS - Interplanetory File System

This is a sequel to my previous about post IPFS

Introduction

IPFS is a peer to peer hypermedia protocol inspired by peer to peer sharing by bittorrent and file system management by git. It promises and infact makes the web permanent and you can wtch the philosophy behind it in this awesome video.

Installation

Please refer to Installation Instructions for installing IPFS on your system.

You can check if IPFS is instaled correctly using following command

ipfs version

This should print the version of IPFS installed on your system.

For this tutorial I am using my windows 10 machine and have unpacked the ipfs archive and added the archived folder to my path.

To get started with IPFS we need to initialize it.

Initializing IPFS

ipfs init initializes the IPFS.

IMG01

After successful initialization it provides a unique identity. These unique ids help locate shared IPFS folders and files over network. The output suggests that we should try using cat command with ipfs.

Fetch and Display content

ipfs cat /ipfs/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv/readme

The command above displays the contents of readme file as follows

02

This file was dileverd from QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv to my machine after I ran that command.

Browse what is shared and is available

ipfs ls QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv lists all the files shared by QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv.

03

The files are listed with the corrosponding hash values of the content. This means duplicate content even if name differently will resolve to same hash value.

Sharing your local files and folders with IPFS

ipfs add -r 2048-master

This command adds the folder to ipfs and returns a hash value with which it can be accessed. In our example 2048-master contains a HTML and JavaScript based game and we have just hosted it on IPFS however to make it accessible ipfs deamon needs to be running on the host. Let's start it with following command in seperate terminal.

ipfs daemon

Once the daemon is up an running we should be able to use the hash provided by ipfs add command and access the 2048 Game. (Don't get distracted by the game)

It will be served in the browser with address http://localhost:8080/ipfs/QmR86uV9rocnG57rU9jCo1cdPsiL5zhbQj3xs16SPCxJpM/

Useful Links:

Sort:  

Your Post Has Been Featured on @Resteemable!
Feature any Steemit post using resteemit.com!
How It Works:
1. Take Any Steemit URL
2. Erase https://
3. Type re
Get Featured Instantly � Featured Posts are voted every 2.4hrs
Join the Curation Team Here | Vote Resteemable for Witness

so you say iPFS its like torrent and this tecnologi will make the internet unerreaser...great!

Well, it's interesting. The system offers a kind of granular control. If you're having copyright problems, for example, you can make it so that your gateway won't execute a given hash. Discovered this was possible the other night when I tried to use ipfs to download a copy of The Big Lebowski that was posted on Reddit. The beauty of it though, is that such measures are not network wide.

As far as I'm concerned this is the next iteration of the web. And it's a thing of beauty.

Absolutely...

@pwangdu, Like your contribution, upvote.

Thanks

youwelkome @pwangdu i like the technologiworl..in the future everything wilbe blockchain...