jupyverse icon indicating copy to clipboard operation
jupyverse copied to clipboard

Jupyverse Modularity - Workflow to add "server extension" ?

Open oscar6echo opened this issue 1 year ago • 6 comments

I understand from the doc and conversation that Jupyverse is modular by design :+1:

So I understand it should be feasible to add endpoints, aka server extensions. aka asphalt plugins (?). Do such plugins need be in the jupyverse repo ? Or is there a way to add one by config before lauching the server ?

More generally is there a short demo/tutorial on how to create such a custom plugin (hello world with maybe some use of shared resources) ?

I have the following generic idea in mind:

  • A Jupyterlab extension collects some data in the browser - say a token or user input data in extension frontend.
  • The labextension sends it to a "POST" custom jupyverse endpoint/plugin
  • This plugin saves it on the disk in a specific folder
  • Then the kernel can read it from this folder

Similarly the data flow can go the other way if the plugin has a corresponding "GET" endpoint availalble to the labextension.

This would be a relatively generic way to pass data from frontend to kernel and back - which is a frequent use case - and it would be easy to customize.

NOTE: In the case of Jupyterlite, the facility to exchange data between frontend and kernel is the IndexedDB - accessible in read-write from both kernel and frontend :+1:


Side question: In the repo there is a lot of "fps" but there is mention (#277) that "fps" has been replaced by asphalt. However there are still "fps-xyz" imports all over the place including after this mention.
Why ? migration on going? renaming not done ? Just to understand.

oscar6echo avatar May 21 '23 19:05 oscar6echo