TMFS: a IPFS concept design

in #ipfs5 years ago (edited)

ipfs
orbitdb

Pretext

Currently IPFS object are static, immutable and unchangeable without changing the CID (content identifier). CID otherwise known as a multihash is a unique content identifier to a particular set of data. Typically most IPFS file hashes start with Qm. This static identifier is very useful for preserving a particular record, such as a transaction ID, a JavaScript library, images (I generally assume they won't change any time soon). It being static makes it also secure when being used to prove the validity of the data itself. However, this presents an issue when file mutability is necessary for an application, for example: collaborative text editing, editable notes, collaborative development (git/GitHub), an updatable Dropbox etc.

Currently there are a few systems designed to solve this issue. Blockchain is one textiles (an IPFS variant) is designed to function as a social media system. If using a Blockchain the system will always be tied into a large database, and high transaction fee regardless of blockchain cause havoc. Which is definitely not an option. Blockchains can be used for security/proof of ownership, but should not be built into the core functionality of a mutable file system.

Currently researching/working on a solution

Definition of terms

  • XOR; binary operation that finds the difference between two pieces of data.

Summary
Choose the name because IPFS MFS already exists, it acts as an API to interact with IPFS files in a mutable way. It does not provide true file mutability. That is why I am building Truly mutable file system. TMFS is built on top of orbitdb and IPFS. Orbitdb is a database system built on top of IPFS. Orbitdb has a couple of different type of database, TMFS uses a append only (write only) log and keyvalue store for current file states and miscellaneous data. A binary XOR operation calculates the different versions of a file, similar to git. This diff is then added to the append only log. When nodes receive this change, TMFS will calculate the current static hash, headhash and diff hash (points to XOR data). This is the basis for all TMFS files.

Key individual elements

Repo: this is where mutable and static file links. Each repo has a unique ID based off of orbitdb log and keystore address. When opened, repo can be represented as an interactable JavaScript object.
TMFSObject: an individual file/object stored on TMFS. Can either be static or dynamic. Dynamic contains last transaction related, current head, current static hash, and path. Can be represented as a interactable JavaScript object. There will be an event emitter that is triggered when modifications are detected.
TMFSAction: an individual transaction designed to update a static or dynamic TMFSObject. This is posted on the append only orbitdb lot. Static simply contains the current hash. Dynamic contains past transaction, path, XOR diff IPFS hash, a static hash (this can be calculated from diff + past static content).

Info

This is a document in the works. Concepts need to be expanded on and consolidated. Source code will be released in the future once standardized API has been created and code clean up. Status is POC. Grammer must be corrected and fully understandable. (And of course not being written on a phone)

Any questions would be appreciated to clear out possible confusion.
-- vaultec

Posted using Partiko Android

Sort:  

Great work man, I love to see your theory coming closer reality. A lot of good can come out of using mutable systems, it can help so many industries/sectors.

Thank you so much for being an awesome Partiko user! We have just given you a free upvote!

The more Partiko Points you have, the more likely you will get a free upvote from us! You can earn 30 Partiko Points for each post made using Partiko, and you can make 10 Points per comment.

One easy way to earn Partiko Point fast is to look at posts under the #introduceyourself tag and welcome new Steem users by commenting under their posts using Partiko!

If you have questions, don't feel hesitant to reach out to us by sending us a Partiko Message, or leaving a comment under our post!

Congratulations @vaultec! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You received more than 2000 upvotes. Your next target is to reach 3000 upvotes.

You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Congratulations @vaultec! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 1 year!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Do not miss the last post from @steemitboard:

The new SteemFest⁴ badge is ready
Vote for @Steemitboard as a witness to get one more award and increased upvotes!

Congratulations @vaultec! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You distributed more than 8000 upvotes. Your next target is to reach 9000 upvotes.

You can view your badges on your board and compare to others on the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @hivebuzz:

HiveBuzz - Hive Gamification Experience
Vote for us as a witness to get one more badge and upvotes from us with more power!

Hi there Vaultec, hope all is safe and sound...
Please, take me off the team here on the onelovecommunity on hive. I do not want any connections to my account from the onelovecommunity anymore... Thanks in advance!