postgres icon indicating copy to clipboard operation
postgres copied to clipboard

Built-in http/Https server for query execution.

Open ansarizafar opened this issue 4 years ago • 6 comments

Orioled is an amazing idea. Currently, we can not directly access postgres from edge environments like Cloudflare workers and we need to develop a Rest API/Graphql server to access postgres from Jamstack apps. Postgres already has strong built-in row level security and If Orialedb can add a http/https/ server endpoint for executing sql statements directly then we can access postgres from web/mobile application directly without having write our own rrest APIs/Graphql server.

Here is further explanation of this idea https://tonsky.me/blog/the-web-after-tomorrow/

I request you to please consider this proposal.

ansarizafar avatar Jan 03 '22 11:01 ansarizafar

Hasura does what you seem to want.

njaremko avatar Feb 25 '22 05:02 njaremko

I don't want to use another layer on top of Postgres. A buit-in Http server will solve lots of problems and will make developers life very easy.

ansarizafar avatar Feb 25 '22 05:02 ansarizafar

Sounds like a horrible idea to me.

The fact that you could "avoid" something and "make your life easy" doesn't mean its a good idea, as it makes life of the people maintaining the database hard, especially when there are already off the shelf solutions to your problem.

This new interface would then require maintenance forever, just because "you don't want to use another layer".

AudriusButkevicius avatar Feb 25 '22 11:02 AudriusButkevicius

What does HTTP server have to do with a storage enhancement?

Beyond that, I agree that it's not a good idea. Microsoft tried the same thing in SQL Server in 2008 and had to rip it out -- with no deprecation path, and after only a single release cycle -- due to all of the problems it caused. Database management systems are not, and should not be treated as, application servers.

amachanic avatar Mar 03 '22 14:03 amachanic

The transfer bumped this for me. In case someone ever stumbles on this. Directly hosting an API from Postgres is probably a bad idea, but there's PostgREST and pg-graphql and hasura if you want thin wrappers around your DB.

njaremko avatar Feb 27 '23 04:02 njaremko

I don't want to use another layer on top of Postgres. A buit-in Http server will solve lots of problems and will make developers life very easy.

@ansarizafar A long time ago, in a galaxy far away:

https://couchapp.readthedocs.io/en/latest/intro/what-is-couchapp.html

These days, ArangoDB provides the Foxx language.

millette avatar Feb 28 '23 21:02 millette