Giter Club home page Giter Club logo

nsime's Introduction

NSIME (Network Simulator in Erlang)

NSIME is a network simulator written in the Erlang language. It is licensed under the GNU GPL v3. The motivation for developing NSIME is to accelerate network simulation on multicore processors using the Erlang concurrency model. NSIME is modeled after the ns-3 simulator with respect to the simulation entities and their interrelationships.

Installation

To use NSIME, do the following

  • Install Erlang
  • Install rebar and add its location to the PATH variable
  • Clone the NSIME repository and run make
  • Run the tests using make tests

Features

The current implementation of NSIME contains the subset of the ns-3 implementation required to run the UDP echo client/server interaction scenario (the first example in the official ns-3 tutorial).

Code Organization

The NSIME repository consists of five directories.

  • src: Contains the source code of all the NSIME modules.
  • include: Contains files defining records and types which are used in NSIME.
  • test: Contains the unit tests for the modules in NSIME.
  • ebin: Contains the object files which are generated during the compilation of NSIME.
  • examples: Contains network simulation examples using Erlang. This directory has its own src and ebin subdirectories to keep the core modules in NSIME separate from the examples.

A logs directory is created when the tests are run. The results of the test execution and information about the code coverage of the tests can be read by opening logs/index.html in a browser.

Simulation Examples

There are currently two simulation examples in NSIME both based on UDP client/server interaction. They are both located in the examples/src directory.

  • examples/src/ns3_tutorial_first.erl

    The first example is an NSIME port of the first example in the official ns-3 tutorial. The ns-3 script can be found in NS3ROOT/examples/tutorial/first.cc where NS3ROOT is the root directory of the ns-3 source code. It consists of a single UDP echo client sending a specified number of packets to a UDP echo server. The UDP echo server echoes each received packet back to the client. The example can be executed using the following command in the main NSIME directory.

    erl -noshell +P 1000000 -pa ebin/ -pa examples/ebin/ -run ns3_tutorial_first start 1 -run init stop

    The number 1 represents the number of packets sent by the UDP client.

  • examples/src/udp_cs_pairs.erl

    The second example consists of a specified number of UDP echo client/server pairs exchanging packets. The corresponding ns-3 script can be found at https://gist.github.com/4085165. Each client sends 10 packets to a unique server which replies to each packet. The example can be executed using the following command in the main NSIME directory.

    erl -noshell +P 1000000 -pa ebin/ -pa examples/ebin/ -run udp_cs_pairs start 50 -run init stop

    The number 50 represents the number of client/server pairs which are created.

nsime's People

Contributors

avras avatar

Watchers

James Cloos 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.