Project

General

Profile

Actions

Task #1143

closed

traffic generator

Added by Junxiao Shi about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Tools
Target version:
Start date:
01/29/2014
Due date:
% Done:

100%

Estimated time:
24.00 h

Description

Develop a traffic generator as a testing tool for NFD and other compatible forwarders.

high-level requirements

We want to be able to test two properties of the new NFD code: correctness and performance. The traffic generator should be designed with this goal in mind.

  • It needs to be able to generate different kinds of traffic, e.g., different selectors in Interests, different name lengths, whether repeating Interests (to test caching), etc.
  • It needs to be able to generate different rates of traffic, and different traffic patterns. E.g., see how fast NFD can forward.
  • It needs to be able to compute NFD's correctness and performance numbers based on its requests and received answers.

Subtasks should be added to this task when requirements and design are more clear.

Actions #1

Updated by Alex Afanasyev about 10 years ago

  • Target version set to v0.1
Actions #2

Updated by Jerald Paul Abraham about 10 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

Present Development Direction:

  • There will be two tools:
    • ndn-traffic-client - This will generate interest messages (as per configuration)
    • ndn-traffic-server - This will consume interest messages and generate content objects (as per configuration)

ndn-traffic-client

  • The current command line parameters
    • c (optional, default=1 message) = number of interest messages to be sent
    • i (optional, default=1 ms) = interval between interest messages
    • prefix = prefix for which interests are to be generated

ndn-traffic-server

  • The current command line parameters
    • d (optional, default="no data") = the data message to be contained in the object
    • i (optional, default=0 ms) = delay before responding with content
    • prefix = prefix to be registered for interest reception

These are very basic level requirements and I am looking forward to more detail comments from all.
Please provide your inputs for updating the requirements.

Actions #3

Updated by Junxiao Shi about 10 years ago

client should allow configuration of name structure, selectors, guiders.

An example configuration looks like:

% Name Selectors Guiders
10% /example/<random 4 octets> MinSuffixComponents=2
30% /example/A (exact name) MustBeFresh=1 Nonce=
45% /example (exact name) Exclude=<Any><random 4 octets>
5% /example/B/<sequential decimal> Scope=2

It translates to pseudo code like:

var rand = new Random();
var l2recentNonces = new FifoQueue({ capacity:200 });
var l4decimal = 0;

function createInterest() {
  var prob = rand.nextDouble(0, 1);
  if (prob < 0.10) {
    var name = new Name('/example');
    name.append(rand.nextBytes(4));
    var selectors = {
      MinSuffixComponents: 2
    };
    return new Interest(name, selectors);
  } else if (prob < 0.40) {
    var name = new Name('/example/A');
    var selectors = {
      MustBeFresh: 1
    };
    var guiders = {
      Nonce: rand.nextInt(0, Integer.MaxValue)
    };
    var probDuplicateNonce = rand.nextDouble(0, 1);
    if (probDuplicateNonce < 0.10) {
      guiders.Nonce = l2recentNonces[rand.nextInt(0, l2recentNonces.length)];
    }
    l2recentNonces.push(guiders.Nonce);
    return new Interest(name, selectors, guiders);
  } else if (prob < 0.95) {
    var name = new Name('/example');
    var selectors = {
      Exclude: new Exclude()
    };
    var excludeBoundary = rand.nextBytes(4);
    selectors.Exclude.excludeBefore(excludeBoundary);
    return new Interest(name, selectors);
  } else {
    var name = new Name('/example/B');
    name.append((++l4decimal).toString());
    var guiders = {
      Scope: 2
    };
    return new Interest(name, guiders);
  }
}
Actions #4

Updated by Junxiao Shi about 10 years ago

  • Category set to Tools
Actions #5

Updated by Jerald Paul Abraham about 10 years ago

Detailed probability based traffic generation will require a test feed file which describes the interest generation and content response patterns. Therefore providing all options via command line would not be feasible.

The user will therefore need to specify traffic generation pattern such as shown in the example above in the for of a test feed file. The test feed file will include sections corresponding to interest/content configuration with a generation probability.

A sample instance of this section is for an interest configuration would be:

    GenerationProbabilityPercentage=10
    NameExact=/text/example
    NameAppendBytes=4
    MinSuffixComponents=2

The user will there need to know how to create a test feed file. Sample test feed file will be provided and README will detail available options.

Actions #6

Updated by Junxiao Shi about 10 years ago

The (commercial) product I used doesn't use a test feed file. It has GUI to input the parameters.
If we are doing this, the GUI could be a web page served from Node.js. This Node.js app can call a C++ program that executes the actual testing.

Actions #7

Updated by Jerald Paul Abraham about 10 years ago

Yes I agree. A Web interface would be a better alternative to the configuration file. I will design a CPP interface which can be used to add multiple of such instances and then a callable run method which would initiate the test.

However I doubt when most test environment nodes would ideally be virtual machines with only terminal interfaces, a configuration file would be more feasible. If the utility of the web interface is just to provide a GUI, wouldn't conversion of web data to feed files be an better way of test scenario distribution?

Actions #8

Updated by Junxiao Shi about 10 years ago

Tesgine2000 actually have two components:

  • a hardware box that has an Ethernet port on the back panel, and a 10G fiber port on the front panel
  • a Windows native application that provides GUI for configuration, running on a PC connected to Ethernet

A session executes as follows:

  1. User enters configuration on the Windows app.
  2. Upon start, the Windows app uploads the configuration through Ethernet onto the hardware box
  3. The hardware box sends packets out of the fiber port, and/or analyzes packets received on the fiber port
  4. If analysis is enabled, the analysis results are transferred in realtime onto the PC and displayed by the Windows app

There must be some protocol or "test feed" between the Windows app and the hardware box, but I don't know what is used.

Actions #9

Updated by Jerald Paul Abraham about 10 years ago

  • % Done changed from 10 to 70

Tool Development Status

Client Tool = 70%
Server Tool = 50%

Remote Repository

https://github.com/jeraldabraham/ndn-traffic
Actions #10

Updated by Jerald Paul Abraham about 10 years ago

  • % Done changed from 70 to 90

Tool Development Status:

Client Tool = 100%
Server Tool = 80%
Actions #11

Updated by Jerald Paul Abraham about 10 years ago

Tool Development Status:

Client Tool = 100%
Server Tool = 100%

The tools are ready for use and sample configuration files are provided.
However, the README file is yet to be updated.

Actions #12

Updated by Jerald Paul Abraham about 10 years ago

  • Status changed from In Progress to Code review
  • % Done changed from 90 to 100
  1. Development Complete - 100%
  2. README File Updated
  3. Sample Configuration Files Provided
  4. Code Repository URL:
    https://github.com/jeraldabraham/ndn-traffic
Actions #13

Updated by Junxiao Shi about 10 years ago

  • Status changed from Code review to Closed

Already merged at Ifb33e7d8474a840b21c9e73636552955931f39f8.

Actions

Also available in: Atom PDF