this post was submitted on 13 Jun 2024
43 points (100.0% liked)

TechTakes

42 readers
15 users here now

Big brain tech dude got yet another clueless take over at HackerNews etc? Here's the place to vent. Orange site, VC foolishness, all welcome.

This is not debate club. Unless it’s amusing debate.

For actually-good tech, you want our NotAwfulTech community

founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] V0ldek@awful.systems 31 points 5 months ago (56 children)

You also definitely shouldn't be using String non-monotonic UUIDs for primary keys in a database, like, literally ever, but what the fuck do I know, I just do databases for a living, I'm not the all-knowing GPT code wizard.

[–] Imacat@lemmy.dbzer0.com 5 points 5 months ago (47 children)

UUIDs make great primary keys in some applications. If you generated 100 trillion UUID4s, there’s about a 1 in a billion chance of finding a duplicate. Thats usually good enough for my databases.

The issue here was that they used a single UUID instead of generating a new one for each record.

[–] Hexarei@programming.dev 4 points 5 months ago* (last edited 5 months ago) (9 children)

They're good for large, distributed applications for sure. Better than incrementing integers for those kinds of applications at the very least.

For the folks in the article though? lol they were making no good decisions

[–] gnomicutterance@awful.systems 14 points 5 months ago* (last edited 5 months ago) (1 children)

when you do not yet have (1) customers, (B) unit tests, (ג) developers who can write their own code, or (IV) exception handling, the term-of-art that comes to mind for doing anything besides auto-incrementing primary keys is YAGNI. (Especially because nobody who is making thoughtful, careful database tuning decisions is using chat-gippity to convert their models. And more to the point, they aren't using SQLAlchemy of all things to make large, distributed applications that need UUID primary keys.)

[–] Hexarei@programming.dev 3 points 5 months ago* (last edited 5 months ago) (1 children)

Oh for sure, the article folks are inept and absolutely not the people I was talking about. I'm just talking about stuff more like Discord or Steam that are huge distributed systems that don't use centralized databases.

Edit: that don't use centralized databases. I blame the ADHD.

Edit 2: I am agreeing with this person

[–] ebu@awful.systems 9 points 5 months ago (2 children)

I'm just talking about stuff more like Discord or Steam that are huge distributed systems that don't use databases.

huh???

[–] Hexarei@programming.dev 8 points 5 months ago (1 children)

Whoops, I flubbed that message hard and didn't catch it at the time: Meant to say "don't use centralized databases." They definitely use databases lmao. No idea how I screwed that message up so hard. I blame ADHD for not proofreading.

Just so we're on the same page, let me be more specific. I'm saying the individuals in the article were making terrible decisions. Lots of them.

I am also saying that UUIDs are good primary keys for very specific purposes: Large, distributed systems that handle large amounts of small data, powered by databases like Cassandra that are designed to handle millions of record insertions per hour across several hundred nodes, to the point where inserts are very likely to happen at the exact same time on two different replicas of the same schema.

Hope that makes more sense than my previous flub. lol

[–] ebu@awful.systems 5 points 5 months ago* (last edited 5 months ago)

okay that's a little more sensible lol

i think the original comment that this thread is in reply to is avoiding non-monotonic UUIDs. i don't think anyone is contesting that autoincrementing ints create headaches when trying to distribute the database

[–] froztbyte@awful.systems 5 points 5 months ago (2 children)

See, reason being is they use aethernet - that’s the only way you get to get scale it like this. Without that, communication and storage would just be impossible!

[–] Hexarei@programming.dev 8 points 5 months ago (1 children)

I accidentally a word in the original comment, it was supposed to say they don't use *centralized databases. Instead it said I'm a moron lmao.

[–] froztbyte@awful.systems 5 points 5 months ago

Bit of a whoopsie, that :)

[–] froztbyte@awful.systems 6 points 5 months ago

And I just saw what that poster’s domain is, fuck me

load more comments (7 replies)
load more comments (44 replies)
load more comments (52 replies)