~/talk

Achieving Concurrency in Streamlit with a RQ scheduler

Talkat PyData London 2024 Β· 2024-06-14..06-16Β· [developer-experience, web-performance]
links:none on file
slides:none on file

Claim: Streamlit apps become responsive under concurrent users by pushing long jobs into Redis Queue (RQ) workers while the main app stays interactive. Implementation uses a local Redis server, an RQ queue, spun-up worker processes, and a scheduler that enqueues user-defined function via UI calls. Demonstration shows multiple tasks submitted nearly simultaneously complete concurrently, and confirms limitations: multiprocessing cannot write back to Streamlit UI and Tasklit only runs command-line jobs. Also uses Streamlit’s fragment_run to update status without full reruns.

AI-written summary Β· about

  1. 0:00Introduction
  2. 2:10Streamlit concurrency challenges
  3. 5:01Streamlit concurrency problems
  4. 7:32Streamlit RQ scheduler proposal
  5. 9:23Multithreading multiprocessing Taset
  6. 12:57Redis Q advantages
  7. 15:33Multithreading demo
  8. 17:39Multiprocessing limitations
  9. 18:43Taset limitations comparison
  10. 19:27Multithreading needs queue
  11. 21:20Redis Q architecture benefits
  12. 23:10Streamlit RQ code structure
  13. 26:29Streamlit RQ features
  14. 27:12Ordering system demo
  15. 31:28Conclusion Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark β€” the status bar button does the same
?
this help
esc
close this, then clear every filter β€” or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.