Cloud Functions

Firebase recently announced Cloud Functions that allow you to call into code running in Firebase from iOS and Android. This idea isn’t new and is similar to AWS Lambda. In fact, the idea is old in that CORBA had callable server side code decades ago. However, the subtle difference this time is that code can be run without provisioning or managing servers.

So when might you use code at the server? It tends to be used when you need one or more of:

  • More computing power than available in the smartphone
  • When there’s need to access data, for example ‘big data’, not available on the smartphone
  • To protect intellectual property to secure code so that it can’t be reverse engineered or decompiled

In an era where developers are tending to use new, usually more complex, mechanisms just because they seem fun, rather than for valid business reasons, I encourage you to not use cloud functions ‘by default’ and instead use them for a valid reasons.