News for hackers. Stuff that matters.
Re:Prefer Strict Tables in SQLite by nine_k on Saturday July 11, 2026 @06:30PM (#48876452)
The difference is that when you add all these mechanisms yourself, you can do it differently than TCP does, sometimes to a great effect: see QUIC and HTTP/3.

OTOH I don't see a similar superpower arising from handcrafted data type enforcement over (non-strict) SQLite.

Re:Prefer Strict Tables in SQLite by astrobe_ on Sunday July 12, 2026 @06:05AM (#48879863)
Yep. More generally the correct reason to prefer UDP over TCP is the fine-grained control you gain. When you want that and have to use TCP, you're in for a deadly fight against the OS and its TCP/IP stack.

Datagram is also quite often more fit for applications than streams, because many applications are message oriented. The Websocket protocol acknowledges that even though over TCP. But that's more a bonus point than a strong reason to choose UDP over TCP, one can always recreate packets/messages on top of TCP. It's a bit goofy though, because TCP uses IP packets.

A lot of online games with significant real-time constrains and many-to-many connections gladly use UDP - and similarly, video conference services also use it. Smaller protocols like DNS and NTP as well.

There are other arguments beside real-time streaming with acceptable data loss, see [1] and the "end-to-end argument" paper it links in particular.

Choosing UDP and ending up recreating some of its reliability and flow control features is not a "Uh, Oh..." moment. It's normally a deliberate choice. Sometimes you do need custom wheels [2].

[1] https://deepplum.com/post-b/

[2] https://en.wikipedia.org/wiki/Mecanum_wheel