Hacker News new | ask | show | jobs
by psimm 928 days ago
Demos look good! Could you please explain the advantages of Taipy over Streamlit and Shiny for Python?
3 comments

We actually used Streamlit in the past. Our gripe with it was how the backend event loop was managed. Basically, Streamlit re-runs your code at every user interaction to check what's changed (unless you cache specific variables which is hard to do well). When your app has significant data or a significant model to work with or multiple pages or users, this approach fails, and the app starts freezing constantly. We wanted a product that is the compromise between the easy learning curve of Streamlit while retaining production-ready capabilities: we use callbacks for user interactions to avoid unnecessary computations, front and back-end are running on separate threads. We also run on Jupyter notebooks if that helps.
The script re-run ( and the bandaid of caching via decorators) is exactly what I don’t like about streamlit. I’d love to see an example of how you use Taipy to build an LLM chat app, analogous to this SL example:

https://docs.streamlit.io/knowledge-base/tutorials/build-con...

Then I’ll give it a shot

Another interest one in this space — Reflex (formerly known as PyneCone). They have a ready to use LLM chat App, which makes it more likely I will check it out.

https://github.com/reflex-dev/reflex

I would love to read a comparison explaining the relative advantages of each framework from an experienced practitioner who has actually built apps with each. Add in plotly dash, bokeh/panel, and voila too.

Off the top of my head, bokeh and panel are more oriented towards high performance for large datasets, but have less overall adoption.

Voila is oriented towards making existing jupyter notebooks into interactive dashboards.

I'm always curious as to the runtime model for these interactive frameworks. Building interactivity into a jupyter notebook is fairly straightforward, but it's a very different execution model than the traditional http model. Jupyter notebook widgets need a separate backing kernel for each new user, vs the traditional http server models where all request state is reified normally based on a session cookie to DB state. The complete interpreter per user makes for simpler programming, but it is much more memory and process intensive.

Shiny has a DAG that enables intelligent caching. Here is a good talk explaining it https://www.youtube.com/watch?v=YNCPc9aWm_8