Giter VIP home page Giter VIP logo

Comments (3)

bergsieker avatar bergsieker commented on September 24, 2024

You are correct that the current API does not specify an ordering. Note that there's no ambiguity here: each result includes a digest, so the client can understand which bytes/status belongs to each requested blob. I don't believe that the lack of ordering was by design, so we could potentially specify an ordering, although I'm not sure how much it would simplify clients in reality. @buchgr WDYT?

from remote-apis.

ulfjack avatar ulfjack commented on September 24, 2024

If the ordering is required, then the digests don't have to be set, reducing the response size. What about eliding successful replies? The client could implicitly assume that anything not mentioned was OK.

from remote-apis.

jmillikin avatar jmillikin commented on September 24, 2024

How about using a uint32 request_index in each response item? That would provide the same functionality as the current protocol, without requiring the server to send back the original digests.

edit: ah, this has already been suggested at #160

Something like this:

message FindMissingBlobsRequest {
  // [...]
  repeated Digest blob_digests = 2;
  bool respond_digest_indexes = 3;
}

message FindMissingBlobsResponse {
  // not populated if request's `respond_digest_indexes` was true
  repeated Digest missing_blob_digests = 2;

  // request::blob_digests[missing_blob_digest_indexes[N]] == missing_blob_digests[N]
  repeated uint32 missing_blob_digest_indexes = 3;
}

message BatchUpdateBlobsRequest {
  // [...]
  repeated Request requests = 2;
  bool respond_digest_indexes = 3;
}

message BatchUpdateBlobsResponse {
  message Response {
    // [...]
    uint32 request_index = 3;
  }
}

// same for BatchReadBlobsRequest / BatchReadBlobsResponse

from remote-apis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.