Easier to use Java Client

Russell Brown russell.brown at me.com
Tue Mar 29 03:15:22 EDT 2011

On 29 Mar 2011, at 06:28, Rexxe wrote:

> Hello,
> 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). 

Here here. I'm working on that, too. There is a draft of the API here https://github.com/russelldb/riak-java-client-api/tree/fluent

> 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 RiakRestClient(...);
> The ORM layer (still working a bit on this): RiakTemplate template = new RiakTemplate(new RiakRestClient(...));

What are you using to marshall to java objects? Jackson?

> 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.

I've only had a brief look but I like it very much, thanks for making it and sharing it.  We seem to have covered a lot of the same ground but it is great to have a diverse range of clients for different use cases. I'll pull the repo and have a more detailed look, I'm hoping you may have solved some of the problems I'm looking at already ;)

> Andrew
> _______________________________________________
> riak-users mailing list
> riak-users at lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20110329/09e7c80c/attachment.html>

More information about the riak-users mailing list