developing and testing a distributed application on NS3

174 views
Skip to first unread message

new researcher

unread,
Mar 19, 2016, 10:05:03 PM3/19/16
to ns-3-users
I am trying to build a distributed application on mobile Ad-hoc network(MANNET) and simulate it on NS3. The application uses custom application protocols. Upon receiving packets on a particular port, the application checks the packet for the corresponding protocol tag(body of TCP or UDP) and process the packet accordingly. Is there a way I could develop these applications using python or Java and simulate them on NS3.


new researcher

unread,
Mar 23, 2016, 4:49:44 PM3/23/16
to ns-3-users
If this sounds like a vague description. Here is what my idea to implement using NS3. I want to develop or use an existing application which is distributed on nodes on NS3 Ad-hoc network. Yeah I sounded like using LXC containers with each node on the network. Since, each node is a container, I should be able to run application which can open a socket, read and write contents to socket so that they are deliver to the the destination node. But if I want to run the same application over all nodes, then I should create all the linux containers, configure them with the ip address then run the application on each one of them. Is there any procedure which simplifies the similar simulation execution.

Tommaso Pecorella

unread,
Mar 23, 2016, 7:30:14 PM3/23/16
to ns-3-users
Hi,

it really depends on how you want to develop your application and what is the goal of the development.
If you want to develop an app and then "use" it without modifications, then you should use DCE or LXC. 
If you want to focus on the protocol definition and application behaviour, then you can use Python to build a simulation. however, in this case the application will have to be written in C++.
I'm fairly sure that you can use TCP and UDP sockets from Python tho, and in this case all the application could be in Python. It's not my favourite choice, so I can't say what's the pros and cons.
About Java... I don't think you can use it (unless you want to use LXC or DCE, again).

As a side note, all the applications in ns-3 are, by nature, distributed. Meaning that each application is (or should) be limited to the knowledge of the node it is installed onto.

Hope this helps,

T.
Reply all
Reply to author
Forward
0 new messages