Live data from Hacker News

Falsehoods programmers believe about TCP

lwn.net

171–180 of 247 posts

Re: Falsehoods programmers believe about TCP

#171
post #162

Earlier quoted context omitted.

> we're assuming perfect communication between the process/driver/hardware receiving the packets and doing the duplicate detection and the process which wants to receive the message exactly once My claim is not that you can provide exactly-once delivery unconditionally. My claim is that if you can provide at-least-once delivery then you can turn that into exactly-once delivery. The word "delivery" is not rigorously d…

I agree with your claim, a recipient can cope with at-least-once delivery by being idempotent. You're right. The meaningful distinction is that something on the recipient needs to be idempotent because the message might get received twice. The application can be oblivious to this, so long as you assume that channel to be perfect. People on the Internet won't like you calling it 'exactly once delivery' because it's no…

> People on the Internet won't like you calling it 'exactly once delivery' because it's not exactly once

That depends entirely on what you mean by "it".

Messages can get lost. So if you want guaranteed delivery, you sometimes have to re-transmit the same message, and so you might end up with the same message being delivered more than once. But it is trivial to put an abstraction layer on top of that to discard the duplicates and make it appear to the application as if every message is received exactly once.

The whole thing is a tempest in a teapot.

Re: Falsehoods programmers believe about TCP

#172
post #135
post #89

Earlier quoted context omitted.

Uhhh....how does the screen show black?

He said it, it is ultimately a turn off.

In case of a LCD, black pixel is turned ON to block backlight. It's clearly visible on monochrome LCD screens.

In case of e-paper, black pigment is attracted to the outer part of the screen.

Re: Falsehoods programmers believe about TCP

#173
post #66

This reminds me of a very particular problem that we tried to solve when I worked at VKontakte. It was about instant messaging and flaky mobile data connections. The problem: you're on a subway train and you send a message as it departs a station. The request does get to the server, but by the time the response arrives, the train is already in the tunnel and you don't have a signal any more. So the client thinks that…

Honest question: Why didn't you send the message's idempotency token back to the client? Then you're playing the familiar local database locking game.

Re: Falsehoods programmers believe about TCP

#174
post #123
post #89

Earlier quoted context omitted.

Uhhh....how does the screen show black?

It depends afaict. OLED screens have a per-pixel light, and they turn off pixels to make black. LCDs have a single large backlight and pixels that the light shines through and they can change color (but not turn off) so in that case they turn as opaque as possible, but don't completely block the light.

And in a CRT the electron beam turns off when scanning over a pixel.

Re: Falsehoods programmers believe about TCP

#175
post #18

Earlier quoted context omitted.

Depends on OS settings these days. Lots of OSes want to help and detect link down and reset all your connections. Kind of a pain when you just want to move a cable.

Like Chrome’s oh so helpful ERR_NETWORK_CHANGED

Drives me insane on Android with a VPN

Re: Falsehoods programmers believe about TCP

#176
post #67

Earlier quoted context omitted.

I believe the article that started it all is https://www.kalzumeus.com/2010/06/17/falsehoods-programmers-... - crucially every entry is self-explanatory, which is a point that a lot of the subsequent “Falsehood…” list authors miss.

I wonder what he means by France having a “weird” naming system in common use. As far as I can tell, the traditional French naming system works exactly the same way as the traditional American one (except that it’s more common for French people to have several middle names rather than zero or one, but I don’t think that’s too rare in the US either). Maybe he’s referring to the fact that some last names are two words…

> I don’t think that’s too rare in the US eithe

Anecdotal, but the only people I've met in the US with more than one middle name are people who originally came from another country.

Although, I wonder if maybe that is enforced by the fact tha legal forms and similar typically assume you only have first, last, and optionally a (single) middle name.

Re: Falsehoods programmers believe about TCP

#178
post #157

Earlier quoted context omitted.

TCP is at least once, not exactly once. Here's another useful article: https://blog.bulloak.io/post/20200917-the-impossibility-of-e... TCP does not solve the two generals problem. TCP gets around this limitation by requiring only one ACK. https://en.wikipedia.org/wiki/Two_Generals%27_Problem#Engine... https://www.scaler.com/topics/computer-network/two-generals-...

OK, but you have to do a little extrapolating here because the claim is not that you can do exactly-once under all circumstances. That is obviously false because you can't do exactly-once in a situation where all comms are down indefinitely. My claim is that if I have at-least-once then I can build exactly-once out of that.

This isn't about indefinite communication loss. Obviously no progress is possible in that case. The two generals' problem has nothing to do with a permanent failure.

I think there is a lot of literature out there if you're really interested in understanding and I'm happy to provide more links if you'd like.

Re: Falsehoods programmers believe about TCP

#179

I find this "falsehoods programmers believe" format of making pointed claims that you intentionally don't clarify to be unhelpful and obnoxious

I think these lists are often primarily intended as humorous, and perhaps a way to get you thinking about exceptions, not as a way to teach you more about the topic.

Re: Falsehoods programmers believe about TCP

#180
post #123
post #89

Earlier quoted context omitted.

Uhhh....how does the screen show black?

It depends afaict. OLED screens have a per-pixel light, and they turn off pixels to make black. LCDs have a single large backlight and pixels that the light shines through and they can change color (but not turn off) so in that case they turn as opaque as possible, but don't completely block the light.

There is also things like microled. Which means that there is bunch of small(bigger than multiple pixels) lights that turn on and off as needed.
Post reply on HN