My Shiny app uses two environments from where it reads data. This makes the server code looks like this:
# Define server logic required to draw a histogram
shinyServer(function(input, output, session) {
business.env <- new.env()
scenario.env <- new.env()
# do stuff with business.env and scenario.env
})
This is of course a simplified view. In reality my server side function calls a whole lot of R files. One of those will create these environments, while the others will read from the created environments.
My question is the following
In the case multiple users use the app, I want each of them to have a unique version of the business.env and the scenario.env. What happens now is that if a user is working in the app, while a second one comes in, this second user will reiniate the environments. How can I resolve this issue?