Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-38401

Provide a way to determine if the result set of a Query changes



    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • Querying
    • None


      A user proposed the following enhancement to reduce network traffic (they already use network compression):

      "One of the 'issues' of solutions like Atlas is the separation of database and backend server where communication latency between database(s) and backend server is limited by connectivity speeds.

      While we gain a tremendous amount with solutions like Atlas we lose 'intelligence' in managing transfer of data. I am looking at reading operations. It is common practice with networked devices to try and reduce network traffic as even with compression it slows down response times.

      If I was implementing it as part of Mongo Driver I would add a form of checksum (i.e. hash) of dataset I already have in my possession (generally stored in in-memory storage) and send read request(find({...}, {hashCode:1234AE893....}}) where database would execute the read, generate it's own hashCode on dataset (or somehow know data has not changed) and compare it's generated hashCode to what I sent in request. If hashCodes match it returns response NO-CONTENT-CHANGE along with it's generated hashCode indicating data is the same as I already have - thus drastically reducing network traffic.

      In an HTTP world this is done using eTAGs. For example, if data requested has not changed and using something along lines of eTags we could receive eTag from client, process call (most probably a cached response) check eTag received via eTag generated server side and simply respond data has not changed and requesting client (normally the back end server) will then used eTagged cached result and save on transferring network speed."


        Issue Links



              asya.kamsky@mongodb.com Asya Kamsky
              harshad.dhavale@mongodb.com Harshad Dhavale
              0 Vote for this issue
              10 Start watching this issue