Combine the 4 hosting patterns with 3 deployment modes and there you have the 8 ways for hosting Shiny apps.
This post takes a look at the taxonomy of Shiny hosting options. There are 8 broad ways how you can host your Shiny app. On one hand, we can group the 8 options based on what middlewares are used between the Shiny app and the operating system – we call these hosting patterns. You can combine these patterns with different deployment options.
The classification laid out here focuses on the DevOps aspects. You will see the characteristics of the hosting options that are a direct consequence of the hosting and deployment modes.
Hosting patterns
There are four types of hosting patterns for Shiny apps depending on what the user who is managing the applications is expected to do:
- Local Shiny: the user is not expected to deal with any middlewares
- Shiny Server: user manages Shiny Server that acts as a middleware
- Dockerized Shiny: user manages Docker images and containers and Docker acts as the middleware
- Dockerized Shiny Server: user manages both Docker and Shiny Server that both act as middlewares
A previous review about these Shiny hosting patterns compared licensing, dependencies, concurrency, and restart policies.
Deployment modes
You can find 3 main deployment modes for Shiny apps:
- Push-button publishing: the easiest deployment option straight from the RStudio integrated development environment (IDE)
- File transfer based publishing: when the user deploys scripts for the Shiny app via file transfer, e.g. SFTP, SCP, or even git
- Docker push/pull: locally built Docker images are pushed to the Docker registry, images are pulled from the registry to the server
All 3 deployment modes can be executed in a continuous integration and delivery (CICD) setting. We do not consider CICD to be a separate mode, but rather a practice that involves automation and testing when bridging the development and operations sides of DevOps.
Hosting options
The following visual summarizes how the hosting patterns and deployment modes relate to the 8 hosting options. Some of the most important characteristics are also noted, such as if there is a free tier available, licensing and server hosting costs, and whether it is possible to host apps other than Shiny.