Development Update 5

Novusphere
3 min readSep 20, 2017

--

The primary focus of last week’s development was implementing functionality such that AFIX could be dynamically queried to retrieve data from the index. In development update 4, we saw a simple example of what a plugin could do to present data once it knew the relevant transaction id, but not how the plugin could find relevant transaction ids.

Next week, we will be continuing work on AFIX and it’s subsequent plugins/integrations. We also intend next week to do some restructuring of the current main website and move it over to GitHub hosting since it is mostly static content. This allows for easier community participation in overall review and improvement as typos will be easier caught and users can open issues about what they would like to see changed or added to the FAQ. This will help clear up the much confusion new comers often have as much information on the main site is currently out dated.

AFIX

Server Refactoring

There was major refactoring done in preparation to make AFIX queryable. The server code used for the Blockchain Interface is estimated to be open sourced in mid to late October. It currently takes about 10 minutes to synchronize the chain state from an atmos daemon (full node) and an insignificant amount of time to download and process the metadata.

Blockchain Interface

This week’s contains a work in progress plugin called afixmovie which shows a more specific presentation of a video also utilizing the expected metadata.

An example with Sintel is shown below and the metadata can be seen here,
https://wallet.novusphere.io/#/afixmovie/play/6011a689f679a0e65f1b68bfc26e717d7b9e867dfe7be553319176886d02faf0

The server changes last week now allow us to perform queries. For example, using this link you can see how plugins can query data from the index. This allows the plugin to implement features such as showing to the user the most recently indexed content, the most popular content, and so forth.

The first thing you should notice is there are duplicates. These are from testing, but it does show what will likely happen in the future. Just because a user indexes some content does not mean the data storage layer it points to is “alive” (in typical streaming terms, think dead links). For this, a type of rating system is intended to be implemented similar to how Medium has claps, Youtube has likes/dislikes, and so forth.

During this week of development, the plugin will continue to be further developed to do what was previous possible in the proof-of-concept demo in the past (show the most recently indexed content, easy search features by genre and other criteria, etc).

Security — Considering The Future

The server not only stores the chain state (utxo) but also the metadata this means a transaction with metadata attached to it is actually “heavier” than one that may be the same size on the blockchain. At this time, the OP_RETURN outputs that stores the IPFS metadata hash currently only cost an additional 2 satoshis. In the future, this will need to be adjusted to account for how large the metadata is. The larger the metadata, the more burdensome it is to index so the fee needs to take this into account.

Another vector to consider is queries processed by AFIX. These queries lack any write permissions, so corrupting data isn’t much of a concern. The issue is how expensive these queries are and how long they take to execute. Regardless of what database model is used, indexing aggregates is one of the most common database optimizations. In the future, there will likely be a transaction type to request the database to build an index on specific metadata json paths.

Users who use their own private gateway aren’t exposed to the threat of bad actors since only they can connect to their gateway. For public gateways, we can determine a bad actor by throttling how often they can query AFIX using a queue and then calculating the average query time. If a user’s queries are taking too long, they can then either be permanently or temporarily banned. Using a public gateway is a privilege, not a right as any user will be able to set up their own private gateway.

Potential Future Partnerships

We have been in contact with another developer, Brian Carter, about his project Vega and his interest in using AFIX as a decentralized queryable data source. We’re happy to see that he’s making progress with the initial launch and demo of his project, and we encourage you that if you have an interest in machine learning to check out his project Vega Intelligent Solutions!

Resources

--

--

Novusphere

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