ShinyProxy 0.8.0

December 19, 2016
By

(This article was first published on Open Analytics - Blog, and kindly contributed to R-bloggers)

ShinyProxy is a novel, open source platform to deploy Shiny apps for the enterprise or larger organizations. In our last blog post we mentioned the need people felt to integrate Shiny apps in content management systems like Drupal. Release 0.7.8 added one extra feature in this respect so people could also include ShinyProxy hosted Shiny apps in external iframes.

It also kicked-off our effort to support service scalability and ever more complex apps. In the scalability area, we introduced facilities to manage and set memory limits on individual Shiny applications. This is as easy as adding a docker-memory field:

apps:
  - name: euler
    display-name: Euler's number
    docker-cmd: ["R", "-e shiny::runApp('/root/euler')"]
    docker-image: openanalytics/shinyproxy-template
    docker-memory: 256m
    groups: scientists

and one can use b, k, m or g as units for the memory limit.

Regarding efforts to support more complex apps, we introduced the possibility to pass arbitrary numbers of environment variables to the Shiny containers. One use case is to be able to pass database connection strings as environment variables to the containers. This can be done by specifying the path (on the host) in which the environment variables are defined:

If we use the Euler app example again (the example that can be used as a template to deploy your own apps), the configuration would use the docker-env-file field as in:

apps:
  - name: euler
    display-name: Euler's number
    docker-cmd: ["R", "-e shiny::runApp('/root/euler')"]
    docker-image: openanalytics/shinyproxy-template
    docker-memory: 256m
    docker-env-file: /path/to/env-file
    groups: scientists

One way to deal with persistence in Shiny apps is through databases. Another important option is to achieve persistence via file systems that need to be accessible across sessions or across users. In Docker world the elegant solution to deal with this is to mount (host) file systems as volumes on the container.

Using our beloved Euler app again we would use the docker-volumes field which supports mounting multiple volumes as well:

apps:
  - name: euler
    display-name: Euler's number
    docker-cmd: ["R", "-e shiny::runApp('/root/euler')"]
    docker-image: openanalytics/shinyproxy-template
    docker-memory: 256m
    docker-volumes: [ "/host/path1:/container/path1", "/host/path2:/container/path2" ]
    groups: scientists

Documentation has been updated on the project homepage and as always community support on this new release is available on our support site.

With the New Year fast approaching we are setting our intentions for the next releases, so don’t hesitate to send suggestions for ShinyProxy and have fun!

This post is about:

r, shiny, shinyproxy

To leave a comment for the author, please follow the link and comment on their blog: Open Analytics - Blog.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Sponsors

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)