Java – Am I sending large amounts of data sensibly

dataftpjava

I am about to design a video conversion service, that is scalable on the conversion side.

The architecture is as follows:

  • Webpage for video upload
  • When done, a message gets sent out to one of several resizing servers
  • The server locates the video, saves it on disk, and converts it to several formats and resolutions
  • The resizing server uploads the output to a content server, and messages back that the conversion is done.

Messaging is something I have covered, but right now I am transferring via FTP, and wonder if there is a better way? is there something faster, or more reliable? All the servers will be sitting in the same gigabit switch or neighboring switch, so fast transfer is expected.

EDIT:
The question goes on the server <-> server side of things. The servers are co-located in same LAN, so the security of the interconnection there is not expected to be the main issue.

Best Answer

I would use autonomous servers. Each server hosts the uploading frontend, the encoder and the download service. This way you don't have to transfer files around. To scale, simply add more servers- it sounds like you don't have any obstacles doing that.

Research if you can stream the process; start encoding the file while it is still uploading, download the result while it is still being encoded. This won't reduce the cost of any of the operations, but the end user will perceive a significant benefit.

Offer alternatives to HTTP upload if your files are large. If the upload stops for whatever reason, the user must restart the upload from scratch.

Related Topic