Skip to content

Proposal: r.json #887

Closed
Closed

Description

@mlucy

I think that we should re-introduce the r.json term which parses JSON on the server.

> r.json('{"a":"b"}').run
{'a' => 'b'}

Activity

  1. ghost assigned on May 22, 2013
  2. jdoliner commented on Jun 11, 2013

    @jdoliner
    Contributor

    Are we planning to automatically send inserted data as json from the drivers rather than converting it to protocol buffers? It seems like in the drivers where we know that the protocol buffer serialization is a lot slower than json serialization (which AFAIK is all of them) we should do this automatically since it will be a huge performance boost that will help with first impressions. No reason to make people think about something extra for performance reasons when they don't have to.

  3. coffeemug commented on Jun 11, 2013

    @coffeemug
    Contributor

    I think the original plan was to automatically use r.json term whenever possible (possibly gzipped too).

  4. jdoliner commented on Jun 11, 2013

    @jdoliner
    Contributor

    K, I like that idea.

  5. apendleton commented on Jun 13, 2013

    @apendleton

    If you're thinking about compressing the JSON, you should maybe consider some higher-speed compression algorithms like Snappy or LZ4 (the latter of which claims to be able to approach memory speeds)... compression ratios aren't quite as good, but you get the extra compactness basically for free, unlike with gzip.

  6. wmrowan commented on Jun 17, 2013

    @wmrowan
    Contributor

    I'm now convinced of the merits of this. Even after we add additional data types to RethinkDB many users will still be working with plain old JSON as a lingua franca amongst different pieces of their application. Though it won't be universal, the shortcut will continue to be very valuable to users who want to feed existing JSON documents directly into RethinkDB.

  7. mlucy commented on Jun 18, 2013

    @mlucy
    MemberAuthor

    I think we're all in agreement here. I think this issue should only be for implementing the term on the server and the drivers, and making the drivers use it implicitly for performance should be part of the performance improvement issues if and only if we're unable to move to good protobuf libraries.

  8. coffeemug commented on Jun 18, 2013

    @coffeemug
    Contributor

    👍

  9. jdoliner commented on Jun 24, 2013

    @jdoliner
    Contributor

    This is in CR 658.

  10. jdoliner commented on Jun 26, 2013

    @jdoliner
    Contributor

    This is in next.

  11. jdoliner commented on Jun 26, 2013

    @jdoliner
    Contributor

    In as of a2bcce4. Ships in 1.7.

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions