Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Graceful handling of Driver Front-end connections #40

Open
qwofford opened this issue Jun 25, 2023 · 0 comments
Open

Graceful handling of Driver Front-end connections #40

qwofford opened this issue Jun 25, 2023 · 0 comments

Comments

@qwofford
Copy link
Collaborator

To see an example of this problem take a look at how this Parquet front-end is implemented:

print('Opening Jupyter notebook...')
self.get_cmd_output(cmd=['jupyter-lab ./dsi_parquet_driver_output.ipynb'])

When this is called from an interactive terminal, you can cancel with control+c, but the spawned jupyter notebook remains.

This should be handled gracefully. The easy case is when a human is working interactively and then enters the control+c key command, this should be quick to implement.

The harder case is when an external program needs to signal to to the front-end that its work is done and the process should be terminated gracefully. To make this concrete, consider this example:

  1. Greg writes a script which instantiates a DSI Core Terminal, but before the Terminal performs a transload operation (therefor locking the metadata schema), Greg needs a ML program to explore SQL data and return a sample of required data.
  2. The Terminal loads a front-end SQLite Driver and an arbitrary back-end Driver.
  3. The method "Terminal().artifact_handler(interaction_type='inspect')" is called.
  4. The external ML program needs to execute SQL queries according to its own logic, and when the external program terminates it should send a signal to the DSI Core Terminal.
  5. The SQL query results should then be available to guide how/which Plugins are loaded.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant