Just to clarify, my mental model of what goes on is:
(1) Kernel <---- ZMQ ----> (2) JupyterServer(?) <---> WebSockets(??) <---> (3) Jupyter WebApp/FrontEnd (in Browser) <---> (4) User Javascript/Wasm code (Inside the output of a cell)
I'm looking for a way to get (1, the kernel) and (4, the user javascript/wasm) to communicate.
From poking around the debug messages, it seems there is a websocket port in (2, JupyterServe) in `/api/kernels/<session_id>/channels` ? Is this something my user code (4) can open a socket and communicate through, using the custom messages protocol ?
I found
this documentation on WebSocket protocol, but it seems to be aimed at communication between (2) and (3). I'm not sure I'm able in (4) to connect to this websocket, and if it is, what is its address (maybe the one I pointed above?)
cheers
ps.: I found many other questions in stack overflow, Jupyter Forum, and
even in this list, but I'm missing some of the details, and most seem to be using/require some installed jupyter extension, which I wanted to avoid having to do -- much better if this works without needing to install other things, not mention having to manager another separate codebase for the extension :)