Skip to content

Publishing the RethinkDB driver spec #768

Closed

Description

@danielcompton

I really like http://rethinkdb.com/docs/writing-drivers/ for understanding the overall process for building a driver, and have seen https://github.com/rethinkdb/rethinkdb/blob/next/src/rdb_protocol/ql2.proto. However I feel like there is a spot in the middle missing for a formal spec describing each version of the protocol. I'm particularly interested in understanding the differences between v03 and v04, and can't seem to find a comprehensive list of changes.

On the RFC for the protocol, it looked like there was a wiki article with these details - https://github.com/rethinkdb/rethinkdb/wiki/protobuf_rfc_raw_spec, but the wiki seems to have been closed as that just redirects to rethinkdb/rethinkdb.

Are you able to help point me towards the right docs? It would be good to link to them from the writing drivers page as well.

Activity

  1. AtnNn commented on May 19, 2015

    @AtnNn
    Member

    We don't keep docs for older versions of the driver protocol. There are however plans to start keeping old docs around (#665).

    You can find old versions of the driver spec using git log:

    https://github.com/rethinkdb/docs/commits/master/1-get-started/drivers/writing-drivers.md
    https://github.com/rethinkdb/docs/commits/master/1-get-started/drivers/driver_protocol.md

    For a more authoritative reference, you can take a look at the messages and comments in ql2.proto. Use a version tag to get the information for a specific version, for example git show v1.8.0:src/rdb_protocol/ql2.proto for RethinkDB 1.8.0.

    https://github.com/rethinkdb/rethinkdb/commits/master/src/rdb_protocol/ql2.proto

    I believe that the protobuf_rfc_raw_spec page on the old wiki was simply an early version of ql2.proto.

  2. danielcompton commented on May 19, 2015

    @danielcompton
    ContributorAuthor

    Thanks @AtnNn, this is quite helpful for seeing the changes to the wire protocol. Is there anywhere describing the differences in behaviour between v03 and v04?

    Note: All instructions below assume a protocol of V0_3 or higher.

    from http://rethinkdb.com/docs/writing-drivers/ implies that unless otherwise stated V0_3 and V0_4 have the same connection behaviour.

    Starting with RethinkDB 2.0 (V0_4), the server will process multiple queries in parallel rather than sequentially, and there is no guarantee that a read following a write on the same connection will “see” the results of the write as long as it’s successful.

    Is there any more discussion on this behaviour, and are there any other changes to the behaviour of the spec between V0_3 and V0_4?

    Looking at the 2.0.0 release notes I couldn't see any mention of the new protocol.

    Really appreciate the work you guys do, thanks for your hard work.

    EDIT: at the end of writing this post I found https://groups.google.com/d/msg/rethinkdb-dev/3qxVOW05Y58/5hdYK7qSIOgJ which looks like what I was after. This is great but not particularly discoverable.

  3. AtnNn commented on May 19, 2015

    @AtnNn
    Member

    The rethinkdb-dev post you link to describes all the differences introduced by RethinkDB 2.0 (aka V0_4).

    Although the RethinkDB release notes do not mention the version V0_4 bump, it does mention all the changes to the protocol.

    As you've discovered, the changes that affect drivers are posted to the mailing list, as described in the writing-drivers article:

    You can ask questions and get notes on changes introduced in new versions of RethinkDB on the RethinkDB-Dev Google Group

    Although it is not in the repo, it serves as a separate changelog for those changes. Perhaps we could make it easier to discover.

  4. danielmewes commented on May 20, 2015

    @danielmewes
    Member

    While I think this isn't critical, I agree that the dev mailing list is not easy enough to discover given how useful the driver release posts are for keeping a driver up to date.

    @chipotle Do you think we could have a more prominent box closer to the top of http://rethinkdb.com/docs/writing-drivers/ to point to the mailing list? Something along the lines of "Join the RethinkDB-Dev Google Group to receive updates on protocol changes."?

  5. chipotle commented on May 20, 2015

    @chipotle
    Contributor

    That seems reasonable.

  6. deontologician commented on May 20, 2015

    @deontologician
    Contributor

    Could we post the per-release driver developer notes that @mlucy sends out on the site somewhere?

  7. mlucy commented on May 20, 2015

    @mlucy
    Member

    Maybe not, they're in the form of patches from one version to the next and thus not all that useful as general documentation. (Also, you can browse them in the google group.)

  8. self-assigned this
    on May 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions