Fritzy.io

Create A Levelup Proxy to Riak

node.jsleveldbriak

Riak is a clustered key-value database that applies "AP" from the CAP Theorem.
It has HTTP and Protocol Buffers APIs, but can be a little bit cumbersome to browse keys for debugging.
I've been getting used to hij1nx's lev for debugging levelup and thought it would be handy to use the same tool for Riak.

Since Nathan LaFreniere wrote riakdown, a Riak backend for level, it wasn't too hard.
Essentially just mix multilevel (for a network enabled levelup) with riakdown, and away you go!

$ level2riak --bucket somebucket
Connected to riak://localhost:8087/somebucket
Listening for multilevel connection on: 8091

Now just load lev and save connection details to match the proxy.

$ lev

lev connection config

You can also use lev's other modes: cli and repl.

###But wait, there's more!

I turned this into an npm package.

Install:

npm install --global level2riak

You can then run it with:

level2riak --bucket somebucket

###Note

As of this writing, I've made an update to lev, but I'm waiting on hij1nx to publish to npm.
The manifest is no longer required, repl can handle remote connections, and I added --conns and --use for listing and using preconfigured connections.

Update:

hij1nx just publish lev@2.1.2.