Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

HTTP REST API Server / Client Generator #1856

Closed
Gozala opened this issue Jan 30, 2019 · 1 comment
Closed

HTTP REST API Server / Client Generator #1856

Gozala opened this issue Jan 30, 2019 · 1 comment
Assignees
Labels
exploration kind/wontfix status/deferred Conscious decision to pause or backlog

Comments

@Gozala
Copy link
Contributor

Gozala commented Jan 30, 2019

  • Version:n/a
  • Platform:n/a
  • Subsystem:n/a

Type:

Feature

Severity:

Medium

Description:

At the moment js-ipfs binds Gateway / Daemon API endpoints to the underlying calls to serve them to the clients. Then there is js-ipfs-http-client that does reverse by mapping API endpoints back to js-ipfs API compatible client. This is done manually on both ends.

I would like to propose alternative based on word I've done when working on Mozilla Devtools protocol. Where server part contained metadata (describing and enforcing interface at runtime) and that allowed it to describe it's protocol with all the endpoints & parameters by aggregating and passing down API specification. That allowed us to generate us full client from the specification provided by the server. This had following benefits:

  • Removed need to maintain client code base.
  • Solved issues with client / server API / version mismatches.
  • Made it possible to generate clients in variety of languages.

I think it would be beneficial to do the same thing for IPFS due to above mentioned benefits. In fact I suspect that implementation could be far less complicated for IPFS as there is no requirement to keep object refs across server / client which was by far most complicated piece in the implementation we used. Also now that https://json-schema.org/ is a thing it's probably going to be a good way to describe param / return values.

@alanshaw alanshaw added status/deferred Conscious decision to pause or backlog exploration labels Mar 12, 2019
@SgtPooki SgtPooki moved this to 🥞 Todo in js-ipfs deprecation May 17, 2023
@achingbrain
Copy link
Member

achingbrain commented May 31, 2023

js-ipfs is being deprecated in favor of Helia. You can #4336 and read the migration guide.

Closing as not planned. If someone wanted to create a REST interface to Helia they could certainly do so, but it would be a module that wraps it, rather than adding that as functionality.

@github-project-automation github-project-automation bot moved this from 🥞 Todo to ✅ Done in js-ipfs deprecation May 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exploration kind/wontfix status/deferred Conscious decision to pause or backlog
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants