Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define an IPFS Core API spec & adopt interface across impls #85

Open
5 of 8 tasks
hackergrrl opened this issue Mar 25, 2016 · 13 comments
Open
5 of 8 tasks

Define an IPFS Core API spec & adopt interface across impls #85

hackergrrl opened this issue Mar 25, 2016 · 13 comments
Assignees

Comments

@hackergrrl
Copy link

hackergrrl commented Mar 25, 2016

Goal

Having a well-defined specification for the IPFS Core API will let us build JS, Go, etc. modules that define the core interface, allowing many different implementations. This is very important for IPFS App developers: rather than hard-code for an HTTP daemon or a Go ephemeral node or a localhost daemon, they can simply develop against the Core API and swap out IPFS Nodes as needed. This will be especially useful once js-ipfs runs in the browser and apps will want to swap between HTTP and a local node.

Steps

Steps updated by @lgierth 1-Sep-2016

@hackergrrl hackergrrl changed the title Define an IPFS Core spec Define an IPFS Core API spec & adopt interface across impls Mar 25, 2016
@daviddias
Copy link
Member

In addition to the list advantages, having this kind of spec will create good documentation of the several subsystems present inside IPFS, by documenting their entry points.

Agreed with all the steps listed :)

@RichardLitt
Copy link
Member

Also agreed. What sort of API details do you mean for the core spec?

@hackergrrl
Copy link
Author

I'm glad you asked. 😀

Right now the core spec doc only lists method names. We should fill in the API method signatures and their semantics. You've done similar work in solidifying the HTTP API, right @RichardLitt? Would love to get your thoughts!

@RichardLitt
Copy link
Member

I agree entirely. Give me a syntax and I'll give you a stab. 🔪

@hackergrrl
Copy link
Author

I don't know of any language-agnostic API specification formats, so I'd personally be inclined to write something Node-like for v1, but generalize out the language-specific bits (like callbacks vs sync methods, opts objects, etc).

@dignifiedquire
Copy link
Member

I think it should be based on a language with a good type system, haskell and rust come to mind, go types would work as well or if you want to keep it javascripty you could use typescript or flowtype.

@hackergrrl
Copy link
Author

To avoid bikeshed, whoever writes the doc should probably just use the format that feels most comfortable to them. 😀

@lamarpavel
Copy link

As an example, the API spec of OpenGL (and now also Vulkan) are using C syntax as it is common to most programmers and can be seen as somewhat neutral ground. Making it understandable to most programmers could be more important than making it look elegant.

@daviddias
Copy link
Member

@hackergrrl
Copy link
Author

@hackergrrl
Copy link
Author

@jbenet @diasdavid @whyrusleeping (and anyone else interested): let's set a time in the near future to do a hangout on the core spec (this issue).

Could you share your availabilities here? I know the next week is going to be busy, but maybe we could do it in person in Berlin and also stream it as a hangout to the rest of the community. Please share your thoughts here.

@RichardLitt
Copy link
Member

I'm free next week. I want to be there for this.

@ghost
Copy link

ghost commented Jun 19, 2016

Core API and go-ipfs-core-api: ipfs/kubo#2876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants