Hi list,
I'm sending data between two computers, in every 10ms. For fast networking, TCP is better result? I don't know which is better. Most tutorials show example of OSC with UDP. Why?
Thanks, Jong
hi, i'm not an expert on PD but my feeling was that TCP does error checking while UDP does not, and that at least is one reason why TCP should be slower than UDP in a typical networking situation.
scott
On Mon, Jan 13, 2014 at 2:20 PM, Jonghyun Kim agitato816@gmail.com wrote:
Hi list,
I'm sending data between two computers, in every 10ms. For fast networking, TCP is better result? I don't know which is better. Most tutorials show example of OSC with UDP. Why?
Thanks, Jong
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pretty much. TCP ensures that every packet gets there intact. You have a back and forth between the server of the packet and the client to make sure. UDP just sends the packet where you ask, and doesn't confirm whether it makes it at all. Generally for most OSC use the number of packets you're sending isn't going to be high enough that packet loss is an issue and most people use UDP since it will be faster. Then if you're running into packet loss, for whatever reason, try switching to TCP.
On Mon, Jan 13, 2014 at 2:44 PM, Scott R. Looney scottrlooney@gmail.com wrote:
hi, i'm not an expert on PD but my feeling was that TCP does error checking while UDP does not, and that at least is one reason why TCP should be slower than UDP in a typical networking situation.
scott
On Mon, Jan 13, 2014 at 2:20 PM, Jonghyun Kim agitato816@gmail.com wrote:
Hi list,
I'm sending data between two computers, in every 10ms. For fast networking, TCP is better result? I don't know which is better. Most tutorials show example of OSC with UDP. Why?
Thanks, Jong
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2014-01-14 04:41, Ryan Smith wrote:
packet loss is an issue and most people use UDP since it will be faster. Then if you're running into packet loss, for whatever reason, try switching to TCP.
UDP will be faster, as it has less overhead:
somebody listening on the far side)
way to signal back to the sender, that some data was missing - so there is no need for a complicated error correction stack
another cool thing about UDP is, that it is pretty stable in un-reliable situations (that is: if you can live with lossing some packets alltogether): if one side suddenly dies, the other side will not be affected. with TCP/IP this often means hangs of the remote side.
the issue of UDP being an unreliable protocol, is often found to be none, as it is used mostly in small well-behaving networks (LAN), were the chances of congestion are small, compared to the wild internet (though even in the wild internet you find crucial services that build on top of UDP - the most important is probably DNS).
however, i think the reason why OSC is used mostly with UDP is slightly different: the first OSC implementations only used UDP. furthermore, iirc the original OSC draft only mentioned UDP as a transport protocol (though it also claimed to be "transport portocol independent").
since OSC is a packet-based protocol (data is sent in atomic chunks), and UDP is one as well, they match quite well. TCP/IP is a stream-based protocol (data is sent serially; all chunk information is lost), which means, that you have to add some packetizing mechanism. the OSC specs that first mention TCP/IP (OSC-1.0) also mentioned such a packetizing mechanism (prefix each chunk with it's length), but unfortunately they chose a very bad packetizing algorithm (unrecoverable when you have drop-outs or otherwise miss parts of the stream). this was only fixed later (OSC-1.1, in 2009!), when serial procotols were explicitely requested to use SLIP as a packetizer.
to cut a long story short: in the beginnings, most OSC implementations *only* supported UDP. that's why OSC is still most often used on top of UDP.
fgmasdr IOhannes