Easier to use Java Client

Rexxe rexxe98 at gmail.com
Tue Mar 29 01:28:35 EDT 2011


I am new to Riak and the mailing list.  I started to use Riak using the
spring-data project but found that their API was lacking and had serious
issues with strict typing.  It turns out that the Java API they've built is
pretty much being built just so it works in Grails/Groovy.  So, I started to
look at the Riak Java API.  I found it to be a bit complicated and I didn't
like how it still forced the user to know about a lot of specifics of Riak,
especially query params and other properties, and didn't provide a layer of
abstraction on top of the actual client (so I could say go switch between
the REST and PBC client).  So, I decided to write my own client and semi-ORM
layer.   I am still working on some of the details, I need to write more
tests, and I need to document it, but the bulk of the code is done. I have
only implemented the REST client so far, but I plan on implementing PB in
the future.

You can check it out here: https://github.com/aberman/spring-riak

It's pretty easy to use:

If you want the client, you would do:  RiakManager mgr = new

The ORM layer (still working a bit on this): RiakTemplate template = new
RiakTemplate(new RiakRestClient(...));

The APIs to look at are RiakManager and RiakTemplate and you should see some
familiar methods with more typed signatures to help out the average user.

Let me know your thoughts, if any, and if there is any interest in me
donating this to the Riak project.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110328/0d28451c/attachment.html>

More information about the riak-users mailing list