3 ms·
But why can Postgres not be promoted to the "application level"? If you combine it with a few extra tools like an auth service and an HTTP API adapter, the need
by rvense 6y ago
But why can Postgres not be promoted to the "application level"? If you combine it with a few extra tools like an auth service and an HTTP API adapter, the need for custom backend code is reduced or removed. Your backend is created declaratively through the schema and policies can be exposed directly to clients.
I have been thinking about this a lot, recently, due to working on a greenfields project where I was allowed to think all the foundational architectural decisions of my past projects through. It's struck me how much of the tedious code I've written in my career has been due to a few features in database systems that were either missing or unknown to me (mainly related to auth and validation). Supabase is exactly the kind of system I have been working towards.
You can use Postgres as a dumb datastore, but you'll be replicating a lot of functionality at the "application level" that Postgres already has. And if you're serious about being able to swap it out for another database, you'll either be writing a lot of abstractions, or foregoing some of its great features (e.g. its JSON datatypes) in order to not become too joined to it.
Creating more work for yourself due to some unknown situation that might arise in the future strikes me as an even more unwise decision than tying yourself to a flexible, well-known, and proven open source project. It seems no different than tying yourself to React or Docker or whatever.
- whalesalad 6y ago> But why can Postgres not be promoted to the "application level"? Anything is possible. It can be done. My personal/professional opinion is that you are shooting yourself in the foot by eliminating what is otherwise a very handy abstraction between your business machinery and the underlying system that stores the data.
- programmarchy 6y agoThat’s not really a handy abstraction though, because you ain’t gonna need it. The exception being you scale past Postgres in which case you’re going to need a new architecture anyway. Way better to leverage the robust tooling that Postgres provides rather than rolling your own. Bravo to Supabase for having the technical insight to bring that leverage to the mainstream.