Background: My team currently has an Rshiny dashboard deployed in Cloud Pak, and data is read into the dashboard from a storage volume outside of the server function (at the beginning of the app.R file). Various functions (outside and inside the server function) use this data, and the data is updated daily in associated Cloud Pak storage volumes.
Issue: Occasionally (and this seems to happen when someone has the dashboard open while the data is being refreshed), the underlying data is updated, although the dashboard does not pull in the new data.
Question: Is there a way in Cloud Pak to forcibly remove all users from a deployed Rshiny dashboard at a specific time (around when underlying data is being updated)?
Workaround: Redeploying the dashboard or performing the "replace asset" function in CPD with a different asset and switching back to the current one forces the data to be refreshed.
Other potential solutions: I have looked into
reactiveFileReader (which checks a file's last modified timestamp at a specified interval and reloads that file if a more recent version is available), although reactive expressions have to be embedded in the server piece of the application (which, to my understanding, only applies to a specific session). The current dashboard is coded to load in data outside of the server code block (so that it is loaded in once for all user sessions of the application), so
reactiveFileReader may not be a solution in this case. In order to move towards session-level data, a large portion of the dashboard would need to be reworked (since it was developed based on the assumption that these datasets would be available at the application-level).
------------------------------
Sam Jasper
------------------------------
#CloudPakforDataGroup