3 ms·
First, it's a pretty cool PoC. Kudos on that. Back in the 90's we used to call direct access from the client "fat client" and we stopped doing that. We moved t
by invalidname 5y ago
First, it's a pretty cool PoC. Kudos on that.
Back in the 90's we used to call direct access from the client "fat client" and we stopped doing that. We moved to n-tier with the server in the middle. It takes more work but we still did that move. Here's why:
* Writing logic in server code is easier
* SQL servers are more powerful and harder to secure
* Caching and scale - direct DB access just couldn't handle even 90's traffic
* Vendor lock-in - pretty much everything here is Postgress specific
I haven't kept up on DB progress as much as I should but honestly, most of what you have here can be done in a few lines of python and maybe a bit more in Java/Spring Boot/NodeJS etc.
I'm trying to think of a use case for this other than "we can do that cool thing". Can't come up with it.
- nileshtrivedi 5y agoThe use case is what I mentioned in the article: Easier development and deployment of open-source, self-hosted apps. This paradigm makes things a lot easier both for the user and the volunteer developers. It simplifies the 3-tier architecture (DB, server, client) into effectively 2-tier because the server environment is replaced by a standard binary (PostgREST) with zero hand-written code. This is 33% improvement in language/framework complexity if nothing else. If needed, one can also write postgresql functions/triggers in Javascript/Python/etc for productivity - although this doesn't seem to have taken off yet.
- dvdkon 5y agoIn a "typical" 3-tier app, you need a specific, explicitly written handler for each combination of data type, filtering, aggregation and output. That might not be a big deal if the amount of endpoint variants roughly corresponds to the amount of custom views in your app, but not every app is like that. Quite a few make do with just a few general views like a table, form and maybe map. Having to write explicit server-side handlers for every query variant means abstracting these views on the frontend is not viable, so apps with some 100 tables and little table-specific functionality take much longer to make and are much less flexible. It might just be personal bias, but I think these kinds of projects are common and important. They're near invisible, but even small-ish companies need somewhere to store their domain-specific data, and we should be thinking of ways to make that kind of software better.