How to download the same file distributed in different computers in Java

末鹿安然 提交于 2019-12-25 01:59:38

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!