I am starting a project and after reading a lot I have come to the conclusion that I should use Sync Gateway REST API calls from mobile AND server (backend) apps, instead of bucket shadowing. However, Sync Gateway is obviously pretty annoying when it comes to doing querying, especially dynamic querying. My idea is to write a little module for backend applications that will use Sync Gateway for writes and the NodeJS SDK for reads. This way I have the ability to use N1QL, views, etc. for gets/queries (instead of doing awkward things with Sync Gateway) and I can be sure that my data is synced properly when writing.
Is my thinking flawed here? Can anyone foresee any issues with this approach?