The ClojureWerkz Blog

News and updates about ClojureWerkz projects

Welle 3.0.0 Is Released

TL;DR

Welle is an expressive Clojure client for Riak with batteries included.

3.0.0 is a major release that has breaking API changes.

Changes between Welle 2.0.x and 3.0

Welle 3.0 has breaking API changes in most namespaces.

Client (Connection) is Explicit Argument

All Welle public API functions that issue requests to Riak now require a client (HTTP or PBC) to be passed as an explicit argument:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
(ns welle.docs.examples
  (:require [clojurewerkz.welle.core    :as wc]
            [clojurewerkz.welle.buckets :as wb]
            [clojurewerkz.welle.kv      :as kv])
  (:import com.basho.riak.client.http.util.Constants))

(let [conn   (wc/connect)
      bucket "accounts"
      key    "novemberain"
      val    {:name "Michael" :age 27 :username key}]
  (wb/create conn bucket)
  ;; stores data serialized as JSON
  (kv/store conn bucket key val {:content-type Constants/CTYPE_JSON_UTF8})
  ;; fetches it back
  (kv/fetch conn bucket key))

Options as Maps

Functions that take optional arguments now require them to be proper maps (and not pseudo-keywords):

1
2
3
4
5
;; in 2.0
(kv/store bucket key val :content-type Constants/CTYPE_JSON_UTF8)

;; in 3.0
(kv/store conn bucket key val {:content-type Constants/CTYPE_JSON_UTF8})

HTTPComponents 4.3

Welle now excludes HTTPComponents dependency for Riak client and instead uses version 4.3 which clj-http depends on.

Change Log

Welle change log is available on GitHub.

Welle is a ClojureWerkz Project

Welle is part of the group of libraries known as ClojureWerkz, together with

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

Let us know what you think on Twitter or on the Clojure mailing list.

Donations

ClojureWerkz accepts donations. If you feel like our projects save you time, consider donating. Thanks.

Michael on behalf of the ClojureWerkz Team