Firebase Cloud Functions - Cool is Cooler

Firebase Cloud Functions image

Even prior to the demise of Parse, we’ve believed that Firebase is an attractive solution for mobile apps that need a backend. Since Parse has been flushed by Facebook, and gone open-source, Google has done nothing but push resources to Firebase. Now, Firebase is looking REALLY interesting.

What is Firebase, and why should I care?

These days, most apps share some amount of data with a cloud. This could be login data, profile data, scores, or whatever. Some of this can be stored on the device, but doors open when it can be persisted to a cloud. Users can login and access their data on different devices or delete and reinstall an app and continue with their old account.

Backend development is a field of software development with the need for real skill and valuable time. Generally, a dedicated backend developer (or more than one) is used on a project. This yields a tuned and tailored backend solution that is built to suit the needs of the app; however, there is a measurable additional cost in production and upkeep. As success flows in, there will likely be adjustments to ensure that it continues to perform at the levels expected by users.

This is where Firebase steps into the equation.

Firebase is a Backend as a Service, also known as a BaaS. It offers a pre-packaged backend for apps that scales automatically. It’s most notable feature is that it offers a real-time backend; meaning, it updates on the iOS or Android device as soon as the data in Firebase changes. In a chat-app situation, as soon as one user presses “Send”, the message arrives on the other user’s screen without the need to press “Reload” or even pull down on the screen to refresh.

This BaaS is very affordable. Under many use cases, Firebase should remain free - even approaching 100,000 users. After the free tier is passed, there is a nice $25/month plan and a pay-as-you-use plan.

The Firebase we’ve come to know and love was always a bit limited, though, as any logic had to be written on the client side - iOS or Android code. An often used alternative has been to accompany Firebase with a separate server; however, this path sometimes tends to turn into a custom backend solution, and Firebase is not used.

In steps Firebase Cloud Functions

This is the piece of the puzzle for which Firebase fans have waited! Now, we can put the server functions that would have lived in a separate server (or on the device) in Firebase Cloud Functions, and Google will manage it right along with the rest of the backend. There will be greater security and less awkward code winding up on the client side, and that’s a good thing!

Sounds cool, but why should I care?

The original idea of the BaaS, and Firebase, is to enable a mobile developer to build more robust apps on their own. The backend work is done for them; thus, a backend developer isn’t necessary. Yes, this is a cost saving product.

Is Firebase appropriate for my app?

Prior to Firebase Cloud Functions, the debate was largely falling in favor of Firebase “usually” being appropriate for an app. It’s cheap, fast, reliable, well-supported, and that’s the recipe for a happy business. More and more, companies we questioning the decision to invest in a full custom backend solution at the beginning because of the time, effort, and expense. They want to hurry to market!

Now, the argument is getting stronger… much stronger.

The argument can now be made that Google’s Firebase would be a sound and economical backend solution for many, maybe most, apps. Firebase Cloud Functions simply makes the development process faster and easier, so the cost of development and upkeep drops.

Stepping into the future…

We are actively using Firebase in projects with a great deal of success. Also, we often deploy custom solutions using other technologies to AWS and the like. The dominant point is that there are good options that exist - even more now that Firebase has introduced Cloud Functions.

When choosing a backend solution, much of the decision should be governed by where our client is in development. If there is already a backend, and we are performing upkeep or an update, we generally don’t move over to Firebase unless it is specifically requested. For clients that are just beginning their app, we carefully map out the options so an informed decision can be made.

We’d like to say, though, that we’re big fans of what Google is doing with Firebase. It’s great for developers, clients, and the industry as a whole.