"You can’t even imagine a way that reliability could be implemented on top of UDP that beats TCP? What total bullshit" This. This "TCP already does it best in every situation" is a common trope usually spouted by people who know nothing about what TCP does and why. The easiest way to get over this misconception is to ask yourself, can you think of a protocol that not only works well over all sorts of networks, all th…
UDP is used when it's designed by network engineers. That's why we have VOIP and video streaming - all are served UDP. dont get me started on the lack of multicast out there. imagine game servers running multicast. one day.
Is it just me or is networking really hard?
131–140 of 188 posts
Re: Is it just me or is networking really hard?
#132I know this attitude all too well. I've replied to a few questions on gamedev.stackexchange with pointers to the usual articles on game state synchronization and lag compensation, and I get lukewarm reactions of "too complicated" type. Meanwhile mr rpc-over-tcp get tens of up votes and accepted answer. Their loss I suppose.
Our loss, really: less good quality games for everyone.
I threw in the towel at GameDev for reasons very similar to yours ("premature optimization" also comes up far too frequently) - from, what can only be, people who have never even worked on specific components of games that they are claiming knowledge on.
The StackOverflow system somewhat fails on GameDev, because there aren't enough knowledgeable people on the site to issue corrective votes (likely because these people are scarce in general).
Incidentally the bad advice is bad on many levels: even if you somehow ignore UDP it's still bad advice to do "RPC over TCP". TCP works best (fastest, least latency) when the send buffers are full at both ends - which RPC, by definition, does not do. This means that these people simply couldn't have researched the fundamentals of the protocol that they assume to be "good enough," how could they therefore be aware of how it is better or worse than alternatives?
Re: Is it just me or is networking really hard?
#133Earlier quoted context omitted.
To be fair, Gaffer's original articles are well written, thoughtful and informative too. This is him ranting about the unfounded, negative and incorrect feedback he's been receiving about them from people who are willfully ignorant about networking. He could or should have replied with less attitude and more facts, though. I understood what and why he's saying what he is, but I didn't enjoy the negativity either.
An explanation for a behavior is not an excuse for it. Likewise my synpathy for the frustrations that led to someone else's behavior don't make the behavior right.
Re: Is it just me or is networking really hard?
#134"You can’t even imagine a way that reliability could be implemented on top of UDP that beats TCP? What total bullshit" This. This "TCP already does it best in every situation" is a common trope usually spouted by people who know nothing about what TCP does and why. The easiest way to get over this misconception is to ask yourself, can you think of a protocol that not only works well over all sorts of networks, all th…
UDP is used when it's designed by network engineers. That's why we have VOIP and video streaming - all are served UDP. dont get me started on the lack of multicast out there. imagine game servers running multicast. one day.
Re: Is it just me or is networking really hard?
#135Earlier quoted context omitted.
UDP is used when it's designed by network engineers. That's why we have VOIP and video streaming - all are served UDP. dont get me started on the lack of multicast out there. imagine game servers running multicast. one day.
Well... those are examples of designing custom protocols on top of UDP. These network engineers, who I assume are specially trained in some secret govt. facility for network commando training, actually have to understand the problem at hand and design something specifically for the problem. Calling these protocols just "UDP" is like saying something like "I use wheels to commute from home to office everyday"
The fact is that TCP was the MVP for reliable streams of data on the 1970s internet, and is woefully inadequate for modern usage, but we're stuck with it (including its oft-disabled parts like Nagle's Algorithm) because it's what's available everywhere.
Game network protocols are pretty easy in comparison with some of the protocols I've encountered in my day job, especially once you've learned the lessons of people like the author of that article.
Re: Is it just me or is networking really hard?
#136Earlier quoted context omitted.
UDP is used when it's designed by network engineers. That's why we have VOIP and video streaming - all are served UDP. dont get me started on the lack of multicast out there. imagine game servers running multicast. one day.
[deleted]
When online gaming started, it was fairly common to send the entire world state to all clients. Multicast helps when you are sending the same data to everyone. but online gaming started, worlds were small (think Quake I level). However, this type of model does not scale as the world size increases, and eventually the world is too big to send everything to every client.
Plus, cheating. Sending the entire world state to every client, opens up cheating vectors. The trend has been for the game server to send only state that the particular client can actually see or needs. This limits the damage of what a compromised client can do. Plus, it allows the world size to scale up.
Re: Is it just me or is networking really hard?
#137I sometimes ask the question "how does the internet work?" in interviews. The vague and wrong answers I hear are astonishing. I'm looking for a basic understanding of the layering of TCP, or RDP, or ICMP (or anything actually) on top of IP. I don't get that level of insight much. The people who do have that insight usually can go deeper -- slow-start, BGP, etc. I wonder if we have a modern version of C.P. Snow's mid-…
What's that "stack" anyway?
Usually I get the impression that people frontend (user-interface, so usually HTML, JS, maybe a thin web app) and backend (API service, business logic and storage in a database).
Is understanding of the OS, of the memory model, of networking protocols (and possibly even how they are implemented), specifics of file systems etc. part of it? What of the instruction set of the process, of the actual silicon layer? Understanding the physics of the embedded transistors? Understanding the quantum and thermodynamical problems that chip makers run into?
The answer is probably different for everybody who uses that term, since it's a term people use for self-marketing, or for vaguely describing requirements of a job.
Re: Is it just me or is networking really hard?
#138Earlier quoted context omitted.
Gaffer is absolutely not saying 'What the fuck is wrong with you?' to beginners. He's saying it to the so-called experts who posted nonsense like this: "Yeah... Gaffer is well-known as a guide, but also kind of horribly flawed. Question 1 for networking development: Do you need everything that TCP offers? If yes, then use TCP. You're not going to outperform TCP to do what it's good at. If not, read on." This was a gi…
> You're not going to outperform TCP to do what it's good at. I took this to be something more akin to "never implement your own crypto." If everyone followed that advice there would be no crypto, so it's obviously not blanket advice.
https://packetzoom.com/blog/lessons-learned-tcp-slow-start-d...
Re: Is it just me or is networking really hard?
#139Earlier quoted context omitted.
UDP is used when it's designed by network engineers. That's why we have VOIP and video streaming - all are served UDP. dont get me started on the lack of multicast out there. imagine game servers running multicast. one day.
[deleted]
Re: Is it just me or is networking really hard?
#140"You can’t even imagine a way that reliability could be implemented on top of UDP that beats TCP? What total bullshit" This. This "TCP already does it best in every situation" is a common trope usually spouted by people who know nothing about what TCP does and why. The easiest way to get over this misconception is to ask yourself, can you think of a protocol that not only works well over all sorts of networks, all th…
UDP is used when it's designed by network engineers. That's why we have VOIP and video streaming - all are served UDP. dont get me started on the lack of multicast out there. imagine game servers running multicast. one day.
UDP is used when low latency and low jitter is more important than complete information.
For telefony it's better to lose a few packets than to wait a second or two for a retransmit. Some for game state, I believe.
And I do believe that TCP was also designed by network engineers :-)