Skip to content

RPC over REST #225

Closed
Closed
@Stebalien

Description

@Stebalien

Re: #224

I'd like to move in the opposite direction: switch to a transport-agnostic RPC API internally so we can support multiple RPC protocols/libraries and multiple transports. I'm concerned that REST, specifically the use of verbs like PUT, DELETE, etc.) will tightly couple us to HTTP.

Why:

  1. Eventually, I'd like to support efficient memory sharing RPC systems using unix domain sockets, memory maps, and file descriptor passing.
  2. I'd like to avoid re-implementing bindings for every command when we do this.
  3. I'd like multiplex multiple commands over a single connection. HTTP/2 can do this but it requires TLS which requires a CA cert.
  4. Progress reported by ipfs get and ipfs cat is currently incorrect because we can't accurately calculate the size of the response before we send it. To fix this, we'll likely need to send chunks of data along with progress information. However, that will break curl -o file .../api/v0/get/ipfs/QmFoo.
  5. I'd like to drop everything related to multipart.

Thoughts? What about JSON RPC (or some similar protocol, ideally using CBOR)?

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