Permanent Archive

The permanent archive is the immutable aspect of the permanent wiki. The aim is to create a publishing medium for wiki. It is designed to store immutable assets such as images, video and audio together with standard single page sites, and finalise json data.

# Objectives

Suppose we have an asset called fred.jpg within wiki with domain outlandish.academy. Instead of storing this on the file path:

outlandish.academy/assets/img/fred.jpg

A core objective of the Permanent Archive is to store online assets so that are easy to recover. To do this we look to use an archive file naming convention.

# Preliminary Version using IPFS

The preliminary version of this supports assets to be presented on federated wikis and uses IPFS to store the assets, which may be images, video clips, audio clips or any other form of digital media.

When the assets are created, they will first be placed in a conventional filing system on the wiki server, using a filing system structure as follows, illustrated for a wiki under domain name outlandish.academy:

outlandish.academy assets css img js media

An asset will be placed in the appropriate sub-directory based on its mime type. It will then be added to ipfs, which will return the hash which uniquely identifies the file in ipfs. E.g.

Trevor-Hilders-MacBook-Pro:Downloads TrevorH$ ipfs add mypicture.jpg added QmUZDM7VYgF7BaFDPdei895iSaTFCMQtyJRnCndVNQesw3 mypicture.jpg

The asset will then be renamed with the prefix ipfs_ followed by the returned hash and the original file extension. E.g: Above file mypicture.png will be renamed to:

ipfs_QmUZDM7VYgF7BaFDPdei895iSaTFCMQtyJRnCndVNQesw3.jpg

# Recovery of an apparently lost asset

An apparently lost asset can be recovered from ipfs by using get to retrieve it, then renaming it to ipfs_hash.ext. E.g:

# More Sophisticated Use of IPFS to Maintain Original File Names & Versions

then adding it to ipfs and renaming it to ipfs_ipfs_hash.jpg, we put it in a directory with name:

outlandish.academy/assets/img/fred.jpg

then add the directory to ipfs and rename the file as above. E.g:

Trevor-Hilders-MacBook-Pro:Downloads TrevorH$ ipfs get QmUZDM7VYgF7BaFDPdei895iSaTFCMQtyJRnCndVNQesw3 Saving file(s) to QmUZDM7VYgF7BaFDPdei895iSaTFCMQtyJRnCndVNQesw3 28.65 KB / 28.65 KB [===================================================================================================================================================================] 100.00% 0s Trevor-Hilders-MacBook-Pro:Downloads TrevorH$ mv QmUZDM7VYgF7BaFDPdei895iSaTFCMQtyJRnCndVNQesw3 ipfs_QmUZDM7VYgF7BaFDPdei895iSaTFCMQtyJRnCndVNQesw3.jpg

Kademlia is the inspiration for the distributed hash table used as a core component of IPFS.

Here we discuss how we might structure the IPFS "file system" to serve Fedwiki pages and integrate this with Standalone JavaScript Apps.

Here we look at how we might host our own IPFS Gateway for hosting Fedwiki assets.

A Wiki Page Package is a folder that contains an indexed list of IPFS multihash entries to individual paragraph items in IPFS.

The philosophy here is based on the idea of Loose Coupling of IPFS to wiki. This can be acheived by using an archive file naming convention, in which we can manually or programatically retrieve the IPFS multihash from the assets filename.

A page entitled "Cats" is serving a file "cats.json" that is constructed out of atomic paragraphs. The file and folder structure can then be a series of IPFS link lists to assemblages of paragraph level items all within a global folder with an IPFS path of the form:

There can be many IPFS Folder Hash's corresponding to different collections of pages. One for the global name space (which may also be refered to by a mutable IPNS hash), and others for particular collections on pages sharing the same title/slug.

Here we examine how we stream video using IPFS. Let's do some research on how to install IPFS, and it's application to creating a Decentralised Video Workstation.

Loose coupling of IPFS with wiki can be achieved through using IPFS as an alternative distribution source for some or all of wiki. It can act as a form of backup of important assets, and as a way to access the information in a decentralised way.

IPNS stands for the The Inter-Planetary Naming System. ipns is a way to add a small amount of mutability to the permanent immutability that is ipfs. It allows you to store a reference to an ipfs hash under the namespace of your peerID ( hash of your public key ). - github

IPFS paths begin with a multihash and can be followed by an arbitrarily long path. Each path component is looked up in each IPFS nodes link-list until the final blob is retreived.

IPFS recently merged a simple, experimental pubsub implementation into IPFS. This implementation is just a beginning. It is far from the performance and security goals we will achieve in our long-term target. However, even this early implementation opens the doors to several useful and interesting new applications.

Multihash (as used by IPFS), is a protocol for differentiating outputs from various well-established cryptographic hash functions, addressing size + encoding considerations.

IPFS uses a global local object repository, added to ~/.ipfs. See the full instructions over at ipfs.io

IPFS Files API allows to manipulate unixfs objects (current IPFS files and directories format) in manner similar to normal Unix commands.

IPFS HTTP API is an RPC API which should work across different IPFS implementations. The most feature-complete of those implementations, and current reference for this specification is go-ipfs - ipfs.io