Skip to content

Consider basing our client protocol on an existing underlying stream protocol #3460

Open

Description

@danielmewes

This came up in #3459

Candidates so far are:

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.

Activity

  1. added this to the backlog milestone on Dec 18, 2014
  2. deontologician commented on Dec 18, 2014

    @deontologician
    Contributor

    Another option might be ZeroMQ

  3. larkost commented on Dec 18, 2014

    @larkost
    Collaborator

    To flesh out the WebSockets idea:

    1. 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)
    2. It is similar to HTTP2 in that it gets HTTPS (WWS) for "free" in that you up-negotiate from a HTTPS connection.
    3. There is a lot of libraries that support it, but the languages behind our drivers don't have them built in.
    4. 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.
    5. It is very close to a raw socket in most ways, so more like our current system then http semantics.
  4. larkost commented on Dec 18, 2014

    @larkost
    Collaborator

    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.

  5. gchpaco commented on Dec 18, 2014

    @gchpaco
    Contributor

    ... given that we're AGPL, why do we need to fret about an LGPL license?

  6. deontologician commented on Dec 18, 2014

    @deontologician
    Contributor

    The LGPL should be compatible with the AGPL

  7. mglukhovsky commented on Dec 18, 2014

    @mglukhovsky
    Member

    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.

  8. mlucy commented on Dec 18, 2014

    @mlucy
    Member

    I'm pretty sure the LGPL permits use in programs with proprietary licenses, unlike the GPL.

  9. deontologician commented on Dec 18, 2014

    @deontologician
    Contributor

    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:

    I'm pretty sure the LGPL permits use in programs with proprietary
    licenses, unlike the GPL.

    —
    Reply to this email directly or view it on GitHub
    #3460 (comment)
    .

  10. mglukhovsky commented on Dec 18, 2014

    @mglukhovsky
    Member

    @mlucy, sounds good then!

  11. AtnNn commented on Dec 19, 2014

    @AtnNn
    Member

    I believe ØMQ does not support multiplexing over a single TCP socket.

  12. kofalt commented on Dec 20, 2014

    @kofalt

    +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.

  13. danielmewes commented on Dec 22, 2014

    @danielmewes
    MemberAuthor

    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 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions