C
Chris
What's the best way to copy files from a central server to remote servers?
Our app runs on multiple app servers, so I can control code running on
both ends. I've got no guarantee, however, that the central server will
be able to map or mount remote drives, so doing a simple file copy is
not an option.
My first thought was to package up the file into a POST request and send
it that way. A servlet on the receiving end could handle it correctly.
The trouble is that sometimes app servers have a maximum post size, and
my files could be quite large. Another way would be to send a URL, and
have the remote server pull it from the central server. The trouble with
that approach is error handling; how will I know if there was an error
and the process needs to be restarted?
Is there a guaranteed way to do a file transfer?
Our app runs on multiple app servers, so I can control code running on
both ends. I've got no guarantee, however, that the central server will
be able to map or mount remote drives, so doing a simple file copy is
not an option.
My first thought was to package up the file into a POST request and send
it that way. A servlet on the receiving end could handle it correctly.
The trouble is that sometimes app servers have a maximum post size, and
my files could be quite large. Another way would be to send a URL, and
have the remote server pull it from the central server. The trouble with
that approach is error handling; how will I know if there was an error
and the process needs to be restarted?
Is there a guaranteed way to do a file transfer?