I want to use Couchbase for my Sync Only needs with my existing PHP-Postgres Application.
So this is how i plan to use it.
- changes in server are pushed to couchbase sync gateway ( to update couchbase server db )
- Hence couchbase should automatically update the mobiles according to channels.
- Changes from mobiles can be pushed to My postgres server using Couchbase web hooks.
- Thus ( theoretically ) all syncing should happen smoothly.
However before implementing this architecture i have come across a few questions while researching which I’m not able to find suitable answers to.
Please help . .
Questions
What would be the best technique too handle file sync ? ( should i simply convert the files to base64 strings and treat them like regular json data in couchbase ?)
If i update the couchbase server from my server. Wouldn’t that also trigger the web hook ? How do i suppress/ignore the web hook in case of changes from my server ?
Also Couchbase sync gateway mentions that for Authentication i need to have the server setup on the same domain name as the main server ( refer : Couchbases Custom (indirect) Authentication ). I want to keep couchbase on a different server for simplicity and load. How can i have them on different servers and still not run into the above session cookie limitation ?