Using a serverless platform
Tags: webdev, programming, serverless
Published: 2022-09-10 13:49:11

Do you need a server? This is a question few people ask themselves when they want to deploy an application to the web. How often do you ponder on it before you deploy your next web app?

Using a server gives room for much control and freedom. We are in 2022 and there are reliable alternatives that exist today. If the need for control and freedom is not a necessity in my humble opinion, I'd say it is not justified. Say you are starting and you want to handle a project, for a basic app it is not smart to go out and get a shiny new server. There are some things that you need to consider before you jump in.

- You will pay for the server irrespective of whether or not you are using it.
- It will require another layer of complexity to your application.
- Your total expenses would double up because then you'd have to pay for extra resources.

To read more articles like this please visit [Netcreed](https://netcreed-blog.vercel.app)

No matter how well thought out your idea is, there's a risk associated with everything we do. I believe that we should think smart in our approach, serverless infrastructure exists, and for a very good reason. 

Serverless platforms allow us to build our applications without making use of a personal server, the platform abstracts away that part of the development process while providing a simple interface for interacting with your data either visually or using your preferred language of work.

Let's look at some of the provisions of these serverless platforms;

- Database,
- Authentication
- Hosting
- File Storage
- Serverless functions

These services are the abstraction we spoke about earlier. You'd agree with me that these are almost equivalent to what you'd get with a personal server. All from a single dashboard presented without much hassle, it would have taken you twice as much and even more if you were setting up these services yourself, and then if you could for a starter app your costs are already piling up. 

Take note, these platforms are not for free. You'd have to pay to use them on a serious scale. This is another area where the serverless platform shines, your cost will always reflect the customer usage of your application. If your user base is quite small, you can stay within the free quotas. This also allows you to test your app without incurring any unnecessary expenses.

When your app becomes popular and your user base grows, the platform will also be responsible for scaling up your application for you. Your focus is kept solely on building your application from the client side. 

Entire business models can be built from these platforms provided that your app is useful. Companies like Wattpad, Halfbrick, and Gameloft are using these platforms. This gives you a picture of how reliable they can be and what you can achieve using them.

Let me shortly discuss an experience I recently had with two clients, one required that their app be deployed to AWS, and decided to settle for AWS light sail server. This client's needs were understandable. They needed total control of all their user data based on the type of data they are collecting from the user.

However, if you ask me personally, I still think that we could have achieved the same result using a serverless platform that is if they were open to using it. I built another App, an E-Commerce application for another client using Firebase from Google, and from a user perspective, the difference in the quality of both applications is indistinguishable.

The client with the server will have to pay for it monthly, even as he is just starting with little to no customers. The application also cost him more to build because of the work required since we were building both the frontend application and the backend application. Even making changes to the system often requires work on both sides of the application. This is not an ideal situation for someone just starting their business with no guarantee.

The other client that went with a serverless platform had less to worry about. The down charge was quite cheap, there is no server to manage. The entire project is only on the client side keeping our concerns in only one place. Changes to the system are a rather straightforward affair and are only done in one repository.

I can keep going on about all the reasons why a serverless platform beats a personal server for startups and new ideas, but we will now consider some notable examples of serverless platforms out there and what they offer to us.

### [Firebase](https://firebase.google.come)

This is the number serverless platform, with over 1 million weekly downloads on npm. I use forecast on most of my serverless projects of not all of my projects because of how easy it is to use. Authentication can be added to your code with a single function call and just setting up some button on the dashboard. Talking about dashboards, Firebase has a great user dashboard that presents to you all the services you are currently using on the platform. 

Firebase has its document-oriented database called Firestore, this is a NoSQL database similar to MongoDB. It is very intuitive and easy to use. It can scale up easily and supports real-time updates, allowing your UI to be in sync with your database.

Firestore has a hosting service that allows you to quickly deploy your application, This hosting service can be easily configured to host multiple sites within the same project. Traffic from the hosting can also be redirected to other GCP projects too.

Firebase also has its built-in file hosting service that allows you to upload files of any type if your application needs to collect that type of data. Firebase will remain the number one serverless platform for me for the foreseeable future.

There is also a serverless function service that allows you to write functions that can be called from an endpoint in your application or can be triggered by real-time updates happening on your application when a user registers when a new Firestore document is created, and lots more although this function service is paid for from the start.

This is because Firebase allows you to spin up a ton of projects for free as far as you stay within your application free quotas, if you, however, exceed the free quota it is then a pay-as-you-go, model, where your application costs reflect its usage.

### [Superbase](https://superbase.com)

This is quite new to the serverless platform and poses itself as a firebase killer, which I highly doubt that it will do. Anyway, I have not used this service personally as I am content with what Firebase offers. But let me provide a breakdown of the service that they provide

Superbase has an authentication service that you can use for handling user authentication. It also has a SQL database that you can visually interact with and this is one of its selling points. It allows you to visualize your relational database, it has a storage service for your applicator files, and a cloud function service.

### [Appwrite](https://appwrite.io)

This is another serverless platform that enables quick application development. This one can be self-hosted. It provides the basic serverless platform service. It has a hosting service, a database, a file storage service, and a cloud function service.

Appwrite is quite new on the block too and is not yet a full forged hosting solution like the others on this list. This is because you have to host the infrastructure yourself. Digital Ocean has a prebuilt solution for this by allowing you to host appwrite with the click of a button, we do expect them to roll out a hosting service themselves but that remains in their future.

There are other serverless platforms that we did not consider in this article for the sake of time but they are worth mentioning, there's [AWS amplify](https://aws.amazon.com/amplify/) although it is not as popular as the others on this list a few companies are also relying on it and using it.

What are your thoughts on serverless platforms? Which of them have you used and what was your experience with it? If there's any other platform that you know and use that I did not mention then you can drop it in the comment section below. 

To read more articles like this please visit [Netcreed](https://netcreed-blog.vercel.app)

I need your help in getting over 250 engagements on this [tweet](https://twitter.com/Ofon_lily/status/1566518135213248526?t=ZAWkiZYbRIEjcS4MYrE0VA&s=19), the contestant needs the engagements so they can win a laptop, thanks and until next time.