Client, Server, Peer, what do these words have to do with Crypto?
Why does a peer-to-peer network make sense for Crypto?
Honestly, I have always disliked physical money! For as long as I can remember handling cash has stressed me out. So many things can go wrong. I could lose it, I could damage it, I may not have the right amount, where do I keep all the loose change, etc. Have these concerns troubled you as well? If so, like me, you are probably an early adopter of non-cash payment systems. You probably like your debit and credit card; maybe you love google play, phone pay, and other apps that help you transfer money quickly. You are probably so dependent on your banking service provider that it would take a lot to convince you to shift from its convenience. I, for one, am more than willing to pay the convenience charges levied by all the third parties that are involved. But I wonder how many people realize how much money it takes to power this vast, complex web and how much money is made to manage it.
In the US and across many parts of the world in 2008, the very institutions entrusted with safeguarding and protecting people's financial interests got greedy, took risky bets, and lost a lot of wealth. They had to be bailed out and even got the nickname, "too big to fail". So when Satoshi Nakamoto published his White Paper on Bitcoin on an obscure website, a small but highly motivated group of hackers got very excited. For the very first time, there was a viable solution to the "double-spending problem" while at the same time eliminating the need for trusted third parties in peer-to-peer transactions. The paper's abstract talks about a peer-to-peer version of electronic cash (see below).Â
A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution....... We propose a solution to the double-spending problem using a peer-to-peer network.....Â
Peer-to-peer is such a critical aspect of this paper that I think we should dig deeper. It may sound a bit jargony and boring, but if we can wrap our heads around this concept, it'll make the web 3.0 world easier to understand.Â
There are two common types of computer networks:
client-serverÂ
peer-to-peer
Tasks are partitioned between the server and the clients in a client-server model, communicating over a computer network. Examples of this include Mail Servers, Database services, Accounting Servers (like Tally), etc. The program runs on a server, which shares it with client computers. It is the client computer that initiates the communication with the server.Â
Servers generally await incoming requests and respond based on them. Most organizations used to have servers on-site (in their office/warehouse). With the introduction of cloud computing, most server space and processing are managed by companies like Amazon, Google, Microsoft, IBM, HP, etc. Essentially, most of the worldwide web works on the client-server model. Imagine that your local vegetable store is the client and the vegetable wholesaler is the server. The wholesaler supports hundreds of stores by maintaining the correct inventory and delivering the stock in time. If the wholesaler has a problem, it will eventually affect the local store. Similarly, suppose your mail server or accounts server fails. The client computer may still function, but it won't be able to access your email or your accounts database.
Peer-to-peer networks are different because tasks or workloads are partitioned between all the computers in the network. All the peers have the same privileges and have equal participation rights in the application. A typical example of a peer-to-peer network can be found in dorm rooms and hostels where internet access is denied. Inmates link together their computers and play multiplayer games where each system runs the application separately but shares the bandwidth with all other systems. Essentially, the peer computers make some portion of their resources available to the network. This could be processing power, disk storage or network bandwidth. The most famous or infamous example of a peer-to-peer service is "Napster". Napster, founded by Shawn Fanning and Sean Parker in 1999, changed the way music was distributed by introducing a peer-to-peer network for sharing audio files. Napster was the application that ran on your computer. Music was stored on users' computers and shared between users through this application. Napster did not control the sharing of audio files. Still, it kept a database of all users and shared audio files on a central server to make it easy to find them. Another top-rated peer-to-peer service is BitTorrent.Â
A client-server model is heavily dependent on the server being online and working at all times. There is no central authority or third party in a peer-to-peer model that controls the network. It can function even if some peers stop working. Of course, Napster was eventually shut down because they were doing something illegal (enabling the transfer of pirated music). The application was not usable without the central server responsible for indexing users and files. But this did not affect the users who had already used the service to share/download pirated music. This is what makes a peer-to-peer network so powerful.Â
One of the central pillars of Bitcoin and subsequently web 3 is decentralization. Peer-to-peer networks are essentially decentralized and hence proposed by Satoshi for the creation of electronic cash. Now you know the why; next, we will learn the how.Â
I hope you enjoyed learning about peer-to-peer networks as much as I did. Next week, I hope to explore a small part of how the bitcoin paper proposed to secure this network. Don't forget to like this article and share it with friends and family until then.