Serverless Architecture Using Firebase

Carlo Tupa Indriauan
4 min readMay 3, 2021
https://miro.medium.com/max/700/1*QQp2cY4gTH5BQcbXmGVYbQ.png

So a long story short, I was taking one of the courses at my university, especially majoring in computer science, namely software projects (Proyek Perangkat Lunak). As the name implies, I was given the task of creating a team of five people and making software with predetermined topics in this course. My team got the topic of creating mobile applications that are involved in academia, especially in the field of law. The name of the application is Pantau Peradilanmu. Well, in this article I will briefly explain about the software architecture that my team uses to build the application.

One of the most important things in software development is choosing the most suitable software architecture according to your needs.

What is Serverless?

Serverless computing (or serverless for short), is an execution model where the cloud provider (AWS, Azure, or Google Cloud) is responsible for executing a piece of code by dynamically allocating the resources. And only charging for the number of resources used to run the code. The code is typically run inside stateless containers that can be triggered by a variety of events including HTTP requests, database events, queuing services, monitoring alerts, file uploads, scheduled events (Cron jobs), etc. The code that is sent to the cloud provider for execution is usually in the form of a function. Hence serverless is sometimes referred to as “Functions as a Service” or “FaaS”. Following are the FaaS offerings of the major cloud providers:

While serverless abstracts the underlying infrastructure away from the developer, servers are still involved in executing our functions.

What is Firebase?

Firebase is a PaaS (Platform-as-a-Service) offering from Google used for application development that supports various setups such as iOS, Android, Web, Unity, C++, or REST for everything else. Google Firebase can be used for a gamut of use-cases. Whether you are building a modest mobile app with relatively simple storage needs or an enterprise application with non-trivial scaling, security, and high-availability requirements, Firebase handles it well. Firebase provides comprehensive cross-platform modules for building, releasing, and monitoring applications. Firebase services can be accessed directly from any client application (mobile device or web app), eliminating the need for dedicated servers. The upside here comes in the form of significant savings of time and resources.

Why Firebase?

You want to use Firebase because it gives you a huge suite of services that you don’t have to write.

You could duplicate Firebase’s services yourself, but why spend the time and money? And good luck coming in under Firebase’s price point. It’s not like Firebase is some extravagantly expensive service. The billing structure is entirely reasonable and one of the least expensive options… especially when you consider developer time saved.

And all of Firebase’s services are fully integrated. They talk to each other out of the box and use cohesive APIs. So you won’t waste time architecting. You won’t waste time integrating micro-services. You’ll cough up a few pennies for Google’s compute and storage resources, and you’ll spend your valuable time writing your own application logic.

In short, Firebase saves you time. We’ve seen greater than 50% reductions in developer workload for even simple projects. Your codebase stays smaller. Your bugs stay fewer. And you can ship more features with the same team.

And by saving you time, Firebase saves you money. Lots of money.

The Use of Serverless Architecture in My Team’s Project

My team uses a serverless architecture with firebase because our application focuses more on the client-side.

That’s all I can share regarding the software architecture that my team uses to build the application. Thank you for reading this article. I hope you like it.

--

--