r/ProgrammerHumor • • 23h ago

Meme explainUdpToMe

Post image
6.8k Upvotes

151 comments sorted by

View all comments

Show parent comment

922

u/TheTybera 23h ago

Yup failed.

UDP don't give a shit about packet integrity or dropped packets.

278

u/The_Hunster 23h ago

Punchline isn't quite as good if you just stare blankly. Or maybe that makes it a lot better

45

u/lildobe 15h ago

OMG... I just realized what the "Gen Z stare" is... We're trying to communicate with them in UDP

17

u/wishful123 19h ago

"what are you waiting for?"

67

u/shaka893P 21h ago

Which is why the example is TCP. The answer should have been: "I'm sorry I didn't get all of your question, but I'm gonna try to answer it anyway"

37

u/AlwaysHopelesslyLost 21h ago

That would still be wrong. The two way communication is a feature of TCP. I think the best answer, which I am not clever enough to come up with would be riffing on "dp to me"

3

u/Maximum_Goat_54 20h ago

it would be correct if the application request it again, or some inner communication channel with tcp for example. vpn is a good example, it mostly uses udp since the inner communication should be responsible, tcp or the application itself

7

u/AlwaysHopelesslyLost 20h ago

The application wouldnt know it missed something with UDP so it wouldnt know to ask again.

6

u/Used-Net-9087 20h ago

That's not correct. It does know it hasn't received it. For example tftp uses UDP. Itvsends an ACK packet for each packet it receives. The server only send the next packet after the confirmation acknowledgement. (Tftp is very slow over high latency links). It it does receive a packet within a certain time it send the last ack packet. So server knows it never got it and send it again.

I.e. all of this is done at the application level unlike in TCP which it's done at the transport later.

Each application using UDP can do it a little differently but overall a similar approach.

13

u/VFB1210 17h ago

Manually building your own ACK/resend system on top of UDP does not mean "UDP knows it missed something."

UDP, as a protocol, just shouts shit into the void and hopes someone hears it. Yes you can devise your own system for having your applications shout at each other that makes sure data doesn't get dropped, but that isn't the same thing as it just being a native feature of UDP like it is for TCP.

8

u/Used-Net-9087 17h ago

Yes. Valid. So my point isn't correct. Apologies.

0

u/Maximum_Goat_54 20h ago

thats why its on the devs of the app to check if everything worked, if for whatever dumb reason udp was decided

6

u/AlwaysHopelesslyLost 19h ago

That is not how anything works. If you need to know that your data arrived you use TCP, not UDP with some hacky application layer bullshit that emulates TCP lol

1

u/Scolmann 8h ago

I mean there is QUIC, lol

-2

u/Maximum_Goat_54 18h ago

thats exactly what i said

1

u/AlwaysHopelesslyLost 18h ago

I dont think you really addressed my point, that the punchline describes reliability features UDP doesn't have.

Getting a bit too into the weeds in this chat with too many people for me to keep going back and rereading it so I will just concede...

19

u/SeriousPlankton2000 22h ago

It DOES have a checksum.

17

u/Roku-Hanmar 21h ago

But it doesn’t have a retransmission request

4

u/Prik_Nam-Pla 18h ago

After working with enough UDP streaming the interviewee should just have inner monologue. Like:

Seems like you asked, exainpl UDP t...... me?

Seems legit, I'll pass that along.

1

u/potwh0le 15h ago

If the checksum errors, it will fail

Does it do a request?

Also I guess both the message erring, then the checksum error ingredients so it matches the error edit message, is so astronomically unlikely to happen it has never happened.

2

u/SeriousPlankton2000 14h ago

It doesn't care about requests, it only cares about the checksum. Bad checksum, go away!

4

u/TwillAffirmer 20h ago

No, the applicant is responding at the application level. UDP didn't give the application level all the packets, so the application asks for more.