We are excited today to be releasing the first beta of the 1.0.0 version (tagged as 0.9.0) of our official Go SDK. This release includes support for Couchbase 4.0 server features such as N1QL and Multidimensional Scaling (MDS), implements a new bulk operations API and includes a significant number of bug fixes.

N1QL

Starting with 1.0.0-beta, the Go SDK now supports performing N1QL queries against your cluster.  This is as simple as instantiating a N1qlQuery using your query string, specifying any additional options and executing it.

Bulk Operations

Bulk operations allow you to perform numerous operations at one time using the synchronous gocb API.  This is a powerful API allowing you to asynchronously fetch or store thousands of documents at once rather than performing the operations in series.

Multidimensional Scaling (MDS)

Multidimensional scaling is a new feature in Couchbase Server 4 that allows you to both scale your cluster out and up.

Previous to 4.0, the services were scaled homogeneously across the server, now you can specify that specific nodes be say a query node or a data node or an index (or both or all three, lots of options), and then on the nodes where more CPU is needed, those nodes can be scaled up with beefier hardware. On the other hand, if you want to scale your data nodes out on cheaper hardware, you can easily do that as well. It’s a great feature for optimizing your cluster for specific workloads.

In order for applications to take advantage of this, the client has to be aware of which nodes are designated for querying (N1QL) and which nodes are responsible for the services, like key/value CRUD (data nodes). In this release we provide support for MDS by splitting the nodes into specific collections dedicated to a specific task (data, index, query, etc). From an external perspective, there is no difference, however internally only clients that are “service” aware will work with a 4.0 cluster. For backwards compatibility, however, this (and future versions) of the SDK will continue to work with Couchbase Server 3.0 and 2.5.

Getting The Release

Installing this release is identical to previous versions, and is similar to the installation of many other Go modules.  Use go get to install and you are ready!

Additionally, the documentation is available here:

http://developer.couchbase.com/documentation/server/4.0/sdks/go-beta/introduction.html

And the API reference here:
http://godoc.org/github.com/couchbaselabs/gocb/

 

Special Thanks to Jeff Morris for the MDS explanation.

Author

Posted by Brett Lawson, Principal Software Engineer, Couchbase

Brett Lawson is a Principal Software Engineer at Couchbase. Brett is responsible for the design and development of the Couchbase Node.js and PHP clients as well as playing a role in the design and development of the C library, libcouchbase.

Leave a reply