Blockchain Foundations Part 2: Peer-to-Peer Architecture and Hybrid Computer System Architecture

in #blockchain5 years ago (edited)

This article is about peer-to-peer architecture and hyprid computer system architecture.

The article is part of a series starting with this article: Blockchain Foundations Part 1: Distributed, Decentralized and Centralized Computer Architecture

The articles are drawn from my book "Blockchain and Crypto Currencies Easy to Understand for Everyone, Thomas Bauer". Please refer to the part 1 article for a introduction to the blockchain foundations series.

Blockchain is a Peer-to-Peer Architecture

Bitcoin is a peer-to-peer application. Each participant of the network with his or her computer or mobile is a peer. Each peer can do all the tasks necessary to run the application: User Interface, application logic, storage of data.

Each peer is equal in a transaction, it may be the server or the client. As server, the peer provides services to other peers. As client, the peer uses services provided by other peers. From the point of view of the end user all together appears to be one single system.

For using a service provided by another peer no intermediary is needed.

In a "pure" blockchain each peer is hosting the same software and the complete database on its computer. Or to say it in "blockchain": On each peer are the same smart contracts, the same ledger and the same state. The explanation of these terms you will find, if you continue reading this article series.

Such a peer-to-peer computer system is a decentralized distributed computer system. Programs and data are not hold on central system but in fact each peer holds all the programs and all the data.

Practically certain users of a blockchain application take over the role of hosting all the programs and data. In Bitcoin, they are called full nodes. Another alternative are service providers hosting the data. All other participants of the community access those full nodes or the service provider and do not need to keep all programs and data on their own computer. But, at the end for each community member it should be possible to load all programs and data on its computer. And there must be enough peers who do so. Only with a high number of peers holding all programs and data a decentralized distributed computer system provides a high resilience and fraud-resistance and a high protection against data loss.

In the subsequent figure we see a pure peer-to-peer system on the left side. On the right side we see a architecture with a service provider hosting a peer on its computer system to be used by users who do not want to hold a full peer on their computer or mobile. The figure shows a lot of connections. In one transaction, usually only two or a few peers take part. But in a blockchain huge traffic takes place through mining and validating transactions and through distributing new mined and validated blocks to every peer. We will learn more about this later in this article series.


Figure 4: Pure peer-to-peer computer system and a variation with a peer service provider (schematically)

Again, it is important what point of view we have. If we drill down into a peer-to-peer-computer system layer by layer we won't find a pure peer-to-peer system on each layer. The telecommunication service provider for example is an intermediary necessary to run our peer-to-peer system. But in the point of view of the blockchain user we see a peer-to-peer application. Each user of the Bitcoin blockchain for example can exchange Bitcoins with each other person on the world without an intermediary in the middle. And everyone is free to do mining or validating jobs within the Bitcoin network. Of course, it is not as simple as that. For example for Bitcoin mining you must provide suitable hardware. You cannot do it from your mobile.

Hybrid Computer System Architectures

Nearly every computer system is a mix of centralized and decentralized distributed architecture. And we always should consider the point of view we are looking from at the architecture.

Look at a pure centralized computer center of a trading platform that is distributed over three locations. Technically this is a decentralized distributed computer system. But from the point of view of a user of the platform it is a pure centralized structure, because all the programs und data are stored at the trading platform's computer system.

The well-known client server computer system is a centralized distributed computer system. All shared data and programs are located on a central server. The clients may hold additional data and programs. And they may have copies of data and programs lying on the central server. But the central server is always right. A client always must take over the date and programs from the server and not the other way around.

Sort:  
Loading...