Skip to content

Instantly share code, notes, and snippets.

@ZacBlanco
Last active December 2, 2016 05:12
Show Gist options
  • Save ZacBlanco/59719c4e41df20ea214763013134bf53 to your computer and use it in GitHub Desktop.
Save ZacBlanco/59719c4e41df20ea214763013134bf53 to your computer and use it in GitHub Desktop.
Run Distributed Consensus

How to Run Consensus

  1. Open multiple ssh sessions to all nodes which are communicating together

    ssh [email protected]
    ssh [email protected]
    ssh [email protected]
    ssh [email protected]
    ssh [email protected]
    
  2. cd into documents folder

     cd ~/Documents
    
  3. Run python3 cloud-ksvd/cloud_ksvd/node_runner.py. This will start an http server listening for incoming requests to perform consensus.

  4. Open another terminal which has access to at least one of the computers and open an interactive python3 terminal. We start consensus by using an http request to any one of the nodes which are running the consensus server.

     $ python3
     >>> import requests
     >>> requests.get('http://192.168.1.180:9090/start/consensus?tc=50')
    

Note the ?tc=50 parameter to denote the number of iterations to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment