This could be a series of blog posts about extending or developing your own OverSim applications & overlay networks. OverSim has a minimal tutorial on writing your own application & overlay network; however, it doesn't show the big picture. So, I'm wasting lots of time playing with code & trying to understand the rest. Good thing is, I like it more & more as I understand. You need to change/develop only a few things, but finding out which ones is a hell of a task. I hope this will not only make my life easy but also will be useful to new comers. Here's what you need to do:
- You need some background on OMNeT++
- OverSim extend OMNeT++. But sometime it has its own way of doing things (to make your task even simple) so understand the differences.
- Develop several OMNeT++ simulators. TicToc is a good one to start with. Extend it as you imagine.
- Read Towards a Common API for Structured Peer-to-Peer Overlays, which is the basis for OvseSim's API. Here's a summary of the paper:
- Motivate multi-tier application design & define role of layers. OvseSim's overlay layer belongs to Tier 0 while its Application layer captures Tier 1 & 2
- A key is 160-bits long.
- root is the node that is responsible for storing a given key
- nodeHandler encapsulates an overlay node with an ID (within the same key space), IP address, & optionally a port no.
- msg (a message) contains application data which could be of arbitrary length & format.
- route(key k, msg m, nodeHandler hint) - Route message m to root of key k. hint (optional) could be use to indicate first hop node in routing. hint is useful when sending messages directly to the destination (given that you already know it).
- forward(key k, msg m, nodeHandle nextHop) - An up-call to application layer that provides flexibility while routing. Can be call in each intermediate & the destination nodes. Useful while implementing key caching, where application could check m to see whether it already know the destination k. If so, it can directly reply to sender & stop the propagation of m by setting nextHop=NULL. Also useful while implementing malicious nodes that drop messages.
- deliver(key k, msg m) - Up-call to application layer of the node that is the root of k. Called when m is delivered to destination.
- localLookup(key k, int n) - A local-call to overlay to find out list of n nodes that can be used as candidates to reach key k. Useful in protocols like Kademlia.
- neighborSet(int n) - A local-call to find out list of n neighboring nodes in the key space.
- replicaSet(key k) - Return an ordered set of nodeHandlers on which replicas of object with key k can be stored. Useful while replicating objects. Also useful as nodes join/leave.
- update(nodeHandler n, bool join) - An up-call to indicate application layer that node n has join/leave the overlay. Useful when aggregating/splitting key ranges as nodes leave/join.
- range(nodeHandler n) - Get the range of keys that node n is responsible for. Useful in aggregating/splitting key ranges as nodes leave/join.
- Read OverSim documentation. Be aware, it may not be up to date.
- OverSimInstall - How to install OMNeT++, INET, & OverSim.
- OverSimUsage - How to simulate existing examples & plot data.
- OverSimDevelop - How to add a new application & overlay protocol.
- OverSimAPI - Module & API documentation, can't live without this.
- Write your own code, extend existing code as you imagine. You are guaranteed to spend days here before building your real simulator.
- Optional
- OverSim: A Flexible Overlay Network Simulation Framework
- OverSimChurn - How to use different churn generators.
- OverSimKbrRouting - Description of different KBR routing types
Comments
Is this possible?
•For Windows: Everything you need is already included in the OMNeT++ 4.0 package.
I have already installed OMNeT++ 4, but in the project explorer i cannot see the oversim project folder.
I want to use oversim to build a structured P2P network. Will there be a problem using windows 7 for this??
You need to follow the of the remaining steps to install INET & OverSim. You should be able to install on Windows 7.
I am trying to build an application that will use the pastry protocol to distribute files/jobs in the P2P environment.
I'm a new Oversim user and far I can manage to run the pastry simulation and change configuration in Oversim.
Any help to get me started will be deeply appreciated.
-Possible things i want to change include nodes having the ability to send "message of desire to leave the network" and making pastry to handle such messages.
for my test application, i want the bootstrap node to be able to send job messages to the nodes in pastry network. at the end of the simulation time, i want to check how many of the jobs sent by the bootstrap message wer returned.
i'm not really an experienced c++ programmer and yes i have started drawing diagrams of the class and the relationships.
I has to implement bittorrent with oversim, but I am lost
I managed to install oversim, I even well read all the examples
I downloaded an old version of bittorrent
And I want to start from 0
If you can guide me a little more please
Your aricle pleased me but I need more help
Thank you very much
You may be able to modify it rather than implementing everything yourself.
Thanks for answering
I've installed "Omnet++ 4.1" and "INET-OverSim-20101019" in Win XP properly, but while installing "OverSim-20101103" some problems happened.
I've followed installation guide step by step.
at first I used mingwenv to install, it worked for omnet++ and INet but didn't work for Oversim, Then I tried Eclipse on Omnet++ and got nothing but this error as I had seen it in minwenv:
"underlay/simpleunderlay/SimpleUnderlayConfigurator.cc: In member function 'uint32_t SimpleUnderlayConfigurator::parseCoordFile(const char*)':
underlay/simpleunderlay/SimpleUnderlayConfigurator.cc:306:18: error: 'malloc_trim' was not declared in this scope
make: *** [../out/gcc-debug/src/underlay/simpleunderlay/SimpleUnderlayConfigurator.o] Error 1"
What should I do?
Is there a CAN implementation for OverSim?
You can try to build your own
Thanks.
Follow steps given at http://dilumb.blogspot.com/2010/04/building-your-own-p2p-simulator-with.html
When it comes to implementation, you are pretty much alone.
To collect stat:
Use a variable(s) to collect no of messages at each node. You may need multiple variables as there are different types of messages. Then dump them at end of the simulation using something similar to following
RECORD_STATS(globalStatistics->addStdDev("DHT: Put messages", numPutMessages));
This can be added to finish() function. See some examples on OverSim (like DHTTestApp). Finally, you may need to write a small script to count messages from all the nodes
looked all over the web and still can't find solutions. Im not one of
the lucky ones who were able to install omnet 4.1 and oversim on win7.
After stumbling upon a post, i was able to build inetoversim through
the omnet ide by importing it then compiling it with dll as the
target.
Now still the same problem, im having trouble with oversim 20101103
itself. What is the right way to build it within the omnet IDE?
I tried a lot of times using the compiler that comes with Omnet(mingw) but i keep getting errors which looks for dll's (i add the a .dll and it
will look for another one) until i just get tired.
Now, i tried to build it within Omnet so i was able to build
inet, and im getting desperate about how to build oversim and use it.
I didnt touch anything in the code so i don't think there's some kind
of coding error.
Anyway, here are the errors it generated:
make: *** [../out/gcc-debug/src/libOverSim.dll] Error 1 OverSim line
0 C/C++ Problem
undefined reference to `_imp____gmpn_add_n' OverlayKey.cc /OverSim/src/
common line 249 C/C++ Problem
undefined reference to `_imp____gmpn_lshift' OverlayKey.cc /OverSim/
src/common line 386 C/C++ Problem
undefined reference to `_imp____gmpn_rshift' OverlayKey.cc /OverSim/
src/common line 365 C/C++ Problem
undefined reference to `_imp____gmpn_set_str' OverlayKey.cc /OverSim/
src/common line 115 C/C++ Problem
undefined reference to `_imp____gmpn_set_str' OverlayKey.cc /OverSim/
src/common line 662 C/C++ Problem
undefined reference to `_imp____gmpn_sub_n' OverlayKey.cc /OverSim/src/
common line 258 C/C++ Problem
Is there something wrong with omnet's compiler?
PLease help.
Oversim.exe stopped working
liboppcmdenvd.dll file missing
pls help me
i am new to oversim. I have installed omnet-4.1 and oversim successfully on my ubuntu 12.04 system.
Although i can run all the examples in omnet as well as in oversim. but when i try to run omnet ide using omnetpp command the ide screen splash for a second and then disappears . Kindly help me.
some people say that its due to java problem . but i checked i have the latest java version on my system . i also install eclipse for it .
but the problem persist.
kindly help
thanks and regards
ramanpreet kaur
i have installed omnet and oversim succesfully on my ubuntu12.04 system. Although i can run all the examples in omnet as well as in oversim but when i try to start omnet ide using omnetpp command the ide screen flash for a second and then disappear.
kindly help .
thanks and regards
ramanpreet kaur
I'm getting error while running OverSim application.
Error: Overlay generator not define or registered in registered_class.
Plz do rply at the earliest.
arundas1624@gmail.com
1. Define XY space
2. Random Number of Nodes
3. Connect these nodes with respect to their transmission range
4. Choosing some cluster heads with maximum cluster heads
5. Clustering
6. Feed data items to the nodes
7. Random queries from random nodes
8. Searching
9. Network maintenance, with respect to node joining, leaving, moving.
How to do this using OverSim? if you can guide me, it'll be a great valuable help for me.
Im using omnetpp-4.6 and inet on windows 8. (download and run inet from oversim websit-->inet-20111118-src). when i import oversim and wana build it thease 5 errors occurd:
1)'M_PI' was not declared in this scope hotspotRoaming.cc /OverSim/src/applications/simplegameclient line 118 C/C++ Problem
2)make: *** [all] Error 2 OverSim C/C++ Problem
3)make[1]: *** [../out/gcc-debug/src/applications/simplegameclient/hotspotRoaming.o] Error 1 OverSim C/C++ Problem
4)recipe for target '../out/gcc-debug/src/applications/simplegameclient/hotspotRoaming.o' failed Makefile /OverSim line 435 C/C++ Problem
5)recipe for target 'all' failed Makefile /OverSim line 13 C/C++ Problem
can you help me how can i fix them?
tnx
when i running oversim ini files like "realdhtworld.ini" this error came up.
how can i fix it? (im running omnet++-4.2.2 on windows8-64bit and i copy zlib1.dll on C:\Windows\SysWOW64 direction. )
Simulation terminated with exit code: 255
Working directory: C:/omnetpp-4.2.2/OverSim/simulations/realworld
Command line: ../../src/OverSim.exe -r 0 -n ..;../../src;../../../inet/examples;../../../inet/src -l ../../../inet/src/inet realdhtapp.ini
Environment variables:
PATH=;C:/omnetpp-4.2.2/inet/src;C:\omnetpp-4.2.2\bin;C:\omnetpp-4.2.2\msys\bin;C:\omnetpp-4.2.2\mingw\bin;C:/omnetpp-4.2.2/ide/jre/bin/client;C:/omnetpp-4.2.2/ide/jre/bin;C:/omnetpp-4.2.2/ide/jre/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\omnetpp-4.2.2\bin;C:\omnetpp-4.2.2\ide;
OMNETPP_IMAGE_PATH=C:\omnetpp-4.2.2\images