5
sleek
2y

was developing a custom website for a friend, coz i primised him id do so.

but when i actually developed it i felt lazy midway so i made one table store json strings and used it for every type of data he has on his website.

everything works fine and fast, its nothing he would notice but...

am I going to hell?

Comments
  • 7
    I mean, that's basically what nosql databases are, so you're good.
  • 7
    No such thing as free lunch
    Beggars can’t be choosers
  • 6
    You've already entered hell with the first sentence of this rant. It's just that you may not have noticed yet.
  • 2
    "i made one table store json strings and used it for every type of data"

    ...

    ...

    ...

    sooo when someone asks you "how evil are you" - you just say "yes"?
  • 0
    Don't tell me it's also single threaded.

    Setting up an SQL database just to store unstructured JSON and access it from a single thread is the finest example of wasted effort I can imagine.
  • 1
    @lbfalvy 😶...

    well php is single threaded but i guess nginx would spin up a php process for each request 🤷🏻‍♂️
  • 1
    @sleek No it doesn't, at least not if you set it up properly, but it is a bit concurrent. PHP can be ran as a plain CGI script which spawns a new OS thread, or with FPM which manages a process pool. The idea is that if you already have as many processes as CPU threads and they're not all waiting on network responses from a different machine, spawning a new process will just increase lock contests and slow everything down so it's better to wait for one of them to finish.
  • 0
    @sleek Anyway, then at least you benefit from the concurrency of an SQL server.so it's not completely pointless.
  • 0
    Assuming of course that the website receives enough traffic for two requests to ever coincide.
Add Comment