You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider basing our client protocol on an existing underlying stream protocol #3460
HTTP 2.0, possibly using a pool of HTTP 1.x connections for clients that don't support it yet (suggested by @VeXocide)
"because you get HTTPS, authentication free"
WebSockets (suggested by @larkost )
"WebSockets would also be a candidate, but there is not built-in support for it in our languages of (driver) choice"
I personally think there's no strong need for switching from our existing protocol right now, but wanted to put this somewhere for later. In backlog for now.
it does have the concept of multiple streams, but like HTTP2 they are all over a single TCP/IP channel, so you have to wait for one batch before the next (unlike SCTP)
It is similar to HTTP2 in that it gets HTTPS (WWS) for "free" in that you up-negotiate from a HTTPS connection.
There is a lot of libraries that support it, but the languages behind our drivers don't have them built in.
It would make possible having applications without a server-side component from browsers that speak WebSockets already (most modern ones). Our currently lack of authentication/roles on the server would make this a bad idea at the moment.
It is very close to a raw socket in most ways, so more like our current system then http semantics.
Rather than ZeroMQ I think we would have to go with NanoMsg as a contender. ZeroMQ is currently LGPL, with some vague thoughts about moving to MPL, where as NanoMsg is already BSD licensed.
+1 for SCTP. Everything I've read about that protocol has been impressive.
I think your choice of protocol has high relevance to #3296 and #281, which would suggest to me that multiple streams which do not block each other are an utterly critical feature.
It would follow that WebSockets are not a great choice due to its blocking-response nature, as mentioned by @larkost upthread. A transport similar to WebSockets (which shares the same weakness) that you may not be aware of: Server-Sent Events.
It has the interesting properties of working over an ordinary HTTP request (unlike WS, which upgrades), and being supported in all non-ie browsers with trivial polyfils available. The downside being it's unidirectional, which makes it unsuitable as a sole transport - just thought I'd mention it.
Anyway, I would suggest that if you do upgrade protocols, leave a 'plain' HTTP request/response transport in place (possibly just abstract away the transport in RDB server), as adding awesome stream support may be burdensome for third-party drivers.
Thanks for chiming in @kofalt .
You are right, good multi stream support would be one of the primary criteria for choosing a protocol. The other one being encryption and authentication.
I think at the moment there's no strong need for doing this switch. It would cause work for all driver developers, and we already have decent support for multiple concurrent cursors on one connection in our current protocol (especially after #3296 is done). At the same time using TLS/SSL for encryption around our current protocol would be a much less invasive way to get encryption and basic authentication #3158 .
Activity
deontologician commentedon Dec 18, 2014
Another option might be ZeroMQ
larkost commentedon Dec 18, 2014
To flesh out the WebSockets idea:
larkost commentedon Dec 18, 2014
Rather than ZeroMQ I think we would have to go with NanoMsg as a contender. ZeroMQ is currently LGPL, with some vague thoughts about moving to MPL, where as NanoMsg is already BSD licensed.
gchpaco commentedon Dec 18, 2014
... given that we're AGPL, why do we need to fret about an LGPL license?
deontologician commentedon Dec 18, 2014
The LGPL should be compatible with the AGPL
mglukhovsky commentedon Dec 18, 2014
If we choose to move to a more permissive license in the future, we won't want to limit our options because of libraries we've included.
mlucy commentedon Dec 18, 2014
I'm pretty sure the LGPL permits use in programs with proprietary licenses, unlike the GPL.
deontologician commentedon Dec 18, 2014
Specifically, ZeroMQ has a static-linking exception, allowing it to be
included in compiled closed-source applications without relicensing them
On Thu, Dec 18, 2014 at 3:20 PM, Michael Lucy [email protected]
wrote:
mglukhovsky commentedon Dec 18, 2014
@mlucy, sounds good then!
AtnNn commentedon Dec 19, 2014
I believe ØMQ does not support multiplexing over a single TCP socket.
kofalt commentedon Dec 20, 2014
+1 for SCTP. Everything I've read about that protocol has been impressive.
I think your choice of protocol has high relevance to #3296 and #281, which would suggest to me that multiple streams which do not block each other are an utterly critical feature.
It would follow that WebSockets are not a great choice due to its blocking-response nature, as mentioned by @larkost upthread. A transport similar to WebSockets (which shares the same weakness) that you may not be aware of: Server-Sent Events.
It has the interesting properties of working over an ordinary HTTP request (unlike WS, which upgrades), and being supported in all non-ie browsers with trivial polyfils available. The downside being it's unidirectional, which makes it unsuitable as a sole transport - just thought I'd mention it.
Anyway, I would suggest that if you do upgrade protocols, leave a 'plain' HTTP request/response transport in place (possibly just abstract away the transport in RDB server), as adding awesome stream support may be burdensome for third-party drivers.
danielmewes commentedon Dec 22, 2014
Thanks for chiming in @kofalt .
You are right, good multi stream support would be one of the primary criteria for choosing a protocol. The other one being encryption and authentication.
I think at the moment there's no strong need for doing this switch. It would cause work for all driver developers, and we already have decent support for multiple concurrent cursors on one connection in our current protocol (especially after #3296 is done). At the same time using TLS/SSL for encryption around our current protocol would be a much less invasive way to get encryption and basic authentication #3158 .