Git Product home page Git Product logo

Comments (4)

danlester avatar danlester commented on September 24, 2024 1

I didn't particularly mean to close this issue!

from jhsingle-native-proxy.

danlester avatar danlester commented on September 24, 2024

My main objection to using jupyter-server-proxy directly was its dependency on notebook. It is ideologically cleaner not to have that installed when the point of jhsingle-native-proxy is to cut out the notebook-related bits, including all the etc/jupyter and share/jupyter data files in setup.py.

In an ideal world, maybe jupyter-server-proxy would incorporate the jhsingle-native-proxy functionality so everything is maintained in one repo. setup.py could have a [native] install option that misses out the notebook stuff. Or instead perhaps a shared package for the core proxying behavior could be used by both downstream packages.

But I think there are some fundamental differences between the two that would make this code more complicated for everyone:

jupyter-server-proxy has proxy classes based on notebook.base.handlers.IPythonHandler, whereas jhsingle-native-proxy is based on jupyterhub.services.auth.HubOAuthenticated:

ProxyHandler(WebSocketHandlerMixin, IPythonHandler) versus ProxyHandler(HubOAuthenticated, WebSocketHandlerMixin) - the inheritance order is different here for a start; not sure if that has any other side-effects!

Other than those fundamentals, jhsingle-native-proxy has to implement alternative forms of tornado.web.authenticated to account for the 'authtype=none' option introduced to cope with BinderHub only having ?token query GET parameter as a form of authentication. (This could probably be simplified internally in jhsingle-native-proxy in any case, e.g. by overriding current_user with a dummy.)

So I think the dependencies are the main blocking point, and then the next concern is complicating code - the proxy classes are going to have to be parameterised in terms of base classes, so we end up with some kind of factory.

In terms of simplifying the dependency tree, it might actually make more sense for jupyter-server-proxy to depend on code in jhsingle-native-proxy instead. Then the objection could be the dependency on jupyterhub. I have seen it suggested elsewhere that the only real requirement, jupyterhub.services.auth, would make sense to be isolated from the rest of JupyterHub anyway.

Happy to collaborate on this if it is important to anyone!

from jhsingle-native-proxy.

betatim avatar betatim commented on September 24, 2024

I hadn't thought of the dependency on notebook. Not having that is the whole point of having this standalone proxy. So it seems like it would be quite a bit of effort/unclear how to do this without complex inheritance/factory patterns/etc.

from jhsingle-native-proxy.

danlester avatar danlester commented on September 24, 2024

Yes, I think so. Closing again for now, but happy to revisit if anyone wants to.

from jhsingle-native-proxy.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.