Accessing CB Sync Gateway with Java Client


is it possible to use the Couchbase Java SDK the access the Couchbase Sync Gateway?
The gateway is located in the Couchbase Cloud and I am looking for the best way to access the data from Java.

Thank you

2 Answers

« Back to question.

Hi Olivier,

When you say 'access' the data - are you referring to accessing / reading & writing data?

If so, your data would be accessed from the Java SDK by using Couchbase Server and the Java SDK directly. Your data would be accessed from the data bucket within your Couchbase Server installation.

I hope I have understood your question correctly and this answer helps. Please let me know if not!


« Back to question.

I'm still coming up to speed on Couchbase, but from my testing it appears that the sync gateway exposes the bucket as a Couchdb database, so you should be able to use a Couchdb client instead of the Couchbase client. Because the sync gateway has its own metadata on the documents and in the bucket it also appears that changes you make to documents directly in Couchbase wouldn't get synced to clients as they would if the changes had gone through the sync gateway.