4 ms·
Pointless extra API layers is why our software is slow. What is the reasoning for this except "simple access"? It's not simple when it adds another API on top
by lazyjones 12y ago
Pointless extra API layers is why our software is slow.
What is the reasoning for this except "simple access"? It's not simple when it adds another API on top of an already existing one, that it needs to be kept in sync with. If Android cannot use the normal binary API (which is nowdays pretty secure, compact, bug-free), then Android needs to be fixed.
- asuffield 12y agoWhy would it be an extra API layer? This appears to be building an HTTP API directly onto postgres, so that instead of: app <- http -> web middleware <-> libpq <-> postgres You would just have: app <- http -> postgres HTTP is also pretty secure, compact, and bug-free, and has the added advantages of being the universal firewall tunnelling protocol and implementing every authentication mechanism ever invented. It also does compression-on-the-wire, which postgres still doesn't have for its byte-packed protocol, and you don't need as much extra code to interact with it because everybody has an http client already. What is the reasoning for using the postgres protocol? I'm not really seeing any advantages compared to HTTP.
- jeffdavis 12y agoThe postgres protocol is stateful, which is necessary for multi-statement sessions (and obviously for multi-statement transactions), as well as COPY. Emulating it in a stateless protocol is much messier. It's also a lot faster and easier to parse. With HTTP you don't even know how big the request you need to parse is until you've done some parsing.
- jeffdavis 12y ago"universal firewall tunnelling protocol" That obviously defeats the purpose of a firewall, so firewalls will either be eliminated, or will go deeper to do filtering. "[HTTP is] compact" Not particularly.
- lern_too_spel 12y agoThe advantages compared to HTTP are similar to SPDY's advantages compared to HTTP -- connection multiplexing, compact message format, and server push. HTTP is wholly unsuited for use as a high performance RPC protocol.