
Bitcoin technology has shown how cryptographically stored entries, a model with limited resources, open source code, and peer-to-peer networks can be used to create new types of successful applications.
Decentralized applications are more flexible, more transparent and reliable than modern software created using traditional models. This book introduces you to the basics of creating decentralized applications and the principles of their development on the example of several profitable applications. The reason for this commercial bias is that profit (profit) is the basis of a successful, reliable and promising decentralized application. Use them as a springboard to creating your own application.
The history of decentralized applications
In the early stages, the World Wide Web did not have such practical benefits as it does today, when we have innumerable applications and services for all occasions, but even then it allowed us to feel what is distribution. The World Wide Web did not initially have a single center. HTTP connects all computing devices on the planet with an Internet connection. In its work, the HTTP protocol relies on many trusted servers that convert web addresses to network addresses of servers. In addition, the HTTPS protocol adds another layer of trusted servers and certification authorities. People were able to install and activate their own servers to which others can connect and store their data on them. But soon application servers began to appear, and the now well-known centralized data ownership model was born. Why did development go this way?
The answer is simple: because this way is easier both ideologically and programmatically. It turned out to be the easiest to implement, and it worked. One person or group paid for server maintenance and made a profit from the users of their software. One of the first popular centralized applications became MySpace and Yahoo! .. More modern applications, such as Uber and Airbnb, decentralize individual business segments, providing a centralized and trusted data repository. They were one of the first to make profit in various sectors of the economy. Their decentralized business model foreshadows the emergence of even more decentralized applications.
')
At some stage in the development of the World Wide Web, a new protocol developed by Bram Cohen, called BitTorrent, appeared. This protocol was created to solve the problem of loading huge media files over HTTP and as an enhancement to some peer-to-peer (P2P) predecessors like Gnutella, Napster and Grokster. The problem was that the download of huge files took a very long time, and with the growth of the World Wide Web, the size of the files themselves increased. At the same time, the capacity of hard drives grew and the number of people connected to the Internet increased. BitTorrent solved the problem by turning downloads into distributors.
If you needed some file, you could download it not from one, but from several sources at once. The more popular the file, the more users downloaded and, accordingly, distributed it. And the more sources, the faster the load. Seeders 1 were rewarded with higher loading speeds, and leechers 2, on the contrary, were punished by speed limits. The data transmission system, organized according to the principle “you - me, I - you”, has proven its effectiveness for distributing large-sized media files, such as movies and TV recordings.
The BitTorrent protocol continues to evolve and for many is the main way to download huge files, such as games or movies. Due to the speed, stability and availability of the reward mechanism, BitTorrent is better suited for downloading large amounts of data than HTTP.
Then why the development of the World Wide Web did not go this way?Probably due to the fact that HTTP was the first, as well as due to its infrastructure and time and resources spent on its development. Currently, research is actively conducted in the direction of modernizing the World Wide Web using BitTorrent-like technology, and they will almost certainly be crowned with success, because BitTorrent has indisputable advantages. As soon as BitTorrent technology appeared, developers began to use it to create non-commercial decentralized applications. Let's take a look at some examples of recent decentralized applications.
PopcorntimePopcornTime uses the BitTorrent protocol to transfer streaming video between users in real time, acting like a NetTlix BitTorrent client. This is a real nightmare for the Motion Picture Association of America (MPAA). No regulator is able to set its own limits, and now anyone can get free access to movies. PopcornTime has proven to be a practical decentralized application, acting as a decentralized version of Netflix. The creators claim that their application is used in all countries and even in two countries where there is no Internet. PopcornTime lacks internal competition and does not require support for decentralized consensus, so there is no need to use block chains. This application simply transmits streaming video, and thus ensures its great value.
OpenbazaarThe goal of OpenBazaar was to create a decentralized version of Ebay. There are no intermediaries in the OpenBazaar application that would indicate to the sellers what they can sell and what not, or charge for services. It is based on the BitTorrent protocol, but the problem is that merchants must have their own repositories. They have to set up their own servers so that users can see the goods sold. Ideally, sellers could simply upload their information to the network, perhaps for a small fee, and get rid of unnecessary anxiety. But this requires a decentralized system of interested custodians (miners in Bitcoin terminology), which are described in more detail in Chapter 4. BitTorrent protocol is used to transfer data to OpenBazaar, and Bitcoin is used for calculations.
FireChatThe application FireChat appeared in connection with the well-known events - the democratic protests in Hong Kong in 2014. The infamous “Great Firewall” blocks access to pro-democracy websites or sites that spread information that runs counter to the interests of the Chinese government. The protesters were afraid that the government would try to close access to various social networks in order to deprive them of communication via the HTTP protocol. Therefore, they used FireChat, an application that uses the new iOS 7 feature called Multipeer Connectivity, which allows phones to communicate with each other without intermediaries. Due to the lack of a central point of failure, the government would have to manually shut down each node, which is almost impossible, so the protesters could confidently communicate with each other.
Decentralized protest at its best.
LighthouseWe will discuss the Lighthouse in detail in Chapter 5, but for now I’ll note that this is a Bitcoin wallet with a set of embedded smart contracts. Smart contracts help to invest in certain projects, as well as, for example, Kickstarter. When the project reaches its goal, it is possible to return funds from the Lighthouse wallet of the project that collects funds. The contributor may at any time withdraw his contribution without notifying the creator of the project. Lighthouse is a great example of using existing Bitcoin infrastructure to create your decentralized application. Lighthouse is just a user interface with a few built-in smart Bitcoin contracts. The application works based on Bitcoin users. It is open, relies on the support of decentralized consensus, does not have a central point of failure, but uses not its own currency, but Bitcoin. This is a very useful application, but it does not bring commercial benefits to creators.
GemsGems is a messenger application designed to create a fairer business model than WhatsApp. Gems issues its own currency and allows advertisers to pay users directly for their data, without the participation of intermediaries who receive their share. Users can also earn gems by attracting new users to the network. Gems are Bitcoin-based meta currency Gems, which developers also receive for developing and maintaining software. The range of Gems users is constantly expanding, so the value of a currency is growing. Users are interested in expanding the network and generating income, as are the developers. Gems can be viewed as an example of equity in the development of a decentralized application. Its source code is closed, so users cannot verify that there is no single point of failure. Gems is a commercially viable application, but, in my opinion, it does not have a sufficient safety margin to compete with products that meet three other criteria.
So, there are no separate decentralized applications that would satisfy all four criteria: the absence of a central point of failure, the presence of local currency, the support of decentralized consensus, and open source code?There are quite a few cryptocurrencies that meet all four criteria, but cryptocurrencies are not decentralized applications. If we talk about decentralized social networks, services for organizing joint trips, search engines, when the stack is taken and decentralized, then the answer to the question asked is no. However, this is quite possible - the necessary technologies exist, and as soon as something new appears, many developers will rush to the decentralized side in order to make serious money for themselves and their users. Let's talk about some of these supporting technologies.
»More information about the book can be found on
the publisher's website.»
Table of Contents»
ExcerptFor Habrozhiteley a discount of 25% for the coupon -
Applications