[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] TCP default?



Comments inline:

El 30 dic 2016, a las 05:56, Chris Sattinger <crucialfelix@xxxxxxxxx> escribió:


 I don't think I've ever noticed a dropped message, but I'm sure this happens if you are on the real internet.


I've never been able to attribute problems to dropped/out-of-order/duplicate packets (how would I?), but I definitely have had people execute some code, say "oh weird, it's not working right - let me run it again" and have it work the next time. I bet we've all experienced that. UDP can definitely be a source of that type of bug, even on localhost.


>
> Good article about why you should always use UDP for realtime games:
> http://gafferongames.com/networking-for-game-programmers/udp-vs-tcp/

This seems to be a very good argument to just implement any necessary feature specifically on top of udp where you need it.

I read the article and I'm not convinced. The article is talking about streaming *huge* data across the globe with many concurrent users (e.g. the 1/5 of a second packet resend example is light-years from what we're doing).

The typical use-case for SuperCollider is:
  - server on localhost
  - each message is probably important. E.g. if we miss a /n_free it's a lot more important than if a massive multiplayer game misses one user's xy-coordinate update.

Sure, we could write a custom acknowledgement protocol for ourselves but TCP already gives us this -- and it's basically free on localhost. And it's already been written in SC, so it's less work.

In my view, we should take the free goodness of localhost TCP, then if the user wants to switch from localhost, they then can make an informed decision about risking lost/duplicated/out-of-order messages.

Tom