Slashdot Mirror


p2psim: Roll Your Own P2P Protocol

Anonymous Coward writes "p2psim is a free, multi-threaded, discrete event simulator developed at MIT to evaluate and investigate p2p protocols. You can quite easily add your own p2p protocol and compare it with others to make sure it runs well before you write the real thing. p2psim runs in Linux and FreeBSD."

26 of 108 comments (clear)

  1. Pretty clean code, too... by tcopeland · · Score: 2, Interesting

    ...at least, in terms of duplicated code clumps as reported by CPD.

    Here's the report... not bad at all.

  2. Interesting parallel by TheBrownShow · · Score: 5, Funny

    Hmmm, both p2p and "rolling your own" are two things that people could make a lot of money off of if they just made it legal :-)

    1. Re:Interesting parallel by blankinthefill · · Score: 5, Informative

      I don't think I have ever seen or read anything that states that p2p is not legal. Maybe I'm just way behind the times, but it was my understanding that p2p itself is legal, it's what the network is used for that is illegal.

  3. They need to implement older protos by Zanek · · Score: 5, Interesting

    They need to implement older protocols like Gnutella's and Fasttracks.
    It would be interesting to see if there simulator comes close to real world performance of these networks after that !
    Yay, we have networks simulating networks. Kazaa Reloaded !

    --


    Help pay for my wedding! Go to my kickass website
    1. Re:They need to implement older protos by aardwolf204 · · Score: 2, Funny

      Yay, we have networks simulating networks. Kazaa Reloaded !

      Once I was playing The Sims (Hot Date I believe) and I went to town to pick up some flowers and in one of the stores I found a copy of The Sims. So I had my sim buy the game and install it on his computer, oh the hours of fun my sim had playing The Sims. Thank god it wasn't The Sims Online my sim was playing though, I dont know if my poor athlon could simulate that!

      Anyway I was gonna say something cheeky about neo but I'll leave that for the next poster

      --
      Im dreaming ofa big bndwdth, That can resist the /.crowd.May ur days b merry & bright & may al
  4. How complete is it? by DJProtoss · · Score: 5, Funny

    I mean, does it contain a simulated RIAA that will come and sue you for distribution of copyrighted simulated material?

    --
    "Success is based on knowing how far to go in going too far"
    1. Re:How complete is it? by dcphoenix · · Score: 2, Funny

      Why bother with a simulated one? I'm sure the real Gestapo.....er.......RIAA will be glad to lend their 'services' to the simulation.

    2. Re:How complete is it? by Brad+Mace · · Score: 2, Funny
      I mean, does it contain a simulated RIAA that will come and sue you for distribution of copyrighted simulated material?

      Yeah. It's not so bad though. You can pay them off with monopoly money.
    3. Re:How complete is it? by gnu-generation-one · · Score: 4, Insightful

      "How complete is it? I mean, does it contain a simulated RIAA that will come and sue you for distribution of copyrighted simulated material?"

      Anybody who uses genetic algorithms, who 'breeds' computer programs rather than writing them, will tell you that the secret to success is good predators.

      So yes, if you wanted to design a system for rating the quality of P2P protocols, one of the most important steps in that simulation is to have evolving predators, who try and intercept others' data, who try to slow the system down, who try to leech without sharing, etc. A system where data can be traced to an originator might score less than a system resiliant to this kind of attack.

      The testbed mentioned in the article doesn't contain this sort of capability, but if you're involved in designing such networks, then it would be useful to dedicate a lot of effort to trying to attack the protocol using RIAA methods.

      Read more about what a P2P application should have in its design.

  5. Real world problems? by Chris_Jefferson · · Score: 5, Insightful

    I've seen this program a short while ago, so feel I can comment :)

    While it is a good idea, and can be worked on it does have some small problems, mainly that it isn't quite "dirty" enough. It tends to believe people will behave better than you'd expect them to, not be evil leechers and also not have very dodgy net connections which go up and down every 10 minutes (which to be fair happens to alot of people on ADSL and such like, their uploads get saturated and all their download connections drop because their ACKs aren't getting out)

    Having said that, this is a good program, and I hope will be improved as one of the hardest parts about p2p networks is keeping up a good solid network without it taking up a significant proportion of the network, and nowadays few people want to risk running a server if they can avoid it...

    --
    Combination - fun iPhone puzzling
    1. Re:Real world problems? by jd · · Score: 2, Insightful
      They probably assume you'll use their RON (Robust Overlay Network) software. :)


      Of course, you can always use ns-2 to simulate the low-level nuts-asnd-bolts, and use its noise generator to dirty the connections.

      --
      It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
  6. P2P Simulation by ospirata · · Score: 5, Funny

    Does p2psim simulates RIAA suing you? This would be the "de facto" p2p simulator.

    1. Re:P2P Simulation by garcia · · Score: 3, Funny

      no, it just sends you a form letter via email demanding your current life savings and says that if you respond to their blackmail they will leave you alone.

  7. What about the cost? by the+real+darkskye · · Score: 5, Funny

    Do you have to pay a virtual SCO for every virtual linux node on the virutal network?

    Its a virtual post, but I have karma to burn off.

    --
    Music is everybody's possession.
    It's only publishers who think that people own it.
    Fuck Beta
    ~John Lenno
  8. Here's an idea by shish · · Score: 4, Interesting

    How about, instead of having a few dozen networks, we just come up with one? It works fine for things like the phone system and email (even though there're seperate companies, they're one network), so why not just have one protocol with everything built in?

    --
    I mod down anyone who says "I will be modded down for this", regardless of the rest of their comment
    1. Re:Here's an idea by gorilla · · Score: 3, Insightful

      That works fine, if there are only one set of goals. But if you have more than one set of goals, you'll find that if you optimize for one set, you'll make it worse for the other set.

    2. Re:Here's an idea by SkArcher · · Score: 5, Interesting

      Patience grasshopper, such is inevitable, but it will take some time

      Look at the english railways - for a long time, seperate companies used their own parallel rail network, often running different gage track (different width) and having to step around one anothers infrastructure, creating clumsy and non user friendly railway stations and services.

      Eventually rail regulation came in, standardising all rail networks to one standard gage, allowing rolling stock and engines to work on any rail companies track and making the whole exercise better for customers and more profitable for the companies.

      Sooner or later, p2p filesharing (and maybe chat client) protocol will become standardised, and it will simply be a matter of which piece of software you use to connect to a complete network.

      Mind you, it'll probably be the one without any advertsising, and will lead to the end of civilisation as the marketing droids know it, but some sacrifices must be made for the good of the internet :)

      Wow! Look at that, a transport analogy for the internet and computers that isn't about cars! Thats got to be a first :)

      --

      An infinite number of monkeys will eventually come up with the complete works of /.
  9. Protocol Stub by Lizard_King · · Score: 4, Informative

    In addition to a cool sim, p2psim gives you a stubbed out protocol to play around with. Build your own and guage efficiency! Check it:

    protocols/sillyprotocol.h and protocols/sillyprotocol.C contain the outline of a new, but unimplemented peer-to-peer protocol. Implement join() and lookup() to your liking. Look at the other protocols (in the protocols/ directory) for more example code. Then run your SillyProtocol as follows:

    p2psim/p2psim example/silly-prot.txt example/silly-top.txt example/silly-events.txt


    Kudos to a great release and the promotion of additional research and general purpose learning.

    --
    "My mother never saw the irony in calling me a son-of-a-bitch." - Jack Nicholson
  10. Not the only game in town by sideswipe76 · · Score: 3, Informative

    This tool seems like a stripped down version of NS2. With NS2 you can roll your own protocol and implement it using their reasonably powerfull scripting language (oTcl .. pronounce Oh - tickle) or create your own C++ code to do the job. They have every wired protocol I can think of implemented, 95 percent of wireless ones (including some satellite) and it also comes with NAM; a GUI to show you the nodes and flow and such. Runs on *nix and windows with cygwin

  11. OT: The Morris Worm author involved by robslimo · · Score: 2, Informative

    Very interesting. So Robert T. Morris has cleaned up his coding since the days of the Morris Worm

    Read the above link and then read RTM's bio page. Same guy?

  12. Meta p2p? by Pope+Raymond+Lama · · Score: 3, Insightful

    I imagine the technology used to simulate p2p netwroks can also be embeded in an app that could have a dynamic user configurable protocol one could change on the fly.

    That would be the ultimate chaotic p2p network, and would be something ultimately funny to see go live.

    --
    -><- no .sig is good sig.
  13. Sort of related question... by mcc · · Score: 3, Interesting

    Does anyone know what a good sort of p2p "kit" is, say if you want to include p2p networking (like, the ability to create and work with a self-managing p2p network) in an application but don't want to write your own p2p protocol/network code?

    I know there must be a couple. What are some good ones?

    I heard Sun has one? What's it called? "JXTA"? Has anyone worked with that, is it any good? Can it work with nodes that are behind NAT?

    1. Re:Sort of related question... by yaphadam097 · · Score: 3, Informative

      I heard Sun has one? What's it called? "JXTA"? Has anyone worked with that, is it any good? Can it work with nodes that are behind NAT?

      I am just starting a project using JXTA. So far I am very impressed with the technology, although it is perhaps a bit bloated (This is my impression of the code and is not based on any comparison with other P2P protocols, since I haven't used any others ;-) JXTA does support tunneling over HTTP which gets you around most firewalls and NAT and such. It also has a real interesting architecture where certain nodes can be promoted to act as relays. Among other uses, this could allow a public machine to act as a proxy for messages to peers behind a firewall/NAT.

  14. Now that we have a quality checker... by gerf · · Score: 4, Interesting

    Can someone have some AI build a better P2P? Once you think about it, wouldn't that be the easiest way to come up with the next bestest efficient P2P protocol?

  15. Re:nullsoft by drinkypoo · · Score: 2, Interesting

    Since when do you have to be an expert user to get it working? Just follow the instructions. To wit; go through key generation, which you are automatically prompted to do, and then go through a manual key exchange. The problem is that the GUI client is windows-only, a problem which would have been nonexistent if frankel had whipped up a GTK application instead of a Win32-specific one. However I am grateful to him for what he HAS made, as I use it daily.

    With those things said, WASTE is not a complete solution. It needs the option for a centralized keyserver, and for the revocation of keys. It also needs some type of per-user access control. Without these items it is only suitable as a tool for very small groups of like-minded people. If you would like to use it for widespread p2p (it could easily do all the things that HOTLINE does now) then you will have to rectify these features, and implement some kind of managed trusts.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"
  16. They know how the other systems should work by cgenman · · Score: 4, Interesting

    P2P as a network protocol is evolving into something that actually works, as opposed to the state that it was at previously. It used to be that you connected to a single fault point, selected a single file from another user, and began downloading. Oh, do that while praying that neither of you got be cut off.

    Then download resuming was added. Gnutella removed the central point of failure. Downloading from multiple sources was added. Kazaa added the concept of the supernode. eDonkey allows you to upload files that you haven't finished downloading yet. Soon we will probably see beginning-of-download randomization, so that complete files can be downloaded on a network even if nobody has finished getting it yet. .torrent is adding accountability to the mix, which adds great legal uses, along with better HTML integration.

    What more will we see in a protocol? Who knows. Encryption? Better IM capabilities? Webcams? Plug-ins? Preview from remote computer? While we still haven't figured out what the parameters of the network should be we shouldn't agree on the holy standard of the one true network.

    "If we knew what we were doing it wouldn't be research"