Git Product home page Git Product logo

binomial-graph-simulation's Introduction

Binomial Graph Network Simulator

#On bash script // Showing the operator which server is running SETEX READY_ 2 ""

// BOOTING MUST BE SETEX

while(GET BOOTING == null) { sleep 1 SETEX READY_ 2 "" }

INCRBY NUM_TOTAL_NODES <MY_NUM_NODES YOU WILL SPAWN>

// WAITING THE BOOT TO START WILL HELP TO MAINTAIN FIXED NUMBER OF NODES

while(GET BOOT != null) { sleep 1 }

Start <MY_NUM_NODES> servers with different port for each WAIT until java exits FLUSHALL LOOP

#On each server start your listener with the port given RPUSH LISTENERS IP:PORT

totalNodes = GET NUM_TOTAL_NODES while(LLEN LISTENERS < totalNodes) { sleep 1 }

Nodes = LRANGE LISTENERS 0 -1 build graph for self Get all routes from self to nodes Set routes into listeners INCR NUM_READY_NODES while (GET NUM_READY_NODES < totlaNodes) { sleep 1 } // HERE ALL servers are running and all the routes are calculated start sending till timeout, or num messages achieved

LREM LISTENERS IP:PORT 1 while(LLEN LISTENERS > 0) { sleep 1 }

// HERE ALL THE SERVERS HAVE STOPPED

Stop Listener Start bash if not started! using booting.lock to check kill self

binomial-graph-simulation's People

Contributors

shweelan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.