You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
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.
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:
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.
The text was updated successfully, but these errors were encountered: