问题
I want to make a college project for sharing of files among different computers. Usually we have same file, for example, a movie on different computers among a local network in our college. So I want to download a file in different parts from these computers simultaneously so that download will be fast.
I am making this application in Java. What should I read?
I am using JXTA for peer-to-peer (P2P) sharing. Is this possible using JXTA?
回答1:
It is possible to do this in JXTA. You need to split your files yourself by building a solution on top of the JXTA framework. There are two main approaches to solve your issue: using bidipipes or a query system to send bits of the file back.
You may also need to implement some kind of index on your peers to monitor which file part is available where. To anticipate another question, no you can't use the SRDI integrated in super peers for your own purposes. Create a service or a query system to answer requests for location of file bits.
回答2:
In November 2010, Oracle officially announced its withdrawal from the JXTA projects. Try http://www.jgroups.org/
来源:https://stackoverflow.com/questions/7370425/how-to-download-the-same-file-distributed-in-different-computers-in-java