This project sets out to help people understand discovery- and publishing algorithms in peer-to-peer networks, by creating an interactive visualization of how nodes in these networks communicate with each other.
You can start by centering the visualization (top right button), and then pressing play (bottom left corner).
The simulation is controlled by settings that you can see if you press the top left button. The default settings are pretty reasonable and should allow a well functioning algorithm to run properly. You can tweak these settings yourself, in order to challenge the algorithm in different ways.
Though the simulation might seem random, if settings are kept the same, they yield the same results every time the simulation is run again.
Threads available:
Ordered simulation status:
Actual simulation status:
Timeline event buffer:
Total buffered events:
The visualization consists of two parts:
The upper part is a simulation of a network, where nodes (computers) of the network are represented by circles, and the connections represented by lines between the nodes. The smaller circles that are seen moving along the connections represent packets, which is what the nodes use to communicate with eachother.
The lower part displays the state of the simulated blockchain. Each block gaining opacity as the trust in it is increased.
The blockchain is sometimes seen splitting into multiple branches. This happens when nodes are unable to agree on a unified blockchain. In other words, the algorithm is failing. One or two branches are fine and can often be repaired by the algorithm, but anyhing more than that is catastrophic and renders the blockchain unusable.
The default settings of the simulation are set to simulate a smaller network, both to allow for a better overview of the events taking place, and for the sake of your poor computer.
Network: A network is a collection of machines (computers) that are able to communicate with each other: i.e. send and recieve messages.
Node: A node is another term for a computer within a network: It can take on the role of being either a server, providing other nodes of a network with specific services or information, or a client, utilizing the services provided by servers of the network.
Traditional networks: In a traditional network, all services and information is hosted by a few select servers, providing services and information to the rest of the networks user-base on-demand
Peer-to-peer networks: The way in which a peer-to-peer network differs from a traditional network is, that all nodes within a network now act as both servers of services and information, as well as clients utilizing services and information from other peers. All peers in a peer-to-peer network are on the same level hierarchically.
As it would be impractical and redundant to store all the information with every single node due to memory-restrictions, each node will usually only store partial amounts of what information is available to the entire network. This does not apply to blockchains, where every node stores the same information is stored on all nodes. In peer-to-peer networks, all services and all information is spread out across all nodes.
Packet: A packet contains some data, and is what the nodes use to communicate with eachother.
Blockchain: A blockchain is a relativley new technology, utilizing the ideas behind peer-to-peer networks. All peers in this kind of network keeps a copy of a some public ledger. This ledger usually tracks some asset. In cryptocurrencies, this asset is the amount of cryptovaluta people in the network has to their name. The name comes from the way it could be thought of as a chain of blocks. Each new block containing an updated version of the ledger from the previous block.
Algorithms: An algorithm is a set of defined instructions made to solve a specific problem. In peer-to-peer networks, this problem would be joining the network as a new node, and maintaining good connections to the rest of the network.
In the simulation, there are four different connection algorithms, protocols, that the simulation can be made to follow as the network is simulated.
Balanced: This algorithm uses sensible defaults for all aspects of operation. It works in most conditions and does not have any obvious defects that can be exploited.
Bloated: This algorithm uses more resources than it needs to. It connects to too many peers and sends too much data. It technically works, but it wastes massive amounts of resources, and is in larger networks close to impossible to run.
Naive: This algorithm does not consider that there can be multiple branches of the blockchain. The lack of mechanism to weed out temporary branches means that the blockchain quickly becomes fragmented with mulitple seperate branches that are actively being used. This is problematic, as a user can run the same action multiple times on each seperate branch. If this blockchain was a cryptocurrency, it would allow all users of it to use all of their money multiple times.
Sparse: This algorithm does not adequately connect to peers of a network. That means that any network structure that is slightly challenging can result in small pockets of nodes, that are not connected to the rest of the network.
For the purpose of learning about and understanding what a blockchain is, it might be relevant to first ask ourselves why we need to know about this technology. While many people's inclination will be to associate blockchain technology with cryptocurrencies and specifically with Bitcoin it is important to understand that this technology and its applications extend much further. It is a form of public asset-management system which can find usage in a wide range of research fields and industries. To name some, these include finance, healthcare, real estate, media, government, travel and retail. It is easy to see that this technology does not simply belong in the field of computer science, but that it is relevant to future modern society on a broad scope. Note that the term 'future' is used here, as this technology is still relatively new and unexplored within several fields and industries. However, it remains the expectation that blochchain technology will at some point be fully implemented and deployed in a cross-section of industry sectors imperative to the functioning of modern society.
Different fields will have different needs, and while the software developers might be the ones implementing the blockchain into these fields, a collaborate effort across roles from within a company will remain vital. This is to ensure that the company’s specific needs are met. A common basis of technical terms will prove invaluable for the facilitation of ideas across roles to be communicated. As a result of this, students of business, math, finance among others may benefit hugely from at least a basic understanding of blochchain technology, as to best leverage the possibilities of this exciting new technology geared towards their specific field of study.