Live collaboration in Shiny apps

Since a couple of years I am using the shiny package in R for interactive data visualization. It started as a tool for exploratory analysis but it’s getting more popular and it has more use cases now. For example I have helped a client with building a production dashboard to monitor industry devices in (near) real time. Also, I notice there is a growing need of editing data and collaboration between multiple users.

So when I watched some videos of the UseR conference, the google docs like collaboration with shiny video draw my attention.

The developers of the shiny collections package make use of a reactive database (RethinkDB). In short, this is a database that you don’t have to poll for updates but can notify your application in case of changes. This makes this paradigm ideal for realtime apps. Shiny uses the reactive programming model, so using this type of database extends the reactivity from the GUI until your database.

I have build a small application in which you can see the reactivity in action. To make it work on your localhost, please make sure the rethink database is running. Next, run the application in 2 tabs. When you update a row in the datatable, it immediately appears in the other tab as well.