• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

420
Views
Migrating from Firebase to NodeJS MongoDB

I just released my first MVP app on the iOS app store, and its doing really well. The app is essentially a chat application that uses Firebase.

Since I'm using Firebase, it's really hard to do complex queries. And in order for me to add cool features to my app. I need to be able to do that.

I decided to use NodeJs and MongoDB to run my app. However I don't want to kill what I have going right now. Is there any way, to migrate the data I have in Firebase to MongoDB and keep it in sync real time?

I was considering doing an observeSingleEvent to download all the data. and then using childadded, childremoved to keep everything in sync realtime.

Is this going to be an issue if you have a lot of active users on the app?

Also, is there a service that offers to do that?

about 3 years ago · Santiago Trujillo
2 answers
Answer question

0

Congratulations on the app. The problem you are facing is a classic database migration problem. My usual recommendation is the approach you outline: make a copy of the data into the new system, then keep them in sync while you move over functions to read from the new database, then finally turn off the old database completely.

For moving to MongoDB, I would recommend Stitch which uses Atlas to store data in the cloud.

This has a number of advantages: - Access to full MongoDB functionality & scalability - No lock-in for which cloud provider you use, or services you make use of - Powerful, fine-grained access controls, which you control

From Firebase, you should be able to export existing data as JSON, and them import into MongoDB with mongoimport. The docs have some create tutorials and example apps to get you started.

about 3 years ago · Santiago Trujillo Report

0

I see this is an old post, I hope your migration was a success!

I would like to take the opportunity to point others that want to migrate away from Firebase to a new open source alternative called AceBase, which is inspired by Firebase and has powerful indexing and querying options. AceBase uses the same syntax as Firebase, so it's actually possible to keep most of your existing Firebase code and it should work with AceBase.

On top of that, AceBase is able to cache your data in the browser (IndexedDB) so your app can be used offline. Any changes made while offline are automatically synchronised with the server upon reconnect.

AceBase also has a unique feature called "live data proxies" that allows you to code against an in-memory object that contains your data. All local changes to the object are automatically stored in the database and synced with the server, and remote changes are reflected in your local object in realtime.

Check out AceBase at npm: https://www.npmjs.com/package/acebase

about 3 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error