top | item 31329536

(no title)

kall | 3 years ago

Isn't an average next app pretty much a monolith? It gets split into lambdas when you deploy it, but the development experience feels monolithic to me.

If I want to use some function, I often just import it and call it directly, instead of calling one serverless function from another over http. That means the function gets bundled into a few lambdas, but so far, I've had no issues with that. The monolith abstraction hasn't really leaked for me.

discuss

order

dfee|3 years ago

I'm all for a monorepo – or to a lesser degree, utility functions that are re-usable across components. That's not what I'm talking about.

Running NextJS as a handful of lambdas is fine, but you still likely need to initialize other services in the background (like databases)... otherwise you have a monolithic front-end... as in: "my monolithic front end talks to my monolithic back end, so I really have two micro/macro services", and maybe I should investigate breaking the FE/BE down into smaller components".

sure, you can use pgbouncer, etc. but it becomes sorta cost prohibitive to run a few apps.

kall|3 years ago

Monolith + a database, that's always implied, isn't it?

How you make the database connection work with serverless connection requirements seems like a minor issue. I haven't used it but it seems like next + prisma (+ tailwind lol) is the default stack of tutorial writers these days.