I can’t configure the static user-channel access in the sync gateway config file, because I need a dynamic mapping during run time. So I plan to use “access(username, channelname)” in the Sync Function. But I see this:
The effects of all access calls by all active documents are effectively unioned together, so if any document grants a user access to a channel, that user has access to the channel. Calling
access(username, channelname)multiple times to grant the same user access to the same channel will result in negative performance implications.
I plan to create one channel per user basis, for example:
In this case, the
access might be called multiple times during whole lifetime of replication from the mobile. Will this cause any negative performance impact?