Over a million developers have joined DZone.

Riaktor - Promise-Based Async API for Riak

DZone 's Guide to

Riaktor - Promise-Based Async API for Riak

· Database Zone ·
Free Resource

Last week I released into OSS a library I’ve been hacking on for almost two years. It’s called Reactor and it’s a bit of a Frankenstein since it leverages the knowledge of 20 years of event-driven programming and tries to encapsulate Things That Just Work into an extremely lightweight and efficient asynchronous dispatching and coordinating framework. It’s based loosely on the Reactor design pattern but is also inspired by asynchronous frameworks, libraries, and other code developed in the last couple years.

One of the advantages of Reactor is that it provides a couple of abstractions for coordinating asynchronous actions. The Composable and Promise abstractions have lots of methods on them to compose non-blocking actions that should occur after the result is ready.

Riaktor is a simple helper library I wrote that wraps the official Basho Java client and makes it work asynchronously using the Reactor framework.

It won’t turn a Pinto into a Corevette. If your cluster can’t handle the 10’s of millions of events per second that Reactor can generate, then you’re not going to see an immediate benefit to using Riaktor. But if you’re running on a sufficiently large multi-core machine and are connecting to a sensibly-configured Riak cluster, then Riaktor can trade data with Riak as fast as you can shove it in (or pull it out).

It’s still alpha and basically in experimental stage. But it would be great to get some early feedback on it from any brave souls that want to try it out on their cluster.



Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}