Skip to content

Dataflow

Bluemi edited this page Apr 20, 2020 · 3 revisions

This document describes the request and authentication system used by cc-jupyter-service.

Parties

  • CLIENT: The user accessing the service. For example via a browser.
  • CC-JUPYTER-SERVICE: The service interacting with the user and the agency. Handles the notebooks and starts jobs at the agency.
  • CC-AGENCY: The cc-agency installation that actually executes the experiments.

Process

For the following process it is assumed that there is a cc-jupyter-service located at https://server.com/ccjupyterservice

  1. The user accesses the CC-JUPYTER-SERVICE-Main-URL https://server.com/ccjupyterservice. There the user has to insert the following information:

    • JupyterNotebook: The notebook to execute
    • Agency-URL: The url of the agency that should be used for the execution
    • Agency-Username: A valid username for the given agency
    • Agency-Password: The password for the given agency user
  2. After inserting the required information the user makes a post request to https://server.com/ccjupyterservice/executeNotebook, with the given jupyter notebook and agency-authentication information as json body.

  3. The CC-JUPYTER-SERICE creates the following information:

    • Notebook-ID: An ID that can be used to identify the notebook given by the user request
    • Notebook-Token: A token that can be used (in combination with the NotebookID) to authorize someone the access to the notebook data.
    • RED-Document: The RED data containing the Notebook-ID and the Notebook-Token to be executed on the agency.

    The Noteboook-ID and the Notebook-Token is saved into the database of the CC-JUPYTER-SERVICE. The JupyterNotebook is also saved to be accessible by the agency.

  4. The RED-Document is sent to the CC-AGENCY.

  5. The CC-AGENCY requests the notebook data via https://server.com/ccjupyterservice/notebook/<Notebook-ID> using the Agency-Username and the Notebook-Token as authentication information.

  6. The CC-JUPYTER-SERVICE validates the given authentication information (Agency-Username and Notebook-Token) and responses with the notebook information

  7. The CC-AGENCY executes the notebook using papermill. This results in a Jupyter-Notebook-Result.

  8. The CC-AGENCY makes a POST request to the CC-JUPYTER-SERVICE with the Jupyter-Notebook-Result

  9. The CLIENT can now view the result of the execution

Clone this wiki locally