A newer version of this documentation is available.

View Latest

Asynchronous Progamming Using the Node.js SDK with Couchbase Server


    The Node.js SDK supports asynchronous programming implicitly through its use of the typical Node.js callback pattern, coupled with having our underlying networking library tightly coupled to the Node.js event loop. Performing many operations asynchronously garners a huge performance benefit compared to performing operations in a serial manner. The same bucket can have hundreds of outstanding operations at any one time with minimal loss in performance compare to using a bucket serially.

    In addition to the asynchronous callback pattern already exposed through the Node.js SDK, it is also possible to wrap the Node.js SDK in a promises library such as bluebird. Many of these libraries can also make couchbase available through an ES6 generator pattern.