The original MyBinder service for launching Jupyter notebooks from GitHub originally included an option to attach a PostgreSQL database that you could access from Jupyter notebooks:
With JupyterLite taking over many of the demo requests for the Try Jupyter site from MyBinder, reducing the need for anything other than a simple webserver on the Try Jupyter site, and Jupyterlab running purely in the browser under WASM, I wonder whether it would be possible to integrate an in-browser PostgreSQL server into the distribution using postgres-wasm
(earlier review)?
I also note that Jupyter (originally coined from Julia, Python and R, with the suggestion, if not implication, that the environment would support those separate languages equally) is now a step closer to being legitimised again with a blog post from the Posit (RStudio, as was) camp, who very sensibly got
George Stagg on board and supported his development of WebR, that announced the official release last week of WebR, and with it an experimental JupyerLite R kernel. There’s a list of WebR/wasm compiled supported R packages here.
So now you can run R in a JupyterLite environment, or via the WebR console. See also Bob Rudis’ / @hrbrmstr’s getting started with WebR post.
Presumably, that means you’ll also be able to use the JupyterLite R kernel to provide in-browser code execution in a Thebe (ThebeLite?) backed Jupyter Book when that package gets a release (it keeps seeming to be so close…! Maybe for JupyterCon?)
Hmm… now I wonder… There was a xeus-sqlite
Jupyterlite kernel, presumably derived from the xeus-sql
kernel? So I wonder – could you get a xeus-sql
kernel running in JupyterLite and calling postgres-wasm
running in the same tab?
I also wonder: what if Jupyter Book could transclude content from a wasm flavoured SQLite or PostgreSQL database? Or ship a full-text, fuzzy, or even semantic search using a wasm powered database?
PS in passing, I also note various WASM backed dashboarding solutions:
- Shiny Live (Pyodide backed Shiny dashboards; it also looks like we might expect Shiny Live R dashboards at some point?);
- Voici dashboards (Voila dashboards for JupyterLite?); and
stlite
(“Serverless Streamlit, a port of Streamlit to WebAssembly, powered by Pyodide“).
Again, it’d be interesting to see one of those shipping with database hooks in place? Or DuckDB integration so you could easily make SQL requests over various a whole host of sources. Or datasesette-lite
? Etc etc. (I’m not sure how the plumbing would work though???)
ThebeLite is getting closer!!
https://github.com/executablebooks/thebe/tree/main/packages/lite#thebe-lite
I don’t think we have tried R yet though. All super exciting. There will be a talk about Thebe at JupyterCon, so good motivation to get this all working together. :)
Really looking forward to the official release… I’ve been away from writing new Jupyter Book content lately, but next sprint will be really keen to try out JupyterLite/ThebeLite features…
It would also be nice if the same cached jupyterlite packages could be used to view the book pages in a corresponding jupyterlite environment, eg as per https://github.com/executablebooks/sphinx-book-theme/pull/655