2 ms·
> Surely they're not meaning let front-end code hit the database directly? Why not? You can make Postgres speak SQL or GraphQl it removes an additional networ
by dathinab 4y ago
> Surely they're not meaning let front-end code hit the database directly?
Why not? You can make Postgres speak SQL or GraphQl it removes an additional network indirection and there are very clear ways about how Posgres does scale well and where it doesn't scale well. (EDIT: Or put a dump translation layer/service in-between they exist to and are cheap to run and manage.)
You can write your core logic in JS, Rust etc. and plug it into your database as virtual tables or shared procedures (it's surprisingly simple).
Any DDOS protection and similar is anyway in front of whatever you write as some form of proxyish thing.
And just needing to scale Postgres instead of a bunch of different systems is so much more simple. Depending on how you run it and what input characteristics you have it might even be more efficient and cheaper to scale that way (or it can be noticeable more expensive) and it's most times cheaper to manage.