[ANN] Kria 0.1.14, an async Clojure Client for Riak 2.0.0.rc1

David James davidcjames at gmail.com
Fri Sep 5 13:20:17 EDT 2014


I just got around to using the Maven protobuf files instead of using a
local copy. Much easier! Thanks for mentioning this, Sean.


On Thu, Jul 24, 2014 at 3:48 PM, David James <davidcjames at gmail.com> wrote:

> Thanks for the feedback!
>
> I'll take a look at the Maven Central .proto files.
>
> I started Kria before the new Java client was very far along. I'm glad it
> now supports async operation. I'll try to take a look. I have had mixed
> experiences in wrapping Java libraries. I found many hard to understand
> because of their size and complexity.
>
> Kria supports the Riak Protocol API and is meant to be low-level. It does
> not support the "Additional features" mentioned on
> http://docs.basho.com/riak/2.0.0/dev/using/libraries/. It only has three
> dependencies: Java 7 (for NIO.2), Clojure 1.6, and Protocol Buffers. I
> intentionally avoided Netty because I didn't need the complexity. Kria does
> this in about 2,000 lines of Clojure: 1400 lines of implementation plus
> about 600 lines of tests. The Java library has about 20,000 lines of code.
> I spent considerable time driving out duplication, and I'd like to think it
> makes the code easier to read and more reliable.
>
> Lastly, writing Kria helped me find some strange (e.g. probably
> unintentional) re-use of message codes in Riak:
> https://github.com/basho/riak-java-client/issues/367
>
>
> On Wed, Jul 23, 2014 at 2:59 PM, Sean Cribbs <sean at basho.com> wrote:
>
>> David,
>>
>> Thanks for contributing to the Riak ecosystem! A few notes:
>>
>> Looking over your README, I see you're probably doing some unnecessary
>> work with respect to the .proto files [1]. We generate, package, and deploy
>> all of those on Maven Central [2] specifically so others can use them as
>> you have, while maintaining the authenticity of the code (it comes from us)
>> and reducing duplication (not N copies everywhere).
>>
>> I don't want to bikeshed it (you obviously have your reasons), but it
>> bears mentioning that the new official Java client is designed so that it
>> would be easier to write wrapper libraries in other JVM languages, and to
>> give the user the option of async or sync at the API level.
>>
>> [1] https://github.com/bluemont/kria#protocol-buffer-setup
>> [2] https://search.maven.org/#search%7Cga%7C1%7Ca%3A%22riak-pb%22
>>
>>
>> On Wed, Jul 23, 2014 at 1:31 PM, David James <davidcjames at gmail.com>
>> wrote:
>>
>>> The latest version of Kria, 0.1.14, supports Riak 2.0.0rc1. Kria (a
>>> right rotation of "Riak") is an open source asynchronous Clojure driver for
>>> Riak 2.0 built on top of Java 7's NIO.2. It uses the Riak protocol buffer
>>> interface.
>>>
>>> https://github.com/bluemont/kria
>>> https://clojars.org/kria
>>>
>>> There are, of course, several Riak drivers for Java and Clojure. I hope
>>> some people find this one useful. I have a section in the README about why
>>> I made it. To summarize, I wanted async support, and the Java driver wasn't
>>> quite what I wanted.
>>>
>>> Please kick the tires.
>>>
>>> In my work projects, Clojure's core.async works great as a layer on top
>>> of Kria. Just create a core.async channel in advance and have the callback
>>> put the desired return value in the core.async channel. (You could also use
>>> Clojure atoms or promises; Kria doesn't care.)
>>>
>>> -David
>>>
>>> _______________________________________________
>>> riak-users mailing list
>>> riak-users at lists.basho.com
>>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>
>>>
>>
>>
>> --
>> Sean Cribbs <sean at basho.com>
>> Software Engineer
>> Basho Technologies, Inc.
>> http://basho.com/
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.basho.com/pipermail/riak-users_lists.basho.com/attachments/20140905/f43b9254/attachment.html>


More information about the riak-users mailing list