3 ms·
Sure, keep the SQL. Just make it a field in a JSON POST payload, and send the results back as JSON. The "drivers in almost every language" suck. They all suck.
by throwaway204 8y ago
Sure, keep the SQL. Just make it a field in a JSON POST payload, and send the results back as JSON.
The "drivers in almost every language" suck. They all suck. I've never seen a SQL driver and wire protocol that was not awful in some way. The statefulness is part of what makes them awful. We have better ways to keep track of state now.
- pritambaral 8y ago> I've never seen a SQL driver and wire protocol that was not awful in some way. Have you seen the PostgreSQL wire protocol[1]? I recently built a logical replication client driver for a project and found the protocol to be excellent. After looking at the documentation, I'm no longer limited to languages that have drivers for Pg, because I know how easy it'd be for me to just write one. Just because some SQL drivers and wire protocols are awful (looking at you, Oracle[2]) shouldn't mean one should go running to the hills, let alone to JSON. ---- 1: https://www.postgresql.org/docs/current/protocol.html https://www.postgresql.org/docs/current/protocol.html 2: https://noss.github.io/2009/04/28/reverse-engineering-oracle-protocol.html https://noss.github.io/2009/04/28/reverse-engineering-oracle...
- int_19h 8y agoAn HTTP/JSON protocol doesn't have to replace the standard one. But having such a standard protocol makes sense in the age of web apps, particularly when NoSQL offerings that are perceived by the market as competitors (leaving aside whether they really are - perception matters more here) do that already.
- pritambaral 8y ago> An HTTP/JSON protocol doesn't have to replace the standard one. So, two protocols? Two standard protocols is rarely better than one. > having such a standard protocol makes sense in the age of web apps Only if the existing standard protocol cannot work with the "web", and we have plenty of history proving otherwise. Replacing the existing standard with the loose JSON would be, strictly, a downgrade; and unnecessary, because we already do interoperate JSON and SQL. See: PostgREST and the many REST & GraphQL frontends on PostgreSQL. > particularly when NoSQL offerings that are perceived by the market as competitors (leaving aside whether they really are - perception matters more here) do that already This is really more of going into a pig's pen and wrestling with them. A database should do the job of a database. Competing for perception in a market that cannot make sane decisions for itself is how we get MongoDB.
- deleted 8y ago[deleted]