The Jupyter Notebook is a web based application that follows a client-server architecture, it mainly comprises of three different parts,
gangaextension also comprises of three differnet parts,
load_ipython_extension. The frontend extension used for this project have two seperate parts,
Notebook Section: This part communicate with kernel and render the Job Info widget below the Ganga Magic Cell. It also updates the status of Job in the widget. The communication between Kernel and notebook section frontend extension is done by Jupyter’s Comm API.
Tree Section: This part communicates with Server Extension and renders the Ganga Jobs Tab in Jupyter Tree view. The Ganga Jobs Tab displays information and status of all Jobs submitted to Ganga. The frontend extension makes AJAX calls to server extension and fetches the info and live status of Jobs.
%%ganga) and modifies the user namespace to provide Ganga Shell variables to use within code cells. This extension recieves the code submitted by user in Ganga Magic and it submits this code to create a new Ganga Job.
This extension only submits the Job, the submitted Job is then monitored by another Ganga Session running in server extension. So killing the kernel doesn’t kill the Job.
Jupyter Notebook server extensions is a Python module that loads when the Notebook web server application starts. It creates a Ganga Session which picks and monitors the Job submitted in other Ganga Sessions running in Notebook’s kernel. This extension also creates an API which sends live status of all Ganga Jobs. For SWAN another handler is created in server extension which renders the Ganga Jobs tab in SWAN.
draw.io link for this diagram: https://goo.gl/W4XUxa