从MongoDB迁移到Firebase [英] Migrating from mongodb to firebase
问题描述
有多容易,有什么需要注意的。
- Firebase API本质上是实时/异步的;具体来说,当客户端正在读取数据。将您的后端请求/响应代码迁移到客户端,并使用这种方法可能是最大的努力层面。
- MongoDB的功能集也会有所不同和Firebase提供;值得注意的地方包括Mongo对MapReduce,Cursors和自由文本查询等功能的支持(Firebase目前不支持这些地方)。
<另外要记住的是,Firebase并不是一个完全或没有的事业。应用程序绝对可以利用实时,缩放和平台功能。
My app currently uses mongodb and I'm looking forward to migrating it to firebase instead.
How easy is it to do and are there things I have to watch out for.
Given that both MongoDB and Firebase are non-relational in nature, most of your data should map to Firebase cleanly. The Firebase REST endpoints support regular JSON, so getting your data in (and, back out if you choose) should also be easy. The main areas you need to keep watch for are:
- The Firebase API is realtime/asynchronous in nature; specifically, when clients are reading data. Migrating your backend request/response code to the client and using this approach will probably be the biggest area with regard to level of effort.
- There will also be a disparity in the feature set that MongoDB and Firebase provide; notable areas include Mongo's support for doing things like MapReduce, Cursors, and free-text queries (Firebase doesn't currently support these areas).
The other thing to keep in mind is that Firebase isn't an all-or-nothing type of undertaking. Apps can definitely take advantage of the realtime, scaling, and platform features piecemeal.
这篇关于从MongoDB迁移到Firebase的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!