简体   繁体   English

从mongod到pouchdb / couchdb

[英]From mongod to pouchdb/couchdb

I want to migrate my app from mongodb to pouchdb/couchdb for the syncing. 我想将我的应用程序从mongodb迁移到pouchdb / couchdb进行同步。 But I am lost. 但是我迷路了。 My app has 20 collections in a mongo database. 我的应用程序在mongo数据库中有20个集合。 One collection holds the users, who can only view content they created in the other collections, using their ids. 一个集合可容纳用户,这些用户只能使用其ID查看他们在其他集合中创建的内容。 I implemented my own user management system. 我实现了自己的用户管理系统。 Now, with 'one database per user', do i have to create 19 databases for each user or put everything into one database? 现在,对于“每个用户一个数据库”,我是否必须为每个用户创建19个数据库或将所有内容放入一个数据库?

Since CouchDB 1.6.1 does not support permission on document level, you have 4 options as I see it: 由于CouchDB 1.6.1不支持文档级别的权限,因此我看到有4个选项:

  1. To use fork of Couch DB called rCouch - here 要使用名为rCouch的Couch DB的fork- 在这里

  2. Wait for CouchDB 2.0 that will merge the codebase of rCouch and CouchDB and allow you to use user permission on document level 等待CouchDB 2.0,它将合并rCouch和CouchDB的代码库,并允许您在文档级别使用用户权限

  3. Use Couchbase and Couchbase sync gateway with PouchDB that will allow you to define rights per documents 将Couchbase和Couchbase同步网关与PouchDB一起使用,将允许您定义每个文档的权限
  4. Go with one db per user in CouchDB 在CouchDB中,每位用户使用一个数据库

Good luck with whatever you choose. 随您选择,祝您好运。 Couchbase sync gateway in my personal opinion is not easy. 我个人认为Couchbase同步网关并不容易。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM