[p2p-hackers] simulator for p2p

Sean C. Rhea srhea at cs.berkeley.edu
Tue Feb 1 19:19:59 UTC 2005


On Feb 1, 2005, at 9:22 AM, Davide Carboni wrote:
> is there any way to simulate a p2p network  using a single PC?  I know
> ns2 but it seems very "low-level" simulation. I'd like something to
> simulate a network of peers abstracting from the serialization of
> messages. For instance, I'd like to model peers like objects in memory
> which exchange messages invoking methods each other but taking into
> account variables like the bandwidth, the latency and so forth.

Bamboo (bamboo-dht.org) comes with a simple simulator that models 
latency based on real measurements (the data is from here: 
http://www.pdos.lcs.mit.edu/p2psim/kingdata/).  It's a pretty simple 
event-driven simulator written in Java; the nice thing about it is that 
you can use the same code under simulation that you use on the real 
net.  To use it, download the latest Bamboo CVS snapshot and try this:

   cd bamboo/src/bamboo/sim
   ./make-startup-test.pl
   ../../../bin/run-java bamboo.sim.Simulator /tmp/startup-test.exp

It will start up 29 Bamboo nodes that will then form a Bamboo network.  
It's a pretty simple example, but it should give you the idea.


The PDOS group at MIT also has a simulator.  It's at 
http://www.pdos.lcs.mit.edu/p2psim/.  It uses threads instead of 
events, and C++ instead of Java.  It also models only latency.

Both of these simulators should be able to simulate 200-1000 nodes, 
depending on how much core memory your machine has.  Modeling bandwidth 
is hard to do at scale.  (It's one of the reasons NS2 doesn't scale too 
well.)

Sean
-- 
     We are all in the gutter, but some of us are looking at the stars.
                              -- Oscar Wilde
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://zgp.org/pipermail/p2p-hackers/attachments/20050201/781b2a03/PGP.pgp


More information about the P2p-hackers mailing list