I am build a app, the business logic is following:
one user belong to 0-n company, one company have some documents.
I want to deploy couchbase and sync_gateway by company.
so I can manage documents by company. such as cluster deploy, backup and restore by company.
I think it will be more flexible and high scalability.
As I know, sync_gateway will route document and control write/read document by channel, which depend on user and session(access()/requrieUser()). that means user document are coupling with 'company' documents
so, If sync_gateway can store user document and session document(may be) alone with other documents as public identity store,It will be possible to deploy sync_gateway and couchbase by company.
the config of sync_gateway database looks like:
```
"databases": {
"db": {
"bucket": "default",
"identity_bucket": "identity",
"users": { "GUEST": { "disabled": false, "admin_channels": ["*"] } }
}
}
```
or may be there is a better way to make sync_gateway more flexible and high scalability?