Skip to content

How *should* other applications interface with jupyter server? #29

@Zsailer

Description

@Zsailer

Pinging @SylvainCorlay, @blink1073 and @jasongrout.

I'm hoping this discussion will bring me up to speed on everyone's thoughts/plans, so I apologize for anything that I say that's naive 😆

Essentially, I'm asking how should applications like the class Notebook, jupyterlab, etc. interface with the server? (I realize there's a big discussion that needs to happen about how we handle configuration, especially in a backward-compatible way. For now, I'm ignoring that question and just asking what is the end goal for jupyter_server).

1. Everything is a server extension

One approach is that each application is loaded through the server extension logic.

def load_jupyter_server_extension(server_app): 
    # 1. Pass application settings to Jupyter WebApp (this requires new logic)
    # 2. Add handlers to Jupyter WebApp

Each extension is added to the server extension list in the server config. The server has one entry point jupyter server (though we'd need to add shims for backward compatibility). The server+webapp launch and load the server extensions (i.e. the classic notebook, lab, etc.). Each extension loads it's specific configuration and these additional settings are added after the server and webapp are created. I'm not sure how we'd handle extension configurations from the CLI (will likely new traitlets logic...).

In this scenario, the jupyter ServerApp and WebApp are a general applications that expose API's to the backend jupyter services. Jupyter lab and the notebook are (first class) external applications that interface with server. As an example, here is a branch of the classic notebook that uses the current server extension logic to load the notebook.

2. External apps subclass the server+webapp

Every external application subclass the jupyter ServerApp and WebApp and add/update application specific configurations to these classes (I think this is what jupyterlab_server does?).

In this case, each application comes with their own server, webapp, configuration template, and entry-point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions