Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Riaktor - Promise-Based Async API for Riak

DZone's Guide to

Riaktor - Promise-Based Async API for Riak

· Database Zone
Free Resource

Learn how our document data model can map directly to how you program your app, and native database features like secondary indexes, geospatial and text search give you full access to your data. Brought to you in partnership with MongoDB.

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.

https://github.com/jbrisbin/riaktor

Discover when your data grows or your application performance demands increase, MongoDB Atlas allows you to scale out your deployment with an automated sharding process that ensures zero application downtime. Brought to you in partnership with MongoDB.

Topics:

Published at DZone with permission of Jon Brisbin, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}