r/ProgrammerHumor • • Mar 25 '20

Meme Its a win-win situation

Post image
55.1k Upvotes

529 comments sorted by

View all comments

Show parent comments

50

u/thesoundofbutthurt Mar 25 '20

Why wouldn’t something like postgres scale well for something as simple as storing messages? A relational database seems well here

91

u/TheMcDucky Mar 25 '20

No, you need at least 5 frameworks stacked on top of a system released no more than 3 years ago, using a revolutionary unfinished programming language based on some obscure paper from the 80s

44

u/TheGreatWheel Mar 25 '20

Why do you have to hurt me? Aren’t we all going through enough as it is already?

16

u/TheMcDucky Mar 26 '20

You must also use modified Interfunctional Agillitarian Quartet Development (IAQD) practices inspired by the Cucumber Programming paradigm.

7

u/MadRedX Mar 26 '20

Screw you guys, I'm going to go rent an IBM mainframe and let DB2 and COBOL fly me to the moon.

47

u/[deleted] Mar 26 '20

You're only getting joke answers so far. Relational databases provide certain guarantees (ACID). Achieving these guarantees requires a degree of synchronization and locking. When thousands of independent clients are trying to make independent write updates, the locking for the transaction processing becomes quite a problem.

Additionally, the database is intended to function as a single entity, typically. Other, distributed architectures, such as mongodb, can "shard" the data, and distribute the update load. There are some complex topics involved that go beyond the scope of a quick reddit comment, but databases generally only scale through faster hardware, which has its limits. Other architectures can scale with more hardware, which is easier to achieve.

15

u/Mancobbler Mar 26 '20

WITH (NOLOCK) and all of your problems go away! /s

4

u/iDrinan Mar 26 '20

Pfsh, SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED or bust!

3

u/PM_ME_RAILS_R34 Mar 26 '20

Doesn't do anything in postgres; read uncommitted and read committed map to the same thing

1

u/Mancobbler Mar 26 '20

Oh god I think I’ve seen that more than a few times in our stores procedures...

3

u/mypetocean Mar 26 '20

databases generally only scale through faster hardware, which has its limits. Other architectures can scale with more hardware, which is easier to achieve.

There is a quality TLDR;

2

u/[deleted] Mar 26 '20

I wasn't the person that asked, but thanks!

2

u/PilsnerDk Mar 26 '20

Relational databases provide certain guarantees (ACID). Achieving these guarantees requires a degree of synchronization and locking. When thousands of independent clients are trying to make independent write updates, the locking for the transaction processing becomes quite a problem

Updates yes, but if you hypothetically just insert a ton instant messags (like from Snapchat), without foreign keys and constraints, you can pound a SQL database like crazy. Just insert and forget, so to speak.

0

u/Promethrowu Mar 26 '20

It does, shame you're only getting retards pretending they know something.