I am working on an Android app which is quite similar to Uber. The most important feature will be location tracking(real time driver's location on customer's device) and billing based on the distance covered and I am considering to use Firebase Cloud Function entirely for my backend.
Is it possible for do all the complex calculations (pricing, distance covered) in the backend? Is it a good idea to have this as backend for an app like this? What are the difficulties I may face in the long run?