MongoDB vs Firebase

itsclarke picture itsclarke · Mar 24, 2015 · Viewed 115.1k times · Source

What are some quantitative advantages of using Firebase over MongoDB? (not opinions)

I know that Firebase is a cloud based service with it's own API, but I feel like Mongo may give me greater control in the long run.

Answer

Kirill Slatin picture Kirill Slatin · Mar 24, 2015
  • Firebase is a real-time engine with backward connectivity. I.e. you might build a cross-platform app where clients subscribe to events on specific data and server actively informs clients about changes
  • The data layer is hosted for you. Mind that it is highly scalable. It's a nice kickstarter solution. Including auth management
  • Geo-Fire. Real-time geo coordinates solution.
  • Evident drawbacks of Firebase are:
    • You have to pay for it as soon as you start growing
    • You can't host datalayer (if owning data is critical or you develop an app for some separated subnet)

EDIT: here is a nice article how to replace Firebase in your app with Node.js+MongoDb. It shows how much work you would have to do on your own, and explains, IMHO, why a startup (small app) should begin with Firebase (if real-time updates to clients are required) and proceed with MongoDb (in any case self-written solution) if the project keeps evolving

EDIT 2: after being acquired by Google Firebase now offers various perks on top of its basic features which you would struggle to build on your own:

  • For development

    • Cloud Messaging: Deliver and receive messages across platforms reliably
    • File Storage: Easy file storage (including iOS)
    • Hosting: deliver static files from Firebase's servers (Included in Free plan)
    • Crash Reporting: Not a full logging service, but crucial help
  • For growth