5 ms·
JSON in Postgres is so fast... it's definitely not used widely enough. I'm not even sure why people would use something like Django Rest Framework, when Postgr
by mozumder 10y ago
JSON in Postgres is so fast... it's definitely not used widely enough.
I'm not even sure why people would use something like Django Rest Framework, when Postgres outputs JSON directly from a query.
- keshab 10y agoBecause it is easier to maintain Python code rather than SQL.
- icebraining 10y agoBecause they want a RESTful endpoint, not JSON-over-SQL. Would you open that up as a public API with free registration? How do you do access control using OAuth? How would you do stuff like convert images to thumbnails, extract text from PDFs or send an email?
- mixedCase 10y agohttp://postgrest.com/ http://postgrest.com/ Anything more complicated than that, and I'd recommend a simple Go application.
- icebraining 10y agoBoth of those are adding a layer over Postgres; they are still "something like Django Rest Framework". Whether it's written in Python, Haskell or Go is not really the point I was making.
- mixedCase 10y agoThere's a lot of substance to the stack chosen. The performance Haskell or Go offer over Python let alone Django, a fat framework, make them far better picks for thin wrappers around an RDBMS.