0

Although there are similar questions, I was not able to find one that will summarize the different options of data transfer protocols and their pros and cons in matters of speed, security and reliability.

As a developer I have created a web service that on the Server Side generates one single file with the size ranging from 500Mb to 5Gb. I am examining the different options that I have for transferring the file to the client side.

As far as I know, the two most prominent solutions in the Transport Layer are TCP and UDP, with TCP offering more reliable transfer with a cost on time and UDP sacrificing reliability for speed.

In the Application Layer I know that implementations of UDP, offering reliable transfers exist, like RUDP and UDT.

It is very important to mention protocols that can be used without asking from the client to make installations or special configurations in order to take the data from the Server Side.

My questions are:

  1. Does any application layer protocol based on UDP working out of the box on the client side, like HTTP or FTP?

  2. Does any protocol based on TCP offers similar speeds with the UDP ones?

  3. Do the UDP protocols offer a secure way of transferring Data like Https?

The objectives are

  1. Deliver the data without any missing package
  2. Deliver the data with a secure(encrypted) way

For the implementation i am currently using JAX-WS and Glassfish as application Server.

stratis
  • 738
  • 3
  • 8
  • 23

1 Answers1

1

Your entire question reads like you've already decided that TCP is "too slow" and that UDP is your saviour. Your question is missing important details:

  1. Does it matter that the file is received as it is sent?
  2. What technologies / frameworks did you use for the web service?
  3. What technologies / frameworks can you use at the client side?
  4. Are you currently actually having any problems with transfer speeds? Whose fault is this, your serialization's, your code's, your network's or TCP's?

As for 1, if yes, then forget UDP. TCP is relatively slow because it guarantees data delivery in order (as long as the connection exists), something you'll never get using UDP. See Which socket programming is best (TCP/UDP)?

For 2 and 3, some of your problems may be solved by applying different serializers, formatters or transports, but that totally depends on how you've implemented your service and client.

For 4, I don't believe TCP is too slow. Once the window is large enough and it's up to speed, it'll use all available bandwidth when fed with appropriately-sized data. See for example UDP vs TCP, how much faster is it?.

Now for your questions:

Does any application layer protocol based on UDP working out of the box on the client side, like HTTP or FTP?

Depends on your box.

Does any protocol based on TCP offers similar speeds with the UDP ones?

Yes, for example video streaming protocols, where losses are manageable.

Do the UDP protocols offer a secure way of transferring Data like Https?

TCP and UDP are transports, they don't care what you transport. Security is layered on top of that, see for example Datagram Transport Layer Security.

Community
  • 1
  • 1
CodeCaster
  • 147,647
  • 23
  • 218
  • 272
  • Thank you very much for both the Edit and the Response. I will try to add the information that are missing as you very well reported. – stratis Oct 29 '13 at 13:02
  • Can you please define what you mean by Depends on your box ? :S – stratis Oct 29 '13 at 13:08
  • That means that since the most common transport protocols are installed by default on any modern OS and protocols layered on top of that generally are provided by applications, it depends on the environment you want to install your client in. – CodeCaster Oct 29 '13 at 13:11