Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

Latest commit

 

History

History
33 lines (23 loc) · 1.47 KB

node_examples.md

File metadata and controls

33 lines (23 loc) · 1.47 KB

Simple mesh algorithm examples

A small collection of algorithms that runs on graphs and can aid to find new routing schemes. The examples can be run by replacing node.js with the content of the linked files below:

Basic Consensus

These examples show how simple algorithms can reach a consensus.

  • Max number consensus
    • Every node chooses a random number that is displayed
    • All nodes try to find this highest number and display it
  • Distance enumeration
    • The nodes choose one node by random and display its shortest hop distance to that node
    • The network converges in a finite number of steps

Game Of Life

A Game Of Life implementation similar to the well known Conways Game Of Life. But a predictable and complex behavior is hard to maintain on mesh networks.

Every node is in a state called dead or alive, signified by the colors red and green.

Distance Vector

An example of a distance vector based routing protocol.

  • Distance Vector
    • A full routing protocol
    • Every node floods the entire network in intervals with hello packets
    • Every node maintains a table of all known nodes and from whch neighbor it heard about it
      • This makes it possible to always use the best routes
    • Adapts to network changes
    • Scales with quadratic traffic effort