Namespaces for Multi tenancy in Cloud Firestore

十年热恋 提交于 2019-12-01 18:03:51

问题


How do we set a different database / namespace in Firestore? This would be helpful in building multi-tenancy SaaS products.


回答1:


Based on the recent announcements by google, it looks this will become a thing:

Cloud Firestore, currently available in beta, is the next generation of Cloud Datastore, and offers compatibility with the Datastore API and existing client libraries. With the newly introduced Datastore mode on Cloud Firestore, you don’t need to make any changes to your existing Datastore apps to take advantage of the added benefits of Cloud Firestore. After general availability of Cloud Firestore, we will transparently live-migrate your apps to the Cloud Firestore backend, and you’ll see better performance right away, for the same pricing you have now, with the added benefit of always being strongly consistent. It’ll be a simple, no-downtime upgrade. Read more here about Cloud Firestore.




回答2:


It's something being considered, but no firm plans yet.

The current method would require you to create separate projects. A collection name scheme might be possible, but you'll run into composite index limits for the project.



来源:https://stackoverflow.com/questions/46701324/namespaces-for-multi-tenancy-in-cloud-firestore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!