Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

While this talks mostly about data warehousing, oftentimes denormalization is useful for everyday web app data storage. If your web app (usually on Postgres) is mostly frequent reads and rare writes (most web apps are) — there's no excuse for your pages to load slower than a static site. Store your data as normalized as you want, add a denormalized materialized view, update it on writes, render pages based on the view.

Of course I'm talking about 95% of the apps where this is acceptable, not 5% where table locking can cause problems, leading to the need for concurrent update handling.



i think i heard once that there are only a few problems in computer science, including off-by-one errors, and concurrent update handling

oh yeah and overengineering, probably


Concurrency.""There are three hard things in computer science: cache invalidation, naming things, off-by-one errors, and

Original quote:

   There are only two hard things in computer science: cache invalidation and naming things. — Phil Karlton 
The one that most people know:

   There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors. - Jeff Atwood


- Knock knock

- Race condition

- Who's there?


95% of the apps don't need a database. Just store data in files. one layer less to worry about.


> there's no excuse for your pages to load slower than a static site.

Indeed all web pages should be static pages. Anyone still doing server-side rendering in 2023 and defending it for any use case at all needs to turn in their badge.

Same goes for people promoting frameworks like react or vue for anything but sufficiently complex web apps.


Uh, what? Let’s take this very site. How do static pages work for logged-in users?


Strong statements without any substance behind them like yours are not helpful in my opinion.

So how about something a bit more nuanced: choose the right tool for the right job.


The whole SSR revival thing in frontend right now seems to exist only to game SEO and has no benefit for the user.


There is real speed gains to be had.

Typically your server is right next to the database. The end user isn't, so being able to give their first view being right, without an extra trip around is pretty good.


What do you think about Remix Run?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: