DEV Community

Sami Yousef
Sami Yousef

Posted on • Originally published at blog.samiyousef.ca on

Top Backend-as-a-Service Solutions (BaaS) in 2023

Top Backend-as-a-Service Solutions (BaaS) in 2023

What is BaaS?

Backend-as-a-service (a.k.a BaaS) is a model that provides developers with things such as user authentication and edge functions without needing to host a backend. The backend for the application is hosted by a third-party company (or sometimes self-hosted) and is "rented" to the client, hence the name.

It has exploded in popularity recently because of its ease of use and cost-effectiveness for small applications. With that said, not all BaaS solutions are created equally. Let's compare some alternatives while keeping the following things in mind:

  • Features
  • Pricing
  • Scalability
  • Security
  • Platform support and extensibility ## Comparison

Firebase

Features: Firebase's products are split into "Build", "Release & Monitor", and "Engage". Their build products include Firestore, Realtime Database, Cloud Functions, Authentication, and much more. The newly added Firebase ML allows you to add artificial intelligence to your project with minimal oversight.

Pricing: Firebase offers a generous free tier giving you 1 GB of Realtime Database, 1 GB of Firestore, 10K phone verifications, 5 GB of Cloud Storage, 200K CPU-seconds for Cloud Functions, 10 GB of static hosting, and 1000 ML API calls. Pricing above the free tier is competitive, being only slightly cheaper than AWS Amplify. See more here.

Scalability: Given Firebase is operated by Google, you almost do not need to worry about scaling. However, one caveat is the Realtime Database, which is limited to 1000 writes per second. Additionally, as your application grows, its cost will grow faster. At a large scale, Firebase is less cost-effective than other solutions.

Security: Being a proprietary platform, it's hard to assess the security of Firebase's internals. However, Firebase's SDKs are open-source and have no known security issues as of this time. The majority of Firebase is ISO and SOC-compliant, but some Firebase products have not completed ISO 27017 and ISO 27018 certifications, which might be a deal-breaker for large organizations.

In 2018, Appthority Inc. found over 3000 insecure Firebase databases leaking millions of records, some including 2.7 million plain-text passwords. Most agree that the fault lies with the developers for misconfiguring the databases and neglecting to encrypt passwords, but some argue Firebase should have better documentation or encryption by default.

Platform Support and Extensibility: Firebase has client SDKs for iOS, Android, Flutter, Web, C++, and Unity. Firebase also offers admin SDKs to integrate with your backend for Node.js, Java, Python, Go, and C#. If none of these meet your needs, Firebase also has a well-documented REST API, making it compatible with almost any application.

Firebase features a wide variety of extensions making integrations easier. Firebase extensions are currently in beta, so they're not quite ready for production. However, this is an excellent feature as it lets you do things like resizing an image or running payments with Stripe with minimal coding.

Best for: Medium-sized applications or start-ups, or developers just starting with BaaS.

AWS Amplify

Features: AWS Amplify offers a comprehensive set of tools for building cloud-powered mobile and web applications. Its offerings include APIs, backend services, authentication, and storage. Amplify also integrates with other AWS services such as AppSync, Lambda, and Amazon S3 for even more functionality.

Pricing: AWS Amplify operates on a pay-as-you-go pricing model, meaning there are no upfront costs or ongoing commitments. The pricing is competitive and only slightly more expensive than Firebase. Pricing may vary depending on the services utilized, but AWS provides example usage scenarios to assist in cost estimation. See more here.

Scalability: Since Amplify is built on the highly scalable AWS infrastructure it's ideal for applications that need to handle large traffic and growth. You almost never have to worry about your application crashing or slowing down during peak usage times.

Security: Like Firebase, Amplify is proprietary, meaning it's hard to assess its security. However, Amplify is part of multiple AWS compliance programs. It is frequently audited by third parties such as SOC, PCI, ISO, HIPAA, MTCS, C5, K-ISMS, ENS High, OSPAR, HITRUST CSF, and FINMA. Amplify's compliance makes it ideal for large, international companies that are required by law to use solutions that meet certain standards.

