Hi all,
I have several problems about the sync gateway,
(1). I have an existing server with Postgre SQL database, basically I have more than hundreds of user account details (apart from other data) stored in the database (username and password etc). Now I want to migrate to CouchBase server and Sync Gateway (because I have a Android mobile app to replicate data), keeping my existing server as it is. So that means I need to create or transfer those users to Sync Gateway. How do I re-create or transfer user details to SGW? Surely I cannot use “CURL” command because I do not know passwords of each user (since they are encrypted).
Say, if I was able to complete Q1, then,
(2). Is there a way to be ensured about the consistency of data (user account details) between my existing Posgre SQL database and new Sync Gateway database (CouchBase server) ? Which means, if a new user registered to my existing server, new user account details will be stored in the Postgre SQL database, those details should be immediately replicated back to SGW, that is; the user should be created in the SGW also. Is there a way to do that? using Admin REST API or whatever?
(3). In the Sync function, I can route data using channels by assigning different documents to channels based on their “type” property. To that I need to have several if-else-if-else blocks. Say if there are a large number of “document types” . So I need to have a very long and lengthy sync function. This sounds too complicated to me. Is there any way to make this simple, how to manage large number of document types? What if I want to create new document types at run time in both client and server applications? how these new types are handled in sync function?
Anyone please answer me?
Thanks
-Isuru