I was assigned the task of testing CouchBase and the Java Client to see if I fits the needs of our company.
During the evaluation with the java client, I saw that Rx Observables are recommended to make async calls and interact with couchbase server.
The case is that were are inserting 1M registers from a file using a Blocking Queue and several Threads. We tried doing this using the sync client and the async client (using both, Blocking and non blocking operations).
At the same time we are reading the values from a copy of the file, in sequential order in a single thread.
I was surprised to see that using the Async non-blocking methods take a lot more time than with the Async blocking method and the Sync Methods.
The main question is:
Why is the Async non-blocking approach taking much more time than the other two?
Which approach is supposed to be faster?
Are there any suggestions to minimize the time in the Asyn Non-blocking approach?
The Sync method returns me some not found keys, which I think is the expected result since we are writing and reading at almost the same time.
Our test environment is composed by 2 Centos Servers running couchbase 3.0.1, cluster replicated in both servers, default couchbase bucket. Couchbase Java Client 2.0.1
Any input will be really appreciated.