Platform Support and Extensibility: Amplify has SDK support for Javascript, Swift, Android, Flutter, and React Native. Amplify also has well-documented REST and GraphQL APIs making it easy to integrate with almost any platform.

AWS Amplify also offers a lot of options for customizing your backend. You can override generated resources, access and import existing AWS resources, and run custom scripts during deployment with the help of command hooks. And if you have specific DevOps tools and guidelines, the export feature lets you easily integrate Amplify into your existing setup. However, this needs to be set up manually, and it's much harder than Firebase's extensions feature.

Best for: Large-scale, complex applications and/or enterprise-level businesses.

Supabase

Features: Supabase is an open-source Firebase alternative. It offers a Postgres database, Authentication, instant APIs, Edge Functions, Realtime subscriptions, and Storage.

Pricing: Supabase offers free, monthly, and pay-as-you-go pricing models. The pricing is reasonable and cost-effective compared to both Firebase and AWS Amplify. For $25/month, you get an 8GB database, 100GB file storage, 2M Edge Function invocations, daily backups and more. And since Supabase is open-source, you can host it yourself, although this is at the cost of scalability.

Scalability: Supabase is centred around one Postgres database, which makes it very scalable vertically. However, it's difficult to scale Supabase horizontally without sharding or replication, which come with their own pitfalls. According to Inian Parameshwaran, an engineer at Supabase, "We don't have a good solution yet for scaling Postgres horizontally, even in the hosted version, but we are working on that."

Security: Supabase is open-source, which means its security is transparent and easy to assess. It's SOC2 Type 1 compliant and sensitive information is encrypted at the application level before being stored. Additionally, Supabase's security monitoring is automated by Vanta, and Trust Reports are published regularly.

Platform Support and Extensibility: Supabase officially supports only Javascript and Flutter, but the community has built SDKs for Python and C++, too. Supabase has instant APIs, meaning API endpoints are automatically generated based on your schema. This would allow you to use Supbase on unsupported platforms, but the API documentation is not as robust as Firebase or AWS Amplify.

Like Firebase's extensions, Supabase offers integrations with third parties. Unlike Firebase, integrations with Supabase are a bit harder to set up, but the process is well-documented. Additionally, the open-source nature of Supabase means that you can add custom features and extensions to your backend as you see fit.

Best for: Small to medium-sized applications, projects that need a cost-effective solution, and developers who are looking for an open-source platform.

Appwrite

Features: Appwrite is an open-source, self-hosted backend-as-a-service platform that offers Databases, Authentication, Storage, and Functions. Appwrite Cloud, the hosted version is currently in development but will be coming soon.

Pricing: The cost of hosting Appwrite varies depending on the hosting solution you use. Pricing for Appwrite Cloud is not available as of this date.

Scalability: Appwrite is built with scalability in mind, but it must be scaled manually. It uses a few Docker containers to run, and each container has its own job. Since most of these containers are stateless, scaling Appwrite is as simple as replicating them and putting them behind a load balancer.

Security: Like Supabase, Appwrite is open-source meaning security is easy to assess and vulnerabilities are caught and fixed quickly. As of writing, there are no known vulnerabilities in Appwrite. Additionally, Appwrite implements most modern security features like rate limiting and encryption.

Platform Support and Extensibility: The Appwrite server runs on Docker, making it supported on almost every platform. Appwrite also has client SDKs for the Web, Android, iOS, and Fluter, and admin SDKs for Node.js, Deno, PHP, Python, Ruby, Dart, Kotlin, and Swift. If none of these options fit your needs, Appwrite also features REST, GraphQL, and Realtime APIs allowing you to integrate on almost any platform.

