3 ms·
If your app works with data in the DB and nothing else, sure. What if you have complex integrations of external services, need to serialize and parse huge JSON
by throwaway11460 3y ago
If your app works with data in the DB and nothing else, sure.
What if you have complex integrations of external services, need to serialize and parse huge JSON or XML, do processing on the data and send it back and forth, accept and trigger webhooks...? That's the workload I'm imagining would be easier to scale on a separate app server.
- gregjor 3y agoYou use the best tool and write code at the appropriate layer. I don’t think anyone suggests writing the entire application in the database (though you can with Oracle). UI and interfacing with external services will most likely prove simpler to implement in an application layer. Google and Stripe don’t have SDKs for Postgres. If the application needs a relational database at all it makes sense to get the most value out of the RDBMS.
- throwaway11460 3y agoPostgres has extensions to make HTTP requests, to write JS (etc) code, and so on. Check out Supabase, the goal is exactly this - use Postgres as your whole application layer, Supabase as the access point.