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

API Proposal #13

Open
yuvipanda opened this issue May 13, 2017 · 9 comments · May be fixed by #1048
Open

API Proposal #13

yuvipanda opened this issue May 13, 2017 · 9 comments · May be fixed by #1048

Comments

@yuvipanda
Copy link
Collaborator

yuvipanda commented May 13, 2017

This needs a versioned, simple RESTful API that allows for a wide variety of use cases.

Some of the use cases it should cater for:

  1. Working as an on-demand backend for ipywidgets and related toolkits that want to talk to a kernel
  2. mybinder.org like use-cases with various levels of authentication

We should collect other use cases too before finalizing the API design.

Some API design guidelines I like (and should re-read before doing the design):

  1. Google's API Design guidelines https://cloud.google.com/apis/design/
  2. Heroku's API Design guidelines https://geemus.gitbooks.io/http-api-design/content/en/
@choldgraf
Copy link
Member

This is also probably a conversation in which @minrk would have useful perspective

@yuvipanda
Copy link
Collaborator Author

@choldgraf you are looking for #15 :) This one is about a HTTP JSON API, which afaict Binder doesn't have.

@choldgraf
Copy link
Member

are we gonna keep this open to discuss new API things? Right now there's just filepath right?

@yuvipanda
Copy link
Collaborator Author

Nope, this is unrelated to that - this is for the API that js clients can use. We don't have a stable one for that yet, so yes we should keep it open.

@yuvipanda
Copy link
Collaborator Author

Ideally, someone who would use the API should describe their use case and tell us what their ideal flow would look like :)

@jasongrout
Copy link

jasongrout commented Aug 3, 2017

Ideally, someone who would use the API should describe their use case and tell us what their ideal flow would look like :)

Well since you asked :).

It'd be nice if we could use it essentially as a kernel spawning service with a specific setup for the kernel. We have an example right now that uses tmpnb to spawn a kernel (see https://github.com/jupyter-widgets/ipywidgets/blob/master/examples/web-tmpnb/src/index.ts), and then send the kernel code to execute. If we could spawn a kernel with a specific configuration (for example, a specific version of ipywidgets installed), that would be great.

@choldgraf
Copy link
Member

a number of people (e.g. the Juno folks, @rgbkrk , @minrk ) have worked out ways to connect w/ Binder via the API. As a start on this issue can we document how they did this, so that others might be able to follow in their footsteps?

@rgbkrk
Copy link
Member

rgbkrk commented Jan 12, 2018

Looked at thebelab's implementation, realized it was an EventSource with a simple path and then wrote two functions:

  • formBinderURL - options in, URL out
  • binder - options in, Observable wrapped around an EventSource out

These are both in https://github.com/nteract/nteract/blob/master/packages/rx-binder

@minrk
Copy link
Member

minrk commented Jan 13, 2018

And we have a Python example in this repo.

@minrk minrk linked a pull request Feb 4, 2020 that will close this issue
yacchin1205 pushed a commit to yacchin1205/binderhub that referenced this issue Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants