Platform as a Service (PaaS) offers numerous benefits for organizations looking to develop, deploy, and manage applications efficiently. Some key advantages are:
- Pay-as-You-Go: Most PaaS providers offer a
pay-as-you-go
pricing model, allowing users to only pay for the resources they use. - Scaling: PaaS allows users to scale resources based on demand.
- Improved Productivity: With less time spent on managing infrastructure, teams can concentrate on developing and enhancing applications.
- Collaboration: Easy sharing of deployed apps among distributed teams or clients.
- Rapid Prototyping: PaaS enables quick prototyping and testing of new features and applications, accelerating the time to market.
- Built-in Security: Providers offer security features, including data encryption, identity management, and access controls.
In this blog, we’ll look at a comparative study of two PaaS providers: Ploomber Cloud
and Shinyapps.io
.
Ploomber Cloud
Ploomber Cloud as a platform simplifies the deployment and management of web applications in the cloud. It allows users to quickly deploy a variety of applications, such as Shiny
, Streamlit
, FastAPI
, and JupyterLab
, without worrying about the underlying infrastructure. The platform supports integration with GitHub for continuous deployments and offers tools for provisioning resources like CPUs, RAM, and GPUs.
Shinyapps.io
shinyapps.io is a user-friendly platform that enables quick and easy web sharing of Shiny applications. Many users use shinyapps.io for concept validation, prototyping, or short-term projects, while others integrate it as a key part of their analytical solutions within larger online ecosystems.
Frameworks
While Shinyapps.io
is designed specifically for hosting Shiny (R) and Shiny (Python) apps, Ploomber Cloud offers a broader range of framework support. Users can deploy various applications, including Shiny (R), Shiny (Python), Streamlit, Panel, FastAPI, Flask, and Voila, among others. For a comprehensive list, check out this link. Additionally, Ploomber Cloud supports deploying customized apps and frameworks via Docker. Here’s a guide to writing an effective Dockerfile.
Deployment Methods
Ploomber Cloud
Users can deploy apps either via the command line interface or via drag and drop in the UI.
Command Line Interface
Users can install the CLI by running the command pip install ploomber-cloud
. Here are some powerful features of the CLI:
- Users can easily initialize, re-initialize, deploy and delete projects from the CLI.
- You can monitor the status of your deployments using the
watch
command. You can also retrieve application logs using thelogs
command. - If your project is hosted on GitHub, you can set up GitHub actions for automatic deployments whenever code changes are pushed. The CLI helps configure this by generating a
ploomber-cloud.yaml
file in your GitHub workflows directory. - Users can deploy vLLM as a template via the CLI.
- For projects using secrets, you can define them in a .env file, which the CLI encrypts during deployment.
Click here to learn more about the CLI.
Web UI
The Web UI offers a simple interface for deploying your apps:
Users can also set secrets, passwords and select resources:
Shinyapps.io
For hosting Shiny apps users need:
- a development environment, such as
RStudio IDE
for R orVS Code
for Python. - The
rsconnect
R package from CRAN or thersconnect-python
Python package from PyPI for R and Python development respectively.
Once an account in shinyapps.io
has been setup, the rsconnect
or the rsconnect-python
package can be configured to use that account.
shinyapps.io
automatically generates a token and secret, which the respective package can use to access your account.
To deploy the app, users can either deploy the app from the IDE itself by clicking on the Publish
button in the top right corner of the interface, or by using the deployApp
command from the rsconnect
package.
Here’s how to publish from RStudio IDE
:
Similarly, you can deploy using the rsconnect-python
package by running rsconnect deploy shiny /path/to/app --name <NAME> --title my-app
.
For more details, refer to the documentation.
Provisioning Resources
Ploomber Cloud
Users can select CPU and RAM while deploying or redeploying an app:
The platform enables users to choose a configuration ranging from 0.5 CPU with 1 GB of RAM to 8 CPUs with 16 GB of RAM for Pro, Teams, and Enterprise plans. Additionally, non-community users can opt for up to 1 GPU. Ploomber Cloud ensures that the selected number of CPUs and the amount of RAM are guaranteed during deployment.
Shinyapps.io
Bundles are limited to a maximum size of 1 GB for the Free
and Starter
plans, and up to 5 GB for the Basic
, Standard
and Professional
plans. The instances used by shinyapps.io
range from 256 MB to 8 GB of memory.
shinyapps.io
does not make any guarantees regarding the number of CPU cores, or the speed of the CPUs that are allocated to the deployed applications.
Custom Domains
Ploomber Cloud
By default, applications are available under project-id.ploomberapp.io
, where project-id
is a randomly generated string. Users can customize the project-id
by adding their own domain or custom subdomain.
Custom domains or subdomains can be configured once the application is active. You also need to add three DNS records: An ALIAS
record and a couple of CNAME
records.
Ploomber Cloud supports only secure URLs for custom domains. Here are some reasons why HTTPS
is important:
- Data sent over
HTTP
is not encrypted, making it vulnerable to information theft, data tampering, and other security risks. However, data sent overHTTPS
is encrypted using SSL/TLS protocols, ensuring that data transferred between the user’s browser and the web server is secure and private. - Encryption provides data integrity, ensuring that the data sent and received over HTTPS is not altered in transit.
- HTTP is used in older text-based websites, while all modern websites use HTTPS.
- HTTP doesn’t provide any form of authentication, while HTTPS Uses SSL/TLS certificates to authenticate the server. This helps verify that the user is communicating with the intended website and not an imposter.
Check out the documentation on custom domains for more details.
Shinyapps.io
shinyapps.io
also allows users to host their applications on domains that belong to them.
However, a major drawback of shinyapps.io
is that the platform currently doesn’t support secure URLs for custom domains. The URLs defined in the application settings are accessible only via the HTTP
protocol, not the HTTPS
protocol.
To learn more, click here.
Authentication and User Management
Ploomber Cloud
Ploomber Cloud allows users to authenticate their apps using two different mechanisms:
- Password Protection: This approach is as easy as a single click and entering your username and password, and is suitable for use by developers of any skill level. All credentials are encrypted, thus making it extremely challenging for unauthorized individuals to decipher. Once your application is ready to be viewed, you’ll be prompted for the username and password:
- Auth0: Auth0 is a platform that allows developers to implement secure login processes and control access to applications. Ploomber Cloud enables you to easily secure your applications using
auth0
.
Here are some advantages of using auth0
:
- Single Sign-On (SSO): allows users to log into multiple applications using the same login credentials.
- Social login: allows users to log in using their existing credentials from another account, such as Facebook, Google, or Amazon.
- Passwordless connections: allows users to log in using a one-time password (OTP) sent via SMS to their phone or their email address.
- Multi-Factor Authentication: acts as an extra layer of security that requires users to provide more than one piece of verifying information before logging in.
- Account recovery: allows them to regain access to their account if the user has forgotten their password or lost access to one of their devices.
You can easily deploy your apps with auth0 authentication using the Ploomber Cloud CLI. Here’s how the login looks like:
Auth0 supports multiple identity providers which can be categorized into the following categories:
- Social Identity Providers: Google, Facebook, LinkedIn, GitHub, BitBitbucket, etc.
- Enterprise Identity Providers: Azure Active Directory Native, Google Workspace, OpenID Connect, Okta, etc.
- Legal Identity Providers: Providers facilitated by
Criipto
.
To learn more click here.
shinyapps.io
shinyapps.io allows users to change the application visibility to private, enabling the addition of authorized users through the Invite User
button by entering their email addresses:
These invited users will receive email invitations to access the application. If they do not have an authenticated account on shinyapps.io, they can easily create one using Google
, GitHub
, or shinyapps.io
authentication methods.
Check out this section to learn more.
Comparative Analysis
Ploomber Cloud | Shinyapps.io | |
---|---|---|
1 | Multiple frameworks supported | Only Shiny apps can be hosted |
2 | Users can deploy apps via the CLI or the Web UI | Users need to deploy through an IDE or the rsconnect /rsconnect-python package |
3 | All Python versions supported via Dockerfile | Only supports Python 3.7.13, 3.8.13, 3.9.13 |
4 | Since users can deploy via Dockerfile, they can use any Linux image compatible with the R package used | Doesn’t support R packages that do not run on Ubuntu Linux |
5 | Number of CPUs utilised can be selected and guaranteed | Doesn’t make guarantees about the number of CPUs |
6 | Upto 8 GB of RAM provided | Upto 16 GB of RAM provided |
7 | Only supports secure URLs for custom domains | Doesn’t support secure URLs for custom domains |
8 | Supports simple password based authentication as well as Auth0 authentication | Supports Google authentication, GitHub authentication, and shinyapps.io authentication |
9 | GPU support for Pro users | No GPU support |
10 | Encrypted secrets can be passed to the app via the CLI or the UI | No provision of passing secrets |
Shared Features
- Each application is contained in its image, with its own set of code, packages and data.
- Apps are shut down and restarted whenever there is an infrastructure failure.
- Analytics dashboard that provides a variety of metrics to help you gain insight into the use of your applications.
- Provision of adding custom domains on the Professional plans in both platforms.
- Application logs that help in debugging encountered issues.
- Different plans and pricing for different user tiers.
Conclusion
In conclusion, we will outline the scenarios in which users should use each of the discussed platforms:
Ploomber Cloud
- Deployment of various web applications beyond just
Shiny
- Flexibility in deploying custom apps using Docker
- Integration with GitHub for continuous deployment
- Selection and guaranteed usage of computational resources
- Secure custom domain URLs enforced with HTTPS
- Advanced authentication methods like Auth0
Shinyapps.io
- Users who primarily work with Shiny (R and Python) applications
- Prefer deploying apps directly from an IDE
- Need quick deployment for prototyping, concept validation, or short-term projects
- Do not require the complexity of Docker or extensive command-line interaction
- Can work within the resource limitations of the platform
- Need basic authentication and user management features