Skip to content

Commit

Permalink
Add network topology diagrams
Browse files Browse the repository at this point in the history
Add network topology diagrams, including graphviz source and a script to
regenerate them.  Integrate into testnet markdown documentation.
  • Loading branch information
jgiszczak committed Sep 5, 2017
1 parent 24a21e6 commit df8e619
Show file tree
Hide file tree
Showing 8 changed files with 106 additions and 2 deletions.
68 changes: 68 additions & 0 deletions mesh.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
digraph G
{
inita->initb [dir="both"]
inita->initc [dir="both"]
inita->initd [dir="both"]
inita->inite [dir="both"]
inita->initf [dir="both"]
inita->initg [dir="both"]
inita->inith [dir="both"]
inita->initi [dir="both"]
inita->initj [dir="both"]
inita->initk [dir="both"]

initb->initc [dir="both"]
initb->initd [dir="both"]
initb->inite [dir="both"]
initb->initf [dir="both"]
initb->initg [dir="both"]
initb->inith [dir="both"]
initb->initi [dir="both"]
initb->initj [dir="both"]
initb->initk [dir="both"]

initc->initd [dir="both"]
initc->inite [dir="both"]
initc->initf [dir="both"]
initc->initg [dir="both"]
initc->inith [dir="both"]
initc->initi [dir="both"]
initc->initj [dir="both"]
initc->initk [dir="both"]

initd->inite [dir="both"]
initd->initf [dir="both"]
initd->initg [dir="both"]
initd->inith [dir="both"]
initd->initi [dir="both"]
initd->initj [dir="both"]
initd->initk [dir="both"]

inite->initf [dir="both"]
inite->initg [dir="both"]
inite->inith [dir="both"]
inite->initi [dir="both"]
inite->initj [dir="both"]
inite->initk [dir="both"]

initf->initg [dir="both"]
initf->inith [dir="both"]
initf->initi [dir="both"]
initf->initj [dir="both"]
initf->initk [dir="both"]

initg->inith [dir="both"]
initg->initi [dir="both"]
initg->initj [dir="both"]
initg->initk [dir="both"]

inith->initi [dir="both"]
inith->initj [dir="both"]
inith->initk [dir="both"]

initi->initj [dir="both"]
initi->initk [dir="both"]

initj->initk [dir="both"]
}

Binary file added mesh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions ring.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
digraph G
{
inita->initb [dir="both"]
initb->initc [dir="both"]
initc->initd [dir="both"]
initd->inite [dir="both"]
inite->initf [dir="both"]
initf->initg [dir="both"]
initg->inith [dir="both"]
inith->initi [dir="both"]
initi->initj [dir="both"]
initj->initk [dir="both"]
initk->inita [dir="both"]
}
Binary file added ring.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions star.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
digraph G
{
initg->initb [dir="both"]
initg->initc [dir="both"]
initg->initd [dir="both"]
initg->inite [dir="both"]
initg->initf [dir="both"]
initg->inita [dir="both"]
initg->inith [dir="both"]
initg->initi [dir="both"]
initg->initj [dir="both"]
initg->initk [dir="both"]
}

Binary file added star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions testnet-diagrams.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

circo ring.dot -Tpng -oring.png
circo star.dot -Tpng -ostar.png
fdp mesh.dot -Tpng -omesh.png
7 changes: 5 additions & 2 deletions testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,15 @@ Network topology or "shape" describes how the nodes are connected in order to sh
The Launcher has definitions of three different network "shapes" based on inter-nodal connections, which can be selected by a command line option, or you can supply your own network topology by editing the Launcher generated configuration file.

#### Ring network
![](ring.png "Ring Diagram")
This is the simplest network, where each node identifies just the node next to it as it's only peer.

#### Star network
![](star.png "Star Diagram")
A "star" is intended to support the use larger number nodes in the testnet. In this case the number of peers connected to a node and the distribution of those nodes varies based on the number of nodes in the network.

#### Mesh network
![](mesh.png "Mesh Diagram")
In a "mesh" network, each node is connected to as many peer nodes as possible.

# The Launcher Application
Expand Down Expand Up @@ -172,7 +175,7 @@ keys | specify the authentication tokens for this node.
peers | this list indicates the other nodes in the network to which this one actively connects. Since this file may be edited to alter the hostname, public name, or p2p port values, the peers list here holds aliases for the actual endpoints eventually written to the individual config.ini files.
producers | this list identifies which of the producers from the genesis.json file are held by this node. Note that the launcher uses a round-robin algorithm to spread the producer instances across the producing nodes.

###Provisioning Distributed Servers
### Provisioning Distributed Servers
The ssh_helper section of the testnet.json file contains the ssh elements necessary to connect and issue commands to other servers. In addition to the ssh_helper section which provides access to global configuration settings, the per-node configuration may provide overriding identity and connection arguments.

It is also necessary to provision the server by at least copying the eosd executable, and the genesis.json files to their appropriate locations relative to some named EOS root directory. For example, I defined the EOS root to be `/home/phil/blockchain/eos`. When run, the launcher will run through a variety of shell commands using ssh and finally using scp to copy a config.ini file to the appropriate data directory on the remote.
Expand All @@ -191,7 +194,7 @@ The launcher app creates a separate date and configuration directory for each no

A file called "last_run.json" contains hints for a later instance of the launcher to be able to kill local and remote nodes when run with -k.

#What Remains To Be Done
# What Remains To Be Done

Functionality that remains to be implemented: caching signed transactions then purging them on a schedule. Sending summaries of blocks rather than whole blocks. Optimizing the routing between nodes. Failover during new node synchronization if a peer fails to respond timely enough

Expand Down

0 comments on commit df8e619

Please sign in to comment.