New FTP Command: RANGe for Specifying Byte Ranges

Posted by Anthony Bryan on Fri, Apr 29, 2011 @ 11:58 AM

Standard FTP already has the REST command, which allows the starting point of a file transfer to be specified:

Restart of Interrupted Transfer (REST): To avoid having to resend the entire file if the file is only partially transferred, both sides need some way to agree on where in the data stream to restart the data transfer.

...but REST doesn't allow you to set an end point. This means you have to use an ABOR command or close the data connection, which are not optimal.

In the new FTP Working Group, we've designed the RANG command to overcome this. RANG is quite simple. It lets you specify a byte range of a file, that is, a start point and end point. So you can download a chunk of a file, similar to the Range: header field of HTTP. Or you can upload a chunk in the middle.

RANG can also be used as a generic selector for other comands, such as HASH. In conjunction with HASH, you could select and HASH only portions of a file, so you could determine where in the file an error is (if there is an error). Then you could use RANG again to upload only the error portion of a file, which could mean much less data would be transferred, instead of re-uploading the whole file again. This is especially helpful for large files.

Would RANG be useful to you? Can you think of any other uses for this feature?

Topics: JSCAPE MFT Server, Managed File Transfer, FTP