🏠 back to Observable

View live notebook public mode?

I was just watching @visnup and @tophtucker live stream on twitch And a comment made sounded really good. It was having the ability to share a live view of the notebook. That mode could block editing/comments (but not forking).
This would make streaming of live coding so people can view the coding sessions better.

I guess it could be done by having a special share person called ‘public’
It would be like sharing a notebook with a user for pair programming.
The ‘public’ user would only see the live notebook changes and not be able to interact with the notebook.

Having the ability for the public copy cell links would make it also useful for streaming as that link could be shared in steam as a question or help about a bit of code.

What we’ve done before (and in official Observable streams too) is to go ahead and publish (unlisted) the notebook at an easy URL and remember to republish it every so often. This gives viewers a chance to play around with the code at hopefully good checkpoints. I think that works out decently well today?

The blocker this time was I had an Airtable API key embedded in the notebook that gives access to my entire Airtable account, so…

I guess if we had prepared for this one more (which is never the case), I could’ve created a quick proxy that hid the API key from the front-end, but allowed read/write access to the specific Airtable base we were concerned with.

1 Like

Brett you’re talking about having viewers on the socket so they see every keystroke and cursor presence, right? I think we run into some web socket scaling problems at some point; I forget how many we can support. And the publish-every-so-often thing works OK typically. But yeah, live would be sweet. I imagine livecoding sessions like Clubhouse rooms: you have people “onstage” (edit access) and a bunch of viewers who can raise their hand to request edit access & join the fray.

1 Like

It could be like the is a share option that limits to view?

I don’t know sockets so don’t know how the scaling would work for casting all the editors changes to the viewers would work.

Would it be easier to just send the changes when the cell is updated/saved instead of every edit? Like a republish that pushes changes to people viewing the live notebook?

The “remember to republish” is often a problem as the people coding overlook constantly doing this.

hm yeah, “republish on every commit” is an interesting idea

1 Like

As long as the republish was in the background as it currently stops editing while publishing.

The live notebook would want to push updates to viewers (maybe a live update mode/switch to see the latest version) If only the cells that changed got reloaded, I think some git magic could do that ie notebook version + changes from latest notebook.

But even the auto republish would be a huge help for streamers.