Welle is an expressive Clojure client for Riak with batteries included.
2.0.0-beta1 is a development release of 2.0 that has breaking API changes and introduces an important bug fix, dependency updates and support for Riak 1.4 counters.
Changes between Welle 1.5.0 and 2.0
Welle 2.0 has breaking API changes in
Changes in K/V Function Return Values
This is a breaking API change.
Welle 2.0 changes how Riak responses are represented as Clojure maps. Welle now will correctly preserve all vector clocks associated with multiple siblings in the response and the response itself.
This means that
welle.kv/modify will work correctly and won’t make sibling
The most important part of the change is how responses are represented:
every response is an immutable map that has
:result key as well as other
metadata keys (
:content-type and so on).
This contrasts with earlier versions, where results were returned directly by functions
welle.kv/fetch, it is now possible to destructure the response in order to
obtain the returned value:
1 2 3 4
Here are the keys that
clojurewerkz.welle.kv/fetch returns now for every response:
:result: one or more objects returned by Riak
:vclock: vector clock of the response
:has-siblings?: true if response has siblings
:has-value?: true if response is non-empty
:modified?: false when conditional GET returned a non-modified response
:deleted?: true if this object has been deleted but there is a vclock for it
Clojure 1.3 Support Dropped
Welle no longer supports Clojure 1.3.
Counters Support (Riak 1.4+)
clojurewerkz.welle.counters is a new namespace that provides operations on Riak counters:
1 2 3 4 5 6 7 8 9 10 11 12
Riak Java Client Update
Welle now uses Riak Java client 1.4.2.
Cheshire has been updated to
clj-http has been updated to
ClojureWerkz Support has been updated to
Ports Support in PB Cluster Client
While creating a protocol buffer cluster client you can now provide hosts and ports separated by a colon, e.g. “127.0.0.1:10017”. If a port is not provided, the default port will be used.
So now you can use following format:
1 2 3 4 5 6 7
clojure (wc/connect-to-cluster-via-pb! [“127.0.0.1:10017”,
"127.0.0.1:10027", "127.0.0.1:10037", "127.0.0.1:10047"])
Validateur Dependency Dropped
Validateur is no longer a dependency of Welle.
Don’t worry, they still work well together.
Optional Keywordization of Keys With JSON Serialization
Automatic JSON serialization previously unconditionally converted keys to keywords. This may be a problem for some projects, because keywords are not garbage collected.
clojurewerkz.welle.conversion/*convert-json-keys-to-keywords* is a new dynamic var that
controls this behavior. When bound to false, automatic JSON serialization won’t convert
keys to keywords.
We recommend all users to give 2.0.0-beta1 a try.
Welle change log is available on GitHub.
Welle is a ClojureWerkz Project
- Langohr, a Clojure client for RabbitMQ that embraces the AMQP 0.9.1 model
- Elastisch, a minimalistic Clojure client for ElasticSearch
- Monger, a Clojure MongoDB client for a more civilized age
- Neocons, a feature rich idiomatic Clojure client for the Neo4J REST API
- Quartzite, a powerful scheduling library
and several others. If you like Welle, you may also like our other projects.
ClojureWerkz accepts donations. If you feel like our projects save you time, consider donating. Thanks.