I have a simple shiny app that keeps track of the number of times the user has pushed a certain action button (actionButton()
), and this total is reported back to t
I think you're mistaken. Shiny, by default, creates one process per Shiny app, but can facilitate an unlimited number of sessions (i.e. "user connections") in a single app/process.
Checkout this chapter of the tutorial for more info on scoping: http://rstudio.github.io/shiny/tutorial/#scoping
Basically, anything defined inside of the shinyServer()
expression is going to be private to a single user's session. Any variables you put outside of shinySever
will be globally shared between all users. So you can just keep your variables (e.g. a counter of clicks) inside of shinyServer()
if you don't want them to be shared across sessions.