Appwrite does not feature pre-built extensions or integrations. However, you can add custom features or make your own integrations because Appwrite is open-source.

Best for: Small- to medium-sized applications, and developers who want to host their own platform.

Parse Platform

Features: Similar to Appwrite, Parse Platform is an open-source, self-hosted BaaS. Parse offers a comprehensive set of features like Authentication, Role-based access control, File Storage, Notifications, Cloud Functions, Analytics, and much more.

Pricing: Parse Platform is entirely self-hosted, pricing will vary depending on your hosting solution.

Scalability: Like Appwrite, the Parse server is stateless, meaning scaling it is as easy as replicating it and putting it behind a load balancer. Parse supports MongoDB and Postgres, which need to be scaled separately. According to back4app, Parse can be scaled to handle well over 1000 requests per second.

Security: Parse uses Snyk to find vulnerabilities in its code base. As of writing, Parse has one high-severity denial of service vulnerability and 6 various medium-severity vulnerabilities. Besides these vulnerabilities, Parse is relatively secure because of its open-source nature.

Platform Support and Extensibility: Parse has excellent platform support with SDKs for Objective-C, Android, Javascript, Swift, Flutter, Dart, PHP, .NET, Unity, and even Arduino and Embedded C. And if these SDKs somehow don't fit your needs, Parse has REST and GraphQL APIs to easily integrate with any platform.

Parse does not have official extensions or integrations, but there are lots of community-built extensions, adapters and boilerplate starter code. Additionally, like any other open-source platform, you can add or modify Parse in any way you'd like to fit your needs.

Best for: Developers who want a comprehensive set of features while still hosting their own solution.

PocketBase

Features: PocketBase is an open-source BaaS that features Authentication, File storage, and a real-time database. The kicker is the entire database is a single SQLite file, hence the name.

Pricing: PocketBase is entirely self-hosted and the price will depend on your hosting solution.

Scalability: Because PocketBase utilizes a single file as its database, it cannot scale horizontally. Additionally, scaling it vertically will be limited by the read and write speeds of your disk.

Security: PocketBase has excellent security because of its open-source nature and any vulnerabilities are quickly discovered and fixed. As of writing, PocketBase has no known security vulnerabilities.

Platform Support and Extensibility: PocketBase can be used as a standalone app or as a Go framework. When used as a standalone app, it only has official SDKs for Javascript and Dart. PocketBase does have a Web API so it can integrate with any platform.

Best for: Small-scale applications and prototyping.

More Useful Information

Choosing the Right BaaS Solution for Your Project

When it comes to selecting the perfect BaaS solution for your project, it's vital to consider the success and growth potential of your application. If you're looking for an open-source solution, Appwrite, Supabase, and Parse Platform are all great options to consider. On the other hand, if compliance with specific regulations is a must, AWS Amplify may be the ideal solution for you. And if you're new to BaaS and value strong community support, then Firebase is the way to go. To make an informed decision, take the time to carefully evaluate each solution, comparing features, pricing, and security measures to determine which one best fits your project's unique needs.

Best Practices for Implementing a BaaS Solution

When using a BaaS, it's important to follow best practices to ensure a seamless and successful implementation. To ensure sensitive data is protected, you should use a strong encryption algorithm such as AES and always use HTTPS when making requests to the backend. Additionally, you should use environment variables and repository secrets to store API keys and never hard-code them. Finally, make sure to thoroughly check API response codes and handle them appropriately to avoid any unexpected errors in production.

Conclusion and Final Thoughts

Backend-as-a-service (BaaS) is a cost-effective solution for developers who want to host their application's backend without having to worry about the nuances of implementing their own. The choice of BaaS solution will depend on the size, complexity, and specific requirements of your application. Each BaaS has its own strengths and limitations and the best solution will ultimately depend on your specific use case.

Top comments (1)

Collapse
 
entrealist profile image
Vlad Smirnov

Seriously? You really copied from Chat GPT?