November 13, 2012
Today I’m happy to announce a new release of riak-js, the Riak client for Node.js. This release breathes new life back into riak-js. For various reasons, development on riak-js had been dormant for quite a while, but that has changed for the better and we’re committed to making it a viable client library for production applications.
During the transition, riak-js got a new home as well, and can now be found on mostlyserious/riak-js. Please make sure to send all issues an pull requests to this repository.
Version 0.9.0 of riak-js was shipped today and can be installed from npmjs.org:
While the new release is mostly backwards-compatible, it does come with some changes that I deemed worthwhile to make before hitting the big 1.0.
Most notably, the functions for using MapReduce and Riak Search have moved into their own namespace. That brings riak-js more on par with other libraries in making both functionalities a bit more separate from normal client operations.
To run MapReduce, you now use something like the following example:
The same goes for Riak Search, which is now fully supported, including adding, removing and querying documents directly from a search index:
There are other minor changes, e.g. accessing bucket properties:
To get a good overview of the current API of riak-js, check out the documentation.
Back To The Future
Development on future versions has already begun, and we still have a good list of things to work on for future releases.
I’ve also started adding instrumentation to the HTTP API operations for easier tracking of metrics and logging. But more on that in another blog post.