The main goal of Firebase was to make it possible to develop apps with as much Client Code as possible. The aim was to make the code easier and faster and everybody knows Firebase has revolutionized the way Android apps were programmed.
But still, some functions like accessing third party API, performing battery intensive operations, etc require server-side coding. In such scenarios, the code needs to do server-side coding and deal with the hassle of finding and maintaining appropriate server tier extra charges and all the mumble-jumble that comes along with the server code.
But, now this is the worry of the past with the launch of the beta version of Cloud Functions of Firebase.
When your Cloud Function is deployed, Google’s servers listen for events associated with the function and execute the function when it is triggered. Under heavy load, Google automatically allocates new virtual servers and creates new instances to execute the function faster. Once the load decreases, instances are cleaned up.
No Maintainance: Just one command and your code is deployed to Google Servers. Scaling up or freeing resources is automatically handled by Firebase.
Logic Security: The code deployed through Cloud Functions is totally secure from reverse engineering and fully insulated from the Client to avoid any kind of tampering.
Long story short, Cloud Functions add power to the already powerful Firebase to create apps that are unimaginably versatile and powerful.
Read more about Firebase Cloud Function on firebase.google.com