Live data from Hacker News

Is it just me or is networking really hard?

gafferongames.com

151–160 of 188 posts

Re: Is it just me or is networking really hard?

#151

It's not that networking is really hard, it's that development of synchronized games that run over unreliable links is really hard. If you want a simple solution for a simple game, here's one. Use a fixed-format UDP packet to pass current location and orientation of the player and whatever else changes rapidly. This should be stateless; if you lose a packet, the next one has a full state update. This is enough for a…

> This should be stateless; if you lose a packet, the next one has a full state update. This is enough for a simple FPS game. Also enough considering packet reordering? And corruption?

the next packet should come within a few milliseconds so yes.

but I see your point adding a simple counter might be somewhat useful ignore any packet that has a Lower counter value.

coruption there is generaly enogh checksums in earlier layers so that it is neglisheble.

Re: Is it just me or is networking really hard?

#152
post #115

Earlier quoted context omitted.

How many networks are actually healthy, though? Networked gaming is less about a hardwired LAN and more about reliably synchronizing state using your crap wifi in a oversaturated band when Comcast hasn't repaired the infrastructure I your neighborhood in years. In other words, a healthy network is the edge case.

Sure there are people with rotten last mile conditions, but healthy networks are the normal case. You get subpar download speeds with http and choppy skype/facetime/ssh if your network drops packets frequently. It's bad for business from the ISP POV. Using UDP will not work around the conditions you describe, game will still be laggy and choppy.

Downloads will work just fine if you're dropping .1% of packets. Skype is very resilient to dropped packets. Console use isn't quite so fast that a half-second hiccup is a big problem.

But a naive game implementation over TCP will stutter badly and obviously every time.

Re: Is it just me or is networking really hard?

#153
post #118

As a network engineer, this was great. No body never bothers to learn networking. The article is annoying tho, basically says use UDP idiots. I mean, why do we think VOIP uses UDP? Same concept. If only more devs would implement multicast...

Isn't the problem with multicast is most networks filtering it out or not supporting it? Thus it only stays useful for the LAN network scope? So I cannot just multicast to 5000 random IPs on the internet.

Not supporting it because why though? IP multicast routing requires end-to-end state for each (source , group). Further, the boxes on the market for doing multicast (not a little GPCPU router) have limitations concerning how they do multicast within the box that makes scaling multicast a real pain (basically, internally, they will send forwarding engines traffic they don't need and choke up there because it runs out of internal ways to express the separate streams).

Some of this can be shortcut by tunneling techniques, but it is just masking the situation and adding another layer of network complexity (in an area where humans still try to manage/troubleshoot mostly by hand).

Re: Is it just me or is networking really hard?

#155

I 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-…

> Are we miseducating our so-called "full-stack" engineers by not offering them a basic understanding of telecom? Or are they not listening? 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…

Before nodejs people started calling themselves "full stack" for doing JavaScript on the fronted and the backend, full stack meant everything from knowing networking hardware to kernel insides to databases to application servers to front end html/css/javascript frameworks.

Re: Is it just me or is networking really hard?

#157
post #23

Earlier 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.

His articles are excellent , and I've learned a lot from them myself. But I cannot sympathise with lowering the level of a technical discussion to personal insults.

there's a difference between being angry at people and insulting them. he was definitely pissed off, but he didn't insult anyone.

Re: Is it just me or is networking really hard?

#158
post #23

Earlier 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.

Does nickpsecurity's breakdown of the reason for the rant help you to understand its appropriateness?

https://news.ycombinator.com/item?id=10212003

Please take the time to read and digest nickpsecurity's comment in its entirety before forming an opinion about it.

Re: Is it just me or is networking really hard?

#159
post #122

"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 multicast is widely used by financial trading networks to distribute state-of-the-market updates. Getting those networks to work reliably (ie. right groups distributed to right places with minimal packet loss, reordering, latency and jitter) is orders of magnitude more difficult than getting unicast traffic working.

I don't think it's going to happen. Our current networks can't even do unicast well (eg. bufferbloat, general ISP randomness).

But I'd be keen to read the OP's rants if someone tried ...

Re: Is it just me or is networking really hard?

#160
post #111

Earlier 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.

I think 'never implement your own crypto' really means, 'this is an area where there is no substitute for knowing what the hell you are doing. Sometimes knowing what you are doing is not hard (changing a tire), sometimes it is (cryto and networking)
Post reply on HN