Managing Bookmarks in RStudio Connect

We've just started using the server bookmarking state available in RStudio Connect - that is, saving the application state (and key variables) to a folder on the server rather than encoding into the URL.

It's great - works well and gives us huge flexibility.

But there are two features that would improve this:

  1. Ability to retrieve bookmark information from R
  2. Ability to manage (delete) bookmarks

Why:

  1. It would be great to build a table of bookmarks for a given app and include this within the app - with key details for each bookmark. This would allow the users to view existing bookmarks, which are easily lost and give quick links back to app states

  2. Bookmarks which include large data frames / input files take up a non-trivial amount of space. This could quickly grow out of control.

Any thoughts on how the above could be achieved?

Thanks!

For #1 - you might be interested in this PoC that Joe Cheng created: https://github.com/jcheng5/rpharma-demo

The app automatically includes a gallery of "saved states" (that uses bookmarking behind the scenes).

We'll looking #2.

1 Like

Thanks @slopp

Looks interesting - definitely the kind of behavior I'm after. Any idea of whether this would work with the current structure of bookmarking in RSC? Looks like the idea would work but I'm not sure where bookmarks are saved on the server / whether the app would be able to see the directory.

@scw yes, this approach should work with the current state of RSC. The sample code essentially saves the bookmarked URLs in a sqlite database. Those URLs, in turn, instruct Shiny to restore state from the bookmark directories on disk. The app code doesn't need to know anything about those directories. Bookmarking works the way it always does, the Shiny app just happens to present users with a list of the previously generated URLs (in the form of a set of thumbnails).