danalex97 / Speer

A network discrete event simulator for peer-to-peer network modeling.
MIT License
14 stars 3 forks source link

Configuration file #43

Closed danalex97 closed 5 years ago

danalex97 commented 5 years ago

This issue is about creating a configuration file for the main.go script. The configuration file should have the following format:

{
  "lang" : "go",  // the language of the entry point
  "entry" : "./examples/simple_torrent.go", // the file which will be used as the main class running in the simulation

  "nodes" : 700, // number of peers in the system

  // configuration of the router topology
  "transitDomains"    : 10,
  "transitDomainSize" : 50,
  "stubDomains"       : 14,
  "stubDomainSize"    : 100,

  // interval of virtual time units at which the capacity scheduler runs
  "transferInterval"  : 1500,

  // list of nodes with their upload and download capacity
  "capacityNodes" : [{
    "number"   : 1,
    "upload"   : 0,
    "download" : 0
  },{
    "number"   : 1,
    "upload"   : 10000,
    "download" : 0
  }, {
    "number"   : 350,
    "upload"   : 2000,
    "download" : 6000
  }, {
    "number"   : 349,
    "upload"   : 10000,
    "download" : 10000
  }],

  // safety and progress property configurations
  "allNodesRunInterval" : 500
}

The config file should: