Java programmer for disturbted file transfer protocol

  • Posted
  • Proposals 1
  • Remote
  • #18887
  • Expired
Sagar J. has already sent a proposal.
  • 0


Experience Level: Expert

So when a user downloads a large file off the internet, whether it is from a web server (http) or an ftp server the download is limited in speed to the bandwidth that is available from the server. If there are multiple users downloading from the server, than the total available bandwidth is reduced by the total bandwidth that those users are consuming.

Often certain files are hosted on many different servers (mirrors). For instance when downloading an ISO of Linux there may be dozens of servers that have the same file. Now if none of those servers were able to saturate our available bandwidths by themselves wouldn't it be great if we could download parts of the file from one server, and the other parts from another server.

This idea is currently implemented in bittorrent. When a user is downloading a file, the user is matched up with multiple peers that have the requested file. The file is split up into many equal segments, and the users is able to download different segments from different users. This allows for less bandwidth being taken from an individual users, while at the same time trying to saturate the requesting users bandwidth.

Now bittorent is specifically decentralized, so there is no central server that controls the file transfers, or keeps track of the available files. I think it could be beneficial to have the same technology in a client server architecture like FTP. Now comes the issue of how to implement this type of functionallity into a client/server architecture.


Work needed on the client side of the FileDownloadStatus. We need a class to keep track of what segments still need to be downloaded, and be able to take the segments as they are downloaded and write them to a file.

It needs to have a method for getNextSegment which will hand out the next available segment for download.

It needs to have a method for updateSegment which will take a segment number, and a byte[]. This segment will not necessarily be the next segment in line, so the method needs to be able to handle this.

The class also needs to keep track of which segments have been handed out for download, and which segments have been written to the file. All methods need to be synchronized to handle multiple threads trying to call the same action at the same time. There should also be methods for getting back % complete, Number of segments remaining, total segments, and possibly file length. We may need to add a file length command to out protocol later as well.

If you have any questions please contact us through the clarification board.


Clarification Board

    There are no clarification messages.