Benefits Of Decentralized Cloud Storage

--

We all know cloud storage applications like Google Drive or Dropbox and use them frequently whether it be for personal or business purposes. I’m going to introduce a different type of cloud file storage/sharing that specifically works with blockchain technology and is decentralized in this post. I’m going to explain it alongside a programming project that I completed alongside a tutorial from the Youtube channel Dapp University (For great blockchain programming resources, visit more of Gregory’s videos there).

The decentralized app, or dapp, that I’ve created with this project is a decentralized Dropbox clone in essence. Considering taking this to another level, building upon this base of a project, and using this storage system as a possible internal file storage and sharing platform for my web development company.

Photo by Adam Birkett on Unsplash

Concept — Why?

First of all → More Secure. Anything with the word blockchain in it probably immediately makes you think “more secure”. This ideology has merit as any block appended to the blockchain is encrypted with a transaction hash value. In this case, each file that we would be uploading to our decentralized storage app would be encrypted with its own private key and only with that private key are you able to access the true stored data there. No centralized system, authority, or company can access that data UNLESS they have access to that key to locate that specific data. We can LITERALLY 100% trust math here, which is the beauty of blockchain. An engineering team can be quite a black box when it comes to transparency of algorithms and/or motives.

Further on the security advantage and encryption of this dApp is the truth that when files are stored upon a decentralized network, the file itself is broken up into multiple parts through encryption and spread across nodes that run that blockchain all over the world.

Your files will not be lost in any type of hardware/network failure as well as the blockchain ledger is copies on each node of its network for transparency and data redundancy. So your files are backed up pretty well. This is along with the fact that storage on the blockchain reduces the overall price of cloud computing by over 50%, which is something I learned from the BlockApps article that I reference below.

Trending AI Articles:

1. Why Corporate AI projects fail?

2. How AI Will Power the Next Wave of Healthcare Innovation?

3. Machine Learning by Using Regression Model

4. Top Data Science Platforms in 2021 Other than Kaggle

Decentralized storage apps could secure your cloud files at a much lower cost as well as with heightened security than centralized cloud based storage. Decentralized storage could also pair well with encrypted or decentralized messaging platforms.

Technical Explanations — How?

I’ll briefly explain the process of creating the decentralized storage dApp as it is a fairly simple idea and a straightforward program to code on your own through the use of Ethereum smart contracts (Think of a smart contract as just a program, or set of instructions that executes when it receives a transaction on the blockchain).

  1. React App & Node.js

We set the project up by creating a React app to provide the infrastructure of a Single Page Application and front-end that is interconnected with Node.js in order to give a solid ecosystem to eventually create an actual user interface and website for users to upload their own files. With Node.js, we are able to connect up any backend, third-party API’s, smart contracts, etc. to our front-end application. Super powerful!

2. Metamask Wallet & Web Browser, Ganache

In order to turn any browser into a blockchain browser, we installed Metamask as a Google Chrome extension in order to access both the Ethereum main net, and our own test nets that we’ll be using with Ganache, which is a downloadable local blockchain on your own machine that you can connect to for development purposes.

3. Solidity for Smart Contracts & Web3

We build the smart contract that handles the uploading, capturing, and storing files on the blockchain with a language called Solidity. Solidity is a child programming language of Javascript, and allows classes, functions, variables, and most other components of most programming languages. Our smart contract is connected to the Ethereum network through a connection we make in our main App.js file to an API called web3.js

The smart contract we use basically retrieves the file and the file description from the data the user inputs on the React front-end, maps the data as a structure accordingly into our array of files that are stored. Information that is passed through the structure includes:

  1. ID
  2. Unique Hash
  3. Size of File
  4. Type of File
  5. Name
  6. Description
  7. Upload Time
  8. The uploading hash address

All that information is stored on a decentralized public file system called IPFS (Interplanetary File System). Let’s talk more about that.

4. IPFS & Infura.io API

(This is a really powerful and efficient way store files of the future and super interesting so please read more on the IPFS website, see references below)

IPFS is a peer-to-peer public decentralized file storage system. IPFS disperses data breaks data into multiple pieces, not duplicating it, among many peers on its distributed network. This is a massive saver when it comes to dealing with high volume of data.

For our purposes, we add data to the IPFS and it can be retrieved with that data’s unique hash when it is stored to the blockchain through our smart contract. We connected our app to the IPFS through an API that is super friendly for development purposes called Infura.io. We just use our hash with the infura.io API and then we can retrieve our stored file.

Conclusion

Blockchain is quite a buzz word right now, but once we really understand it and how it can make many applications we know and work with regularly more effective and efficient, we’ll realize its true power.

All in all, a decentralized cloud storage app is more secure, faster, more efficient for file storage through apps like IPFS, and less costly to use than traditional decentralized file storage.

Massive credit here to Gregory at Dapp University and the content that that channel is putting out. This is a massive resource for blockchain developers and people working to get a knowledge of this space, even if they have no technical background. Go see more of Dapp University’s videos.

See the project on my github — https://github.com/mitthoma/blac_box

References-

  1. Dapp University Video — https://www.youtube.com/watch?v=1KwaUyjLa4Q&ab_channel=DappUniversity
  2. https://blockapps.net/blockchain-disrupt-data-storage/
  3. https://ipfs.io/
  4. https://infura.io/

Don’t forget to give us your 👏 !

--

--