Panel Sharing Prototype

I’ve had a dream for a long time. That it should be easy for everyone to develop and share data apps: Data apps for every one

With panel convert to webassembly this is within reach. I’ve released a first prototype of Panel Sharing. Try it out at awesome-panel and let me know what you think.

Please report back at panel-sharing/issues.

Its a bit slow. I don’t have money for powerful servers. But I will work on optimizing the performance. The video is running at a speed of 3x.

  • I plan to add github integration because I want some way to control who shares what
  • I plan to add persistent storage. Right now your shared app will be gone the next time I upgrade.
  • I plan to improve the user experience significantly and add more example apps to the sidebar.
  • And if I could I would like to integrate the editor with a python language server to make the development experience awesome.

@philippjfr @Hoxbro @maximlt @sophiamyang @droumis @jbednar

5 Likes

This is so cool.

1 Like

Nice! The page does take a while to load, making a user think it’s broken. Once it loads it seems reasonably responsive, though the fonts and layout are messed up on my system:

Definitely something that would be nice to have!

2 Likes

I know :slight_smile: Its only a prototype. Most of the issues I know how to solve. Just need time.

The one thing I don’t know is how to get the “convert and reload” process to be really fast (max 2 seconds). I’ve created a Feature Request to Panel to make the convert and reload experience faster. Or at least to get some idea for doing this #4043.

stlite sharing takes time to load but after the initial load the Streamlit app reloads super-fast when the code is updated.

1 Like

I’ve updated Panel Sharing.

  • The sidebar should now be forced to render in Markdown panes. I did in the beginning but after some time running it changed.
  • The initial convert action is deferred via pn.state.onload.

This should improve the situation. Could you try again @jbednar?

Interesting do you know if it somehow keeps the pyodide process running and reuses it?

I don’t know @philippjfr . But the key is here whitphx/stlite: Serverless Streamlit (github.com).

What I know though is that they can “mount” streamlit in a div and when the streamlit applications starts is writes something about mounting filesystem.

I’ve speed things up quite significantly by

  • avoiding conversions when I can use use pre-converted apps.
  • speeding up the conversion by running it in a subprocess created from a forkserver context instead of a spawn context.

Panel Sharing

speed-up-panel-sharing

Hi @Marc,

If you just done this over last hour think my experience vastly improved though maybe not a fair test from a premier inn free wifi on a small screen iPhone but it does work reasonably well.

My experience

~ 1 hour ago i did not appreciate the wait but I was eager to try out your continued efforts
~ 5 min ago considerable change in wait time for the better, I’m putting it down to your changes here, my initial thoughts were something cached on the phone until i saw your note

The pyodie spinning wheel would be nice to give a progress update or percentage indicator, sometimes I get stuck on code executing for longer than i would like to see and unsure if it has hung or not - 4 times out of 5 I hit refresh and it loads speedy but I’m on edge every time i see that wheel now

Formatting fine for me here

1 Like

Thanks a lot @carl . The feedback is much appreciated.

My experience right now on my iPhone is that 1) on Safari the app stops at the “executing code” step 2) in Chrome the apps loads and executes reasonably well 3) on Chrome the videostream stops after the first image is taken. These problems are probably something for Pyodide (or Panel) to solve?

It actually works for me on Safari now. But maybe only 4 out of 5 times.

Works great for me now!

1 Like

I’ve now added support for query parameters in the url

When you select an example it sets the query parameters and you can copy the link and easily share it.

When you share an app it sets the query parameters and you can copy the link to the editor+app or just the app

So you can in fact share your apps now! Panel Sharing works! But I still need to add authentication to Github, persisted storage and lots of small details.

Added a download button for shared apps. This will give you a .zip file with the source and build files.

Also added a Basic Bokeh app to show how Bokeh users can use a bit of Panel to convert to web assembly.

https://www.awesome-panel.org/sharing

2 Likes

I’ve now added a Github integration.

When you are logged in, you can share and get a short, persistent url (gone when I upgrade awesome-panel.org still). You can also log out.

I’ve added add support for a base64 encoded project url that is updated whenever you convert the project.

This is an easy way to save and share the state of Panel Sharing without having to login and share with the rest of the world. There will be some constraints as browsers support urls of very varying length (Chrome probably best).

This is an example

https://www.awesome-panel.org/sharing?project=eyJzb3VyY2UiOnsiY29kZSI6Im…

Similarly directs links are created for

examples: Panel Sharing
shared apps: (not persistent yet)

test

Test link