Link to home
Create AccountLog in
Avatar of Enill
Enill

asked on

Need ideas for file transfer behind firewall

Hi,
i have a WCF REST service where client poll from time to time to update their status.

I am facing a problem where i want to allow different client to transfer files between them but i am not sure how to proceed considering sometime the clients will be behind a firewall.

For example: Let say i have a home where 1 person is running the client application, this client want to transfer a file in home #2 where 2 person run the client application. The home #2 peoples are behind a firewall so they share the same External Internet IP Address.

If the client #1 want to request a send file action to home #2 by accessing the ip address, how would it work for home #2 to know the client #1 want to communicate with him and not the other person?

I really need ideas there. I was thinking to let client #1 just transfer a stream to the server and the client #2 to retrieve this stream from the server but im not sure if its a good pratice since the server would need to transfer this stream 2 times(receive, send).

The server is working with GET/POST and client send GET/POST request to the server.

Thanks in advance!
Avatar of Kent W
Kent W
Flag of United States of America image

Two way I can think of with provided info -
With the example provided, I'm assuming this will be replicated many times between clients?  The problem with transferring directly, each firewall will have to have the others current public routable IP, open a port for that IP, and then have a service behind each serving or uploading the file (ftp, http, etc.)
The best, and most secure method for all involved, is do just what you said - use a public server on the 'net as a "meeting place" or liaison.  One drops a file, the other picks it up.  This can be very secure, depending on design, and you can have it self-cleanup and remove older files in various ways.
I actually wrote a whole service offering (medical transcriptions) based on a similar method,and it just works very well.  
If you don't want to host this on a current server for whatever reason, a cheap VPS or even shared hosting (check their TOS) can suffice quite nicely.
Avatar of Enill
Enill

ASKER

Hi and thanks for the reply.

I do have a dedicated server.

About your example of Media Transcriptions, do you wait for the file to be completly transfered to the server before the other start downloading it, or do you work in a different way?

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Kent W
Kent W
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account