-3

I wanna program my own renderfarming tool in Java for the Blender render engine.. But know i wanna know what is better for doing that: TCP-IP or UDP?

Thanks

rudolf97
  • 121
  • 5

3 Answers3

2

I assume you want to have the reliability for your renderfarm, so data that is sent to the user contains the exact quality he or she expects, without anything weird that occurs because a packet is missing. You definitely don't want frames being skipped or sloppy. So I would suppose TCP-IP is the better choice here.

Also see:

When is it appropriate to use UDP instead of TCP?

http://www.cyberciti.biz/faq/key-differences-between-tcp-and-udp-protocols/

Community
  • 1
  • 1
Mr. AJ
  • 411
  • 2
  • 10
2

TCP/IP is a reference model whereas UDP is a protocol in this reference model. So, basically you can't compare these two. As, IP is another protocol in this model, at network layer, i think you mean to compare TCP and UDP, as they both belong to same layer, transport layer.

Which protocol is better, depends on what you want to do. For some requirements, TCP is better, for some, UDP.

TCP is a slow but reliable (ensuring that data is delivered) and connection-oriented protocol whereas UDP is fast but un-reliable and connection-less protocol.

TCP should be used when you need the data to be delivered surely (like downloading an application). UDP should be used if you need to deliver data most of the times(like sound or video chatting). By most of the times, we mean that while sending thousands of small data units, we can manage if we miss a few of them.

I hope, now you can decide which protocol to choose for you job.

nishantbhardwaj2002
  • 757
  • 2
  • 6
  • 18
0

It depends on the type of application that you are going to use. Make a note that TCP and UDP are transport layer protocols and do not mix it up with network layer protocol (IP).

TCP protocol : It is a connection-oriented streaming procotol . It is Heavy weight as it does 3 way handshake for connection establishment, flow control for network congestion , re-transmission for error correction and also ensures ordered packet delivery.

You can select TCP for following applications :

  • Applications that can accept delay but cannot compromise on packet loss or ordering of packets. (i.e, it is suitable for delay insensitive applications and for reliable packet transfer applications.)

Example for applications using TCP :

  • FTP
  • HTTP

UDP protocol : It is a message based connection-less protocol. It is Light weight as it does not have handshake mechanism for connection establishment or flow control for congestion or re-transmission mechanism. Also, it need to worry about the order of the messages.

You can select UDP for following applications :

  • Application that can tolerate packet loss or un-ordered packet delivery but cannot compromise on delay or jiter. (i.e, it is suitable for real-time applications and for applications that do not worry about packet loss)
  • Application that do multicast
  • Application that do small transactions (Example - DNS lookup, Heartbeat/Path monitoring communication messages, Logging)

Example for applications using UDP :

  • VoIP
  • DHCP
Karthik Balaguru
  • 7,424
  • 7
  • 48
  • 65
  • Sorry for mixing up. But I saw a book with the title "TCP/IP sockets in java" so i thought it is the name of the protocol.. – rudolf97 Oct 12 '14 at 17:23