开发者

implementing a Intelligent File Transfer Software in java over TCP/IP

Can you please provide answer to 开发者_开发百科some of these?

Thanks


Since you say your client does not want to use FTP, I am assuming that you will be writing your own protocol. It seems like a number of these questions are more related to functional specifications, and you should be posing these to your client to get better requirements for your project. With that in mind here are ideas/comments for some of your questions:

  • How can we guarantee the file is received at the destination? Have your protocol include some kind of ACK / NAK message after file transfer is completed.
  • If a file isn’t received the first time, we should try it again (even after a restart or power breakdown)? This sounds more like a functional requirement that should be specified by your client. Do they want reliable transfer, then yes I would think some kind of retransmission would be justified (perhaps quitting after some number of failures.)
  • How does the receiver knows the file that is received is complete? You could have the protocol send some kind of data about the file before transfer such as an MD5 hash that could be checked by the client against the received bytes (and back to question 1 send the ACK / NAK if the hash matches)
  • How can we transfer multiple files synchronously? Again if you are writing the protocol just make it part of the spec. For example "Server will send byte listing number of files to be transferred, followed by name of each file, followed by number of bytes for each file." So your server might send "2, foo.txt, bar.txt, 512, 1024, [1516 bytes of data]"
  • How does one interoperate between multiple OS platforms? I think you need to be more specific with this question, what do you mean by interoperate? Everything I can think of should be abstracted away by Java (i.e. file system access, raw socket communication, etc)
  • What about authentication? As with reliability this seems like it would be more of a functional requirement specified by your client.
  • Auditing / logging? As above what does the client want?
  • Archiving? As above what does the client want?


  • How does one interoperate between multiple OS platforms? You said you're using Java, so this shouldn't be an issue, at least.


Learn "rsync" by heart, and then see how it can solve most of your clients needs.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