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

Public interfacing for sharing, etc. #17

Closed
dsblank opened this Issue Aug 28, 2014 · 12 comments

Comments

Projects
None yet
6 participants
@dsblank
Copy link
Contributor

dsblank commented Aug 28, 2014

Sorry that I got cut off from the ipython-dev discussion this afternoon... my house lost internet access.

Anyway, I'll make some notes here about the public/sharing aspects of the jupyterhub:

The public handler should be able to:

  1. render as html
  2. give json of .ipynb
  3. allow downloading .ipynb
  4. allow copying from public directory to a logged in user's space

Here is a prototype of some of the ideas:

https://gist.github.com/dsblank/29fb53ff27966268208a

Basically:

  • any file in /home/USER/Public/ is shared as /public/USER/
  • does a directory listing if no file is requested
  • serves any file in Public (zip files, images, whatever)
  • default view is raw json
  • can get different versions:
    • /public/USER/file.ipynb?copy
    • /public/USER/file.ipynb?download
    • /public/USER/file.ipynb?view
  • no security here (allows ".." in paths)
  • not sure how to handle requests for .css, .js, etc.

IPython priorities, from my perspective:

  1. logout
  2. sharing/distributing files to class

I have some other aspects I need to wrestle with (how do they get a kernel installed easily, how do they get some nbextensions), but that is mostly me figuring out details to instruct the class).

@dsblank

This comment has been minimized.

Copy link
Contributor

dsblank commented Oct 8, 2014

It would be very handy to have sharing work similarly to Google Docs:

Visibility:

  • share with anyone on web (URL can be found and accessed; maybe don't need this with browsable public view---see below)
  • share with anyone who knows URL
  • share with other specific users; requires login

Permissions:

  • is owner
  • can comment
  • can edit
  • can view

But I also like a browsable public view, such as:

http://jupyter.cs.brynmawr.edu/hub/dblank/public/

(My students are starting to create their own sharable/collaborative "notebooks"... they are making notebook cells be cells in a Google Spreadsheet, and working on ways to migrate between the spreadsheet and the notebook. Clever idea!)

@boveylisi2013

This comment has been minimized.

Copy link

boveylisi2013 commented Aug 5, 2015

Agree. I totally hope a logged-in user can access the public files. Now, I try to read file stored in hdfs. It always try to search in the /user/myuser folder. I really hope it can get rid of the prefix which is automatically appended on.

@yuvipanda

This comment has been minimized.

Copy link
Member

yuvipanda commented Dec 20, 2015

@dsblank your gist is 404 :) can you share any work you've done in this area? I too would like this to happen for my installation.

@yuvipanda

This comment has been minimized.

Copy link
Member

yuvipanda commented Dec 20, 2015

I'm not sure if this should be implemented in jupyterhub itself or as a separate app. Thoughts?

@dsblank

This comment has been minimized.

Copy link
Contributor

dsblank commented Dec 20, 2015

@yuvipanda

This comment has been minimized.

Copy link
Member

yuvipanda commented Dec 20, 2015

@dsblank that looks awesome. Do you think there's a way something similar can be merged upstream?

@minrk

This comment has been minimized.

Copy link
Member

minrk commented Dec 21, 2015

Yes, I think we do want to provide a version of this. The question is how do we do it with the current abstractions, where the Hub doesn't know anything about the single-user files. @dsblank's implementation makes convenient assumptions about the filesystem for their deployment that we can't make in general. So we need a mechanism for single-user servers to publish notebooks to the Hub, and for the Hub to store them somewhere.

If this can be done as a separate 'sharing service', I think that would be ideal, perhaps as a peer to Spawner and Authenticator.

@ssanderson

This comment has been minimized.

Copy link
Contributor

ssanderson commented Dec 21, 2015

So we need a mechanism for single-user servers to publish notebooks to the Hub, and for the Hub to store them somewhere.

@minrk we did this on Quantopian as a server extension to the single-user servers; we add custom javascript to add a "share notebook" button that makes a post to an extra handler that runs on each single-user server. Our implementation then uploads straight to S3, but you could forward it to the Hub easily enough if you wanted local storage.

cc @TimShawver who worked on most of this in our codebase.

@yuvipanda

This comment has been minimized.

Copy link
Member

yuvipanda commented Dec 21, 2015

I'm experimenting with https://github.com/yuvipanda/nbserve which has a pluggable 'url to file resource' mapper, which maps something like 'YuviPanda/TeaHouse.ipynb' to '/data/project/paws/YuviPanda/public/TeaHouse.ipynb'.

@willingc

This comment has been minimized.

Copy link
Contributor

willingc commented Feb 5, 2017

A development note: Sharing is currently being discussed in the jupyterhub/hubshare repo jupyterhub/hubshare#14

@minrk and others Do you mind if we close this issue on this repo and move discussions to hubshare?

@minrk

This comment has been minimized.

Copy link
Member

minrk commented Feb 6, 2017

Sure, I think that's appropriate

@willingc

This comment has been minimized.

Copy link
Contributor

willingc commented Feb 6, 2017

Closing this issue. Please continue discussion on sharing to jupyterhub/hubshare#14

@willingc willingc closed this Feb 6, 2017

consideRatio pushed a commit to consideRatio/jupyterhub that referenced this issue Feb 19, 2018

consideRatio pushed a commit to consideRatio/jupyterhub that referenced this issue Feb 19, 2018

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