Skip to main content

Decentralized Applications

DApp: Decentralized Application

In the previous post, I discussed why people should move to decentralized applications. In this post, it would be better to understand what a decentralized application is and what is the backbone of all major DApps in the market.
To understand a decentralized application, you will have to understand the decentralized network. In a decentralized network, there is no single entity governing the operations of the network. All machines/nodes participating in the network are equally responsible for the state and security of the network.
In the above diagram, as you can see, nodes A, B and C are the ones keeping the network running. Those nodes are running the application and no single node can modify the behavior of the application for the connected clients. This means that even when node A stops working and its connected clients connect to node B or node C, they don't notice a difference. When we talk about decentralized network, then we implicitly mean that the control is distributed among the network nodes. This means that a decentralized network with 2 or more nodes is also a distributed network.
Now lets see how an application can run on such a network. For this to understand, we can take any example of a centralized distributed application. Lets stick to our previous example of a file storage application. Storj is a real world example of decentralized file storage application. 
 
In a file storage application, there are some basic requirements
  • Uploading and downloading of a file should be feasible
  • In case of a failure, file should be recoverable.

To build these requirements on a decentralized network, the files will be stored on nodes of the network where some nodes will be the primary server of the file, some will be back server of the file. Now lets see how decentralized network will solve the problems we discussed in the previous post

Data Privacy Problem

A file which is stored on a decentralized network can be broken into multiple parts and each part is encrypted with the file owner's key before its sent to the network. This provides privacy to the user's data and no one apart from the owner can view the contents of the file because only owner has the key. There is no organization, no central authority which can access the file's data.

Closed Source Problem

Because a decentralized application is run over unidentifiable computer nodes which are not controlled by a single organization, the source code of the application is made globally available so that anyone can verify the application and run it on their computer. This solves the closed source problem which no central organization can do. Anyone with access to the source code can validate whether the application has some loopholes which can lead to a data leak.

Data Encryption Problem

A decentralized application solves the encryption problem while solving the privacy problem.

When I wanted to write this article, I looked around for some real world example and I found Storj. Its a decentralized file storage application which solves all of the above problems. Now storj is not a free service but it definitely is a cheap service. Let me help you understand why storj is not a free service. As a decentralized application can be run over computer nodes of people like you and me, it needs to compensate the computer owners for lending their computer. It does so by collecting a small fee from the file owner. I also read Storj Whitepaper which describes the internal working of this application and I learnt something interesting: Erasure Codes. This is the new way to store a file keeping the replication factor to a minimum and file availability to a maximum. I might cover it in some other post

There is also a Polkadot buildathon happening in May 2021 and I have registered for it. During this event, I will be learning a whole lot about Polkadot network and will also be building my own blockchain solution. So look out for upcoming posts.

Comments

Popular posts from this blog

Why applications are moving to decentralized network ?

Fig 1. Decentralized Network Recently, I started studying blockchain in order to get certified from blockchain-council. I am in the middle of my training and have started looking into some real-world applications of blockchain. Some problems the applications are trying to solve are decentralized storage, decentralized voting/consensus, decentralized money and many more. The ultimate goal is to take whatever we have built so far and put it over a decentralized network. To achieve this developers are building  custom applications on top of bitcoin blockchain. When I thought about this goal, I couldn't help but think that is this not a waste of time. We spent last 30 years to build the centralized applications and now people are building something from the scratch to put the centralized applications over a decentralized network. Are people doing it just for fun or just because they can so they are. I will share what have I learnt from my 20 days of training, blogs, articles and whit...

Kafka consumers

  Today i watched one video on kafka consumers presented by Igor Buzatoic at kafka summit. He demonstrated the working of kafka consumers, group re-balancing and multi-threading environment. The complete video should become available on youtube soon. So the presentation was divided basically in 2 sections - Single threaded mechanism - Multi threaded mechanism Single Thread The idea here is that a single thread is responsible to poll the records from kafka and do the processing of those records. Now here the offset commit step can either be executed manually after the processing is done or periodically if we are sure than our delay in processing is less than commit interval. Usually people go with manual commit only as this ensures that we are committing what we have already processed. Now this is simple architecture and doesn't require any synchronization. Multi Thread In multi threaded environment, there are 2 possibilities - Single thread responsible for polling the records, proc...