How to migrate data from Parse.com to Firebase

2020-07-06 07:05发布

问题:

I have two production apps that are currently using Parse.com. I have no plans on using Parse server, and I wanted to switch to the firebase service. I was wondering if there was a way to migrate my database from Parse.com to Firebase

回答1:

There are differences between Parse and Firebase that makes a straight migration not as easy as you would hope.

Parse is based on a relational database, where as Firebase stores all it's data in JSON - thus a "copy and paste" job isn't going to work here.

On top of that the way that the two platforms organise user authentication is completely different.

So unfortunately no easy solution here.



回答2:

Firebase has a import JSON option so if you get your data out of Parse.com as JSON, it can be imported.

However, the structure Parse uses to create relationships between data is (probably) going to be different than Firebase, so it's going to take some planning and coding to make the transition.

Once we had a plan, we found it easiest to just craft an importer App that would take the Parse.com data structure, and massage it to a Firebase format that worked for our app.

In some cases we had to start from scratch as the thought process is different from Parse (objects) to Firebase.



回答3:

Firebase API is completely different from the Parse one. It means that you have to learn other API, SDKs, etc, and rewrite your frontend code.

Does not exist an easy path to migrate from Parse to Firebase.

Moreover I think it is not a good decision. Parse Server community is growing and it is becoming even better than original Parse. In a short time, Parse Server will become the best framework for backend and API development.

My recommendation to you is to migrate to a Parse Hosting provider. Using this kind of solution you will use same Parse APIs and features. It will not require you learn other technology nor rewrite any frontend code.

You can find some options in parse server repository: https://github.com/ParsePlatform/parse-server#parse-server-sample-application

For a full disclaimer, I am co-founder of https://www.back4app.com that is the first parse server mover.



标签: firebase