Posted By
Christopher Dabhi
on
19. March 2014 03:04
Recently Simtekway was faced with the challenge of creating a desktop application for a client that would allow them to transfer files seamlessly and effortlessly with other users. The client would be able to select a file or folder and then choose a recipient from a dropdown list of other users. In the development of this application, we had a chance to experiment with various techniques for transferring data. We believe the results may prove useful to any developers experiencing a similar challenge.
Our first attempt was a ‘byte transfer’ method. However, this method had a limitation wherein we could not allocate an adequate memory buffer to transfer large files. It worked well in transferring file sizes up to 110 MB, but was unable to transfer a 200 MB file. When attempting to do so, we were met with an error that explained the application failed a managed memory buffer of 536870912. This limitation would not be acceptable for the client, so we went back to the drawing board.
The second method we tried was the ‘stream transfer’ method. Unlike byte transfer, stream transfer was able to handle large file sizes, including 1 GB files. However, we soon found out that the method was incompatible with HTTP 1.0 and only worked well with HTTP 1.1. This is because chunked encoding uploading is not supported on the HTTP 1.0 protocol. If either the client or the end user receiving the file used HTTP 1.0 then the transfer would not succeed. We would need to try a third method before we found a file transfer method that met our client’s requirements.
The third and final method we used was to employ FTP file transfer within the application. This method facilitated transferring files of 1 GB seamlessly. Setting on this transfer method, development on the application was complete. It required the executable to be deployed at both ends – the sender and recipients. Although it does not actively require an internet connection, there are web services called internally. Hence, if the web services or FTP are blocked by a firewall, the app may not function as desired.
Thus concludes our experiment with desktop-based file transfers. We’d like to hear from other developers who have had experience with this issue. What methods did you try and what were the results? Share your findings with us.
Call us at 484-892-5713 or Contact Us today to learn more about best method for a desktop based file transfer.
Rate This Post:
5e2b8230-8912-4ecd-96f1-e129a31cb7ec|7|3.7