开发者

P2P java file transfer

开发者 https://www.devze.com 2023-04-03 19:13 出处:网络
First off, I am VERY new to Java, but wanted to know if it was possible. I could not find any tutorials or explanation online:

First off, I am VERY new to Java, but wanted to know if it was possible. I could not find any tutorials or explanation online:

Is it possible to send/receiv开发者_如何转开发e files not through a server, but P2P. I want a file, when selected, to be sent to another PC running the client. What is the best method of doing this? Is there something I have missed?

(P.s. My first stackoverflow question, please be nice :D)


Give JXTA a try, it should satisfy all your needs.

Or try a DHT implementation for the P2P part and implement the file transfer either over the DHT or just the sesssion initiation by DHT and some other kind of direct file transfer.

  • openkad
  • JDHT

(DHT selection taken from this question)


Maybe you want to have a look at http://www.adp-gmbh.ch/blog/2004/november/15.html

Every Peer in a P2P-system will have both roles (receiver AND sender that is each peer is server AND client at the same time).


It is certainly possible. Check the Free Pastry implementation


JXTA are a little complex to someone new in Java and it has some limitations with scalability and perfomance of his communications layers. Another option is XMPP, if a pure P2P is not mandatory.


Pastry provides a DHT. Its done Java and very easy to use. Its storage system is known as PAST and a tutorial can be found here : https://trac.freepastry.org/wiki/tut_past

I've had a great experience working with it.

0

精彩评论

暂无评论...
验证码 换一张
取 消