Whither In-Browser Jupyter WASM? R is Here, Could Postgres Be Too?

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:

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???)

Author: Tony Hirst

I'm a Senior Lecturer at The Open University, with an interest in #opendata policy and practice, as well as general web tinkering...

3 thoughts on “Whither In-Browser Jupyter WASM? R is Here, Could Postgres Be Too?”

    1. 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…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: