🏠 back to Observable

Deploying notebooks as web services

A few months I go I started experimenting with deploying my observable notebooks as web services.

The idea is to develop in the browser and then click a button to deploy that notebook at a well-known domain. I outlined a bit about my approach in a Twitter thread: https://twitter.com/ajbouh/status/1184720560359530496

Of course the service “compiler” is itself implemented as an observable notebook! :slight_smile:

It can either use jsdom, node-fetch and a headless implementation of canvas to provide an approximation of the browser runtime environment, or use a headless chrome instance to provide a real browser runtime environment.

Is this something that other people care about? Would it be worth me cleaning up for others to try out for themselves on their own notebooks?

4 Likes

I would be interested in seeing more details / code. Unfortunately, I’m not sufficiently familiar with the tech you mentioned in the tweets to be able to reconstruct what you did…

Interesting. What use case is driving this? Just a more interactive development of code that needs to be a web service? Or are you providing stuff you do anyway in a notebook, as a web service for consumption by non-browsers or non-Observable pages?

I’m finding Observable to be a great environment for writing new code, except for headaches switching to the browser’s debugger. Observable’s inspector is superior and more than makes up for it.

Coincidentally, earlier this evening a suggestion from @fil to look at packd led me to find I created a zeit.com account a year ago and forgotten about it. I’ve been thinking about offloading large dataset reduction to a server. This could all fit together…

I really like how fast the dev experience is for Observable. When I needed to run code that ran in a server-side environments, I realized that I wanted to avoid npm and JavaScript build pipelines for as long as possible. My initial need was rendering images to embed on other pages. Once I started experimenting with the approach I got very excited about it and ended up making an end-to-end deployment solution for notebooks.

My feeling is that most other people aren’t there yet on the adoption curve. Hopefully this changes soon! :slight_smile:

1 Like