6

I am developing a java application that will work peer-to-peer. At any given time, there will be over 5000 clients around the world online. Each of these clients will create small files over time. I would like these files to be distributed amongst all the clients and stored, so that anyone can connect and download the filesdump.

Is there any library that would help with that?

Anon21
  • 2,961
  • 6
  • 37
  • 46
  • Do you need for there to be conflict resolution between nodes? Should nodes auto-discover each other, or would you be okay with each having to peer manually? – halfer Jan 12 '12 at 18:18
  • You could check out the Pastry library http://www.freepastry.org/ But I'm will Bill K below. Think about using a client/server system. Any server solution could easily scale to 5K clients. – selbie Jan 13 '12 at 03:54
  • I need to support 200 million client. – Anon21 Jan 15 '12 at 17:44
  • Got the same question here. I wanna make a fan-made tool for a game which has millions of users (around 10million). Looking for a free way to broadcast data from each user to users. – thirdy Feb 10 '15 at 00:42

1 Answers1

4

(I'm rephrasing this to make it a little more serious since it's still the only answer)

Try finding a Java bit-torrent library, I just googled and there were a bunch of them--I don't want to list them here because I don't have any personal experience with any of them.

I can tell you that the way it normally operates, bit torrents still require some centralized coordination (The tracker). I'm quite sure that Vues works in a "Trackerless" purely p2p mode so I would look for that specifically when evaluating the libraries.

If this isn't some huge widely-distributed and heavily financed app you are creating I highly recommend looking into some other kind of shared file system like dropbox or even svn, they are not p2p but they are known to work reliably and at least dropbox can work completely in the background, unattended and ignored on any platforms for years without trouble.

Bill K
  • 62,186
  • 18
  • 105
  • 157
  • I like this answer. It could be extended to say "any client/server solution." The amount of effort just to make a client-server system reliable will be miniscule in comparison to the amount of debugging required to make a scalable P2P system work robustly. – selbie Jan 13 '12 at 03:52
  • After I thought about it I think a bit-torrent library could really do the job but I think that implementing a bit-torrent library and dealing with all the connectivity issues (including making it purely p2p which BT isn't normally) would be more work than most small projects would want to take on. – Bill K Jan 13 '12 at 16:45