Skip to content

spec conformance: allow batches #8

@prestwich

Description

@prestwich

currently the servers do not support batch requests.

To fix:

  • introduce pub struct RequestBatch
  • add single response on parse failure
  • check for empty response arrays

To consider:

  • memory impact wrt the underlying Bytes buffer of a batch
  • should the multiplexing be in the Router

Specification requirements:

  1. The Server should respond with an Array containing the corresponding Response objects, after all of the batch Request objects have been processed.
  2. A Response object SHOULD exist for each Request object, except that there SHOULD NOT be any Response objects for notifications.
  3. If the batch rpc call itself fails to be recognized as an valid JSON or as an Array with at least one value, the response from the Server MUST be a single Response object.
  4. If there are no Response objects contained within the Response array as it is to be sent to the client, the server MUST NOT return an empty Array and should return nothing at all.

Spec Notes:

  1. The Response objects being returned from a batch call MAY be returned in any order within the Array.

Metadata

Metadata

Assignees

No one assigned

    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