-
Notifications
You must be signed in to change notification settings - Fork 0
Dataflow
This document describes the request and authentication system used by cc-jupyter-service.
- 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.
For the following process it is assumed that there is a cc-jupyter-service located at https://server.com/ccjupyterservice
-
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
-
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. -
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.
-
The RED-Document is sent to the CC-AGENCY.
-
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. -
The CC-JUPYTER-SERVICE validates the given authentication information (Agency-Username and Notebook-Token) and responses with the notebook information
-
The CC-AGENCY executes the notebook using
papermill
. This results in a Jupyter-Notebook-Result. -
The CC-AGENCY makes a POST request to the CC-JUPYTER-SERVICE with the Jupyter-Notebook-Result
-
The CLIENT can now view the result of the execution