Development Update 4

Novusphere
2 min readSep 10, 2017

--

The primary focus of last week’s development was migrating the code base to take advantage of features standardized in ECMAScript 6 and implementing simple test interfaces for AFIX.

Next week, we will be continuing work on AFIX and beginning our port of existing infrastructure to browse indexed content in a more user friendly manner.

Advanced File Index (AFIX)

The brief explanation of how AFIX works is an IPFS hash which points to a set of metadata is stored on the blockchain.

From the hash, we can then resolve the metadata as seen below:

{
"layer": "ipfs",
"data": "QmbFwV3C73eqM5x2AvRjPYXifoBe73JkBQYWhn5jBsYR4t",
"metadata": {
"prefer": "ipfs.novusphere.io:8080",
"format": "mp3",
"name": "Ahrix - Nova",
"description": "Ahrix - Nova: No Copyright Sounds"
}
}

The metadata is then analyzed to determine how to process it. Using the example above we can see its data storage layer is IPFS and further see that it’s format is mp3.

A simple example of handling this data and presenting it back to the user can be seen here:
https://wallet.novusphere.io/#/afix/tx/bd2e99584c454e627966bf8d96d2109c773e4e89c7a32b7a721d54a0b9017c84

While IPFS is at the crux of AFIX, the data storage layer used is quite flexible. For example, this metadata is for a Web Torrent.

This can then be presented back to the user as seen here (code):
https://wallet.novusphere.io/#/afix/tx/0b05b2d3edda40bf501ac570a09d60733f1bd639d7dd36a5b2d91320bee61d57

In the future, nodes will maintain an index of metadata the same way they do the unspent transaction output set. This index provides a means of performing complex advanced queries which the results of can then be presented back to the user in an easy to navigate fashion.

With the flexibility of plugins and AFIX we hope to see use cases such as video streaming, blogging and more implemented in the near future!

ECMAScript 6 (ES6)

The decision to use ES6 features has greatly reduced the technical debt in terms of the code base. This has allowed for code to become more modular as well as readable due to the use of new language features in ES6 such as async/await. There are some downsides to using ES6 such as the lack of backwards comparability with older browsers without using a compiler such as Babel, however the trade off in terms of making things easier for future developers is worth it.

Resources

--

--

Novusphere

Censorship resistance through blockchain and IPFS. Creating a platform to allow people to send, share and find whatever, whenever.