The ClojureWerkz Blog

News and updates about ClojureWerkz projects

Elastisch 1.2.0 Is Released

TL;DR

Elastisch is a battle tested, small but feature rich and well documented Clojure client for ElasticSearch. It supports virtually every Elastic Search feature and has solid documentation.

1.2.0 is a minor feature and usability release. We recommend all users to upgrade to it.

Changes in Elastisch 1.2.0

ElasticSearch Native Client Upgrade

Elastisch now depends on ElasticSearch native client version 0.90.3.

Empty Bulk Operations are Ignored

Elastisch now will not perform a bulk operation if its list of operations is empty.

Contributed by Baptiste Fontaine.

Support for :ignore_indices in REST API client

clojurewerkz.elastisch.rest.document/search, clojurewerkz.elastisch.rest.document/search-all-types, clojurewerkz.elastisch.rest.document/count, clojurewerkz.elastisch.rest.document/delete-by-query, and clojurewerkz.elastisch.rest.document/delete-by-query-across-all-types now accepts the :ignore_indices option:

1
2
(doc/search [index-name, missing-index-name,...] mapping-type :query (q/match-all)
                                                              :ignore_indices "missing")

See also elasticsearch/guide/reference/api

Contributed by Joachim De Beule

Search Queries with a Subset of Fields are Converted Correctly

Search queries that only retrieve a subset of fields using the :fields option are now correctly converted to Clojure maps.

Contributed by Soren Macbeth.

ElasticSearch Native Client Upgrade

Elastisch now depends on ElasticSearch native client version 0.90.1.

Sort Improvements for Search Queries

clojurewerkz.elastisch.native.document/search now accepts maps as :search option values:

1
2
(doc/search index-name mapping-type :query (q/match-all)
                                    :sort  (array-map "title" "asc")

This is identical to how the option works with the REST client.

We recommend all users to upgrade to 1.2.0 as soon as possible.

Change log

Elastisch change log is available on GitHub.

Thank You, Contributors

Kudos to

  • Joachim De Beule
  • Baptiste Fontaine
  • Soren Macbeth

for contributing to this release.

Elastisch is a ClojureWerkz Project

Elastisch 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
  • Monger, a Clojure MongoDB client for a more civilized age
  • Cassaforte, a Clojure Cassandra client
  • Titanium, a Clojure graph library
  • Neocons, a client for the Neo4J REST API
  • Welle, a Riak client with batteries included
  • Quartzite, a powerful scheduling library

and several others. If you like Elastisch, you may also like our other projects.

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

Michael on behalf of the ClojureWerkz Team

Langohr 1.4.0 Is Released

TL;DR

Langohr is a Clojure RabbitMQ client that embraces AMQP 0.9.1 Model.

1.4.0 is a minor feature release that primarily improves pre-1.1.0 version compatibility and connection recovery features.

Changes between Langohr 1.3.0 and 1.4.0

Network Recovery Callbacks on Connections and Channels

They can be used to re-declare necessary entities using langohr.core/on-recovery:

1
2
3
(langohr.core/on-recovery conn (fn [conn] (comment ...)))

(langohr.core/on-recovery ch   (fn [ch] (comment ...)))

Unlike OO clients that represent queues and exchanges as objects, Langohr cannot be more aggressive about redeclaring entities during connection recovery.

Changes between Langohr 1.2.0 and 1.3.0

Re-introduce langohr.consumers/create-queueing

The function creates a QueueingConsumer instance and is very similar to langohr.consumers/create-default in purpose.

Sometimes combining a queueing consumer with langohr.consumers/deliveries-seq is the best way to express a problem.

Rename langoh.consumers/consumers-seq to langoh.consumers/deliveries-seq, make it public

langoh.consumers/deliveries-seq is a function that turns a QueueingConsumer instance into a lazy sequence of deliveries.

Use :executor During Connection Recovery

Connection recovery after network failure will now respect the :executor option.

Changes between Langohr 1.1.0 and 1.2.0

Langohr Again Uses RabbitMQ Java Client Interfaces

Langohr’s implementation of connection and channel now implements RabbitMQ Java client’s interfaces for connection and channel.

Change Log

Langohr change log is available on GitHub.

Langohr is a ClojureWerkz Project

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

  • Elastisch, a minimalistic well documented Clojure client for ElasticSearch
  • Welle, a Riak client with batteries included
  • Monger, a Clojure MongoDB client for a more civilized age
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Langohr, you may also like our other projects.

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

Michael on behalf of the ClojureWerkz Team

Langohr 1.1.0 Is Released

TL;DR

Langohr is a Clojure RabbitMQ client that embraces AMQP 0.9.1 Model.

1.1.0 is a minor feature release that primarily introduces HTTP API improvements.

Changes between Langohr 1.0.1 and 1.1.0

Extended HTTP API Support

langohr.http now provides more complete coverage of the RabbitMQ HTTP API.

Contributed by Steffen Dienst.

langohr.consumers/subscribe Options In Line with Docs

The documentation says to use function handler keys ending in “-fn”, but this code currently only recognizes the old form. This commit ensures that all keys that are used within langohr.consumers/subscribe can be used as a parameter.

Contributed by Steffen Dienst.

langohr.core/connect-to-first-available is Removed

langohr.core/connect-to-first-available is removed. A better failover functionality will be available in future versions.

RabbitMQ Java Client Upgrade

RabbitMQ Java client dependency has been updated to 3.1.3.

clj-http Upgrade

clj-http dependency has been updated to 0.7.4.

Cheshire Upgrade

Cheshire dependency has been updated to 5.2.0.

Change Log

Langohr change log is available on GitHub.

Langohr is a ClojureWerkz Project

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

  • Elastisch, a minimalistic well documented Clojure client for ElasticSearch
  • Welle, a Riak client with batteries included
  • Monger, a Clojure MongoDB client for a more civilized age
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Langohr, you may also like our other projects.

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

Michael on behalf of the ClojureWerkz Team

Langohr 1.0.1 Is Released

TL;DR

Langohr is a Clojure RabbitMQ client that embraces AMQP 0.9.1 Model.

With 1.0.1, Langohr is finally a 1.0 library, after 2 years in the making.

Time for 1.0

Langohr is the original ClojureWerkz library, started in late July 2011. It had quickly reached a point when it was useful enough. With the help of our users, there were 3-4 releases with breaking changes and major usability improvements.

Since 2013, Langohr has not changed much. It has decent documentation, has been in use by many people we know and supports every feature RabbitMQ 3.1 provides.

So while it is still missing a couple of hard to get right features, the 1.0 release has been long overdue. After all, some of much younger libraries are at 1.6 or 1.5 already.

1.0.1 is basically 1.0.0-beta14 with a different version and one typo fix.

Changes between Langohr 1.0.0-beta14 and 1.0.1

langohr.shutdown/sort-error? => langohr.shutdown/soft-error?

langohr.shutdown/soft-error? is now correctly named.

Contributed by Ralf Schmitt.

Getting Help

If you have any questions about Langohr, feel free to join our mailing list and rabbitmq-discuss or stop by #rabbitmq channel on irc.freenode.net.

Plans for the Future

We are already working on a major feature for Langohr 1.1: automatic connection recovery, similar to what a couple of Ruby clients support. Features like this take a while to develop but the progress so far is promising.

We’ll keep you posted!

Change Log

Langohr change log is available on GitHub.

Langohr is a ClojureWerkz Project

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

  • Elastisch, a minimalistic well documented Clojure client for ElasticSearch
  • Welle, a Riak client with batteries included
  • Monger, a Clojure MongoDB client for a more civilized age
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Langohr, you may also like our other projects.

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

Michael on behalf of the ClojureWerkz Team

Nippy 2.0.0 Is Released

TL;DR

Nippy is an attempt to provide a reliable, high-performance drop-in alternative to the Clojure reader.

2.0.0 is a major completely backwards-compatible release that includes several new features.

Changes in Nippy 2.0

Nippy 2.0 is a backwards-compatible release that introduces several new features:

  • Pluggable compression
  • Pluggable data encryption support
  • Much improved error messages
  • Easier integration with other libraries

See full change log for more info.

Nippy Has Sister Projects

Nippy is part of the group of libraries by Peter Taoussanis, together with

  • Carmine, a fantastic Clojure client for Redis
  • Faraday, a Clojure DynamoDB client
  • Timbre, a pure Clojure logging and profiling library
  • Tower, a Clojure library for split testing
  • Touchstone, a pure Clojure library for i18n and l10n

If you like these projects, you should follow Peter on Twitter.

@michaelklishin on behalf of the ClojureWerkz Team

Carmine 2.0.0 Is Released

TL;DR

Carmine is fantastic Clojure client for Redis.

2.0.0 is a major release that introduces some breaking API changes, new features and another 20% performance improvement (now within less than 5% of the Java client).

Changes in Carmine 2.0

  • 20% better performance
  • Pluggable data compression and encryption based on Nippy 2.0
  • Improvements to message queueing and distributed locking features
  • Tundra, a way to plug a durable data store into Carmine for long-term data persistence

See full change log for more details.

Carmine 2.0 Migration Guide

Carmine users should get themselves familiar with the Carmine 2.0 Migration Guide before upgrading.

Carmine Has Sister Projects

Carmine is part of the group of libraries by Peter Taoussanis, together with

  • Timbre, a pure Clojure logging and profiling library
  • Tower, a pure Clojure library for i18n and l10n
  • Nippy, a fast drop-in replacement for the Clojure reader
  • Faraday, a Clojure DynamoDB client
  • Touchstone, a Clojure library for split testing

If you like these projects, you should follow Peter on Twitter.

@michaelklishin on behalf of the ClojureWerkz Team

Cassaforte 1.1.0 Is Released

TL;DR

Cassaforte is a new Clojure client for Apache Cassandra 1.2+. It is built around CQL 3 and focuses on ease of use. You will likely find that using Cassandra from Clojure has never been so easy.

1.1.0 is a minor release that introduces one bug fix and one minor improvement.

Changes between Cassaforte 1.0.1 and 1.1.0

Fixes for prepared queries with multi-cql

Multi-cql didn’t work with unforced prepared statements, now it’s possible to use client/prepared with multi-cql as well.

Fixes for compound keys in iterate-world queries

Iterate world didn’t work fro tables with compound primary keys. Now it’s possible to iterate over collections that have compound keys.

Cassaforte change log can be found on GitHub.

News and Updates

New releases and updates are announced on Twitter. Cassaforte also has a mailing list, feel free to ask questions and report issues there.

Cassaforte is a ClojureWerkz Project

Cassaforte 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
  • Monger, a Clojure MongoDB client for a more civilized age
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Welle, a Riak client with batteries included
  • Neocons, a Clojure client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Cassaforte, you may also like our other projects.

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

Michael on behalf of the ClojureWerkz Team.

Elastisch 1.2.0-beta3 Is Released

TL;DR

Elastisch is a battle tested, small but feature rich and well documented Clojure client for ElasticSearch. It supports virtually every Elastic Search feature and has solid documentation.

1.2.0-beta3 is a development release that adds :ignore_indices parameter support to the REST client.

Changes between Elastisch 1.2.0-beta1 and 1.2.0-beta3

ElasticSearch Native Client Upgrade

Elastisch now depends on ElasticSearch native client version 0.90.2.

Support for :ignore_indices in REST API client

clojurewerkz.elastisch.rest.document/search, clojurewerkz.elastisch.rest.document/search-all-types, clojurewerkz.elastisch.rest.document/count, clojurewerkz.elastisch.rest.document/delete-by-query, and clojurewerkz.elastisch.rest.document/delete-by-query-across-all-types now accepts the :ignore_indices option:

1
2
(doc/search [index-name, missing-index-name,...] mapping-type :query (q/match-all)
                                                              :ignore_indices "missing")

See also elasticsearch/guide/reference/api

Contributed by Joachim De Beule

Changes between Elastisch 1.2.0-beta1 and 1.2.0-beta2

Search Queries with a Subset of Fields are Converted Correctly

Search queries that only retrieve a subset of fields using the :fields option are now correctly converted to Clojure maps.

Contributed by Soren Macbeth.

ElasticSearch Native Client Upgrade

Elastisch now depends on ElasticSearch native client version 0.90.1.

Elastisch is a ClojureWerkz Project

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

  • Monger, a Clojure MongoDB client for a more civilized age
  • Langohr, a Clojure client for RabbitMQ that embraces the AMQP 0.9.1 model
  • Cassaforte, an easy to use Clojure Cassandra client built around CQL3
  • Titanium, a powerful graph library on top of the Tinkerpop stack
  • Welle, a Riak client with batteries included
  • Neocons, a client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Elastisch, you may also like our other projects.

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

Michael on behalf of the ClojureWerkz Team

Cassaforte 1.0.1 Is Released

TL;DR

Cassaforte is a new Clojure client for Apache Cassandra 1.2+. It is built around CQL 3 and focuses on ease of use. You will likely find that using Cassandra from Clojure has never been so easy.

Cassaforte is finally a 1.0 project. This means we are confident that you will have a good experience using it and the docs are good enough.

Another Brick in the Wall

ClojureWerkz projects are mostly known for our data store clients. Data processing is a sweet spot for Clojure and that’s what we primarily use it for.

Over time we’ve developed and released a number of data store clients:

and a few others.

Today we are adding another client to this family, Cassaforte.

The Cassaforte Story

Cassaforte was started about a year ago as an experiment. Back then we needed a database well suited for time series data, and Cassandra is a good choice. However, dealing with existing clients, namely Hector and Astyanax, was quite a bit of a pain.

In the end, using Cassandra’s low level Thrift client worked well and we have been improving the codebase bit by bit, while working on an event collection and analytics system.

A few months ago, DataStax released a new Java driver for Cassandra that was a lot better suited to what Cassaforte needed to power it than any other alternative.

We were able to switch Cassaforte to it in a couple of weeks. About the same time, a great fellow Max Penet released a Clojure DSL for generating CQL, Hayt.

Hayt makes working with CQL as nice as the new clojure.java.jdbc DSL:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
(require '[clojurewerkz.cassaforte.cql :as cql])

(cql/prepared
   (cql/insert "users" {:name "Alex" :city "Munich")}))
(cql/prepared
   (cql/insert "users" {:name "Robert" :city "Berlin")}))

(cql/select "users" (where :name "Alex"))
;; => [{:name "Alex", :city "Munich"}]

(cql/select "users"
            (where :name [:in ["Alex" "Robert"]]))
;; => [{:name "Alex", :city "Munich"}
       {:name "Robert", :city "Berlin"}]
1
2
3
4
5
6
7
8
9
10
(require '[clojurewerkz.cassaforte.cql :as cql])

;; For clarity, we select :post_id column only
(cql/select "user_posts"
            (columns :post_id)
            (where :username "Alex")
            (order-by [:post_id :desc]))
;; => [{:post_id "post3"}
       {:post_id "post2"}
       {:post_id "post1"}]
1
2
3
4
5
6
7
8
(require '[clojurewerkz.cassaforte.cql :as cql])

(cql/select "user_posts"
            (columns :post_id)
            (where :username "Alex"
                   :post_id [> "post1"]
                   :post_id [< "post3"]))
;; => [{:post_id "post2"}]

Integrating Hayt took a few weeks as well. From there, it took some time to write initial documentation and add some polish.

Major props to the DataStax team for releasing such a nice and focused Java driver and Max for making querying Cassandra from Clojure such a good experience.

What’s In The Box

Cassaforte is young but already offers all the key features you’d expect from such a client:

  • Schema (keyspaces, tables/column families, indices) manipulation
  • All CQL operations
  • Inserts that work with Clojure data structures
  • CQL 3.0 queries, including queries with placeholders (?, a la JDBC)
  • Prepared statements
  • Counters
  • Multi-node (cluster) connections
  • Automatic deserialization of column names and values according to the schema
  • Lazy sequence-based queries over large result sets

Needless to say, as more features are added to Cassandra and the DataStax core Java driver, Cassaforte will soon to follow their lead.

Finally 1.0

It took 6 RC releases to get to Cassaforte 1.0 but it’s finally here. We even already have one one patch release out, which fixes an AOT compilation issue discovered by a user after 1.0.0 was tagged.

Cassaforte artifacts are released to Clojars. If you are using Maven, add the following repository definition to your pom.xml:

1
2
3
4
<repository>
  <id>clojars.org</id>
  <url>http://clojars.org/repo</url>
</repository>

then add the actual dependency. With Leiningen:

1
[clojurewerkz/cassaforte "1.0.1"]

With Maven:

1
2
3
4
5
<dependency>
  <groupId>clojurewerkz</groupId>
  <artifactId>cassaforte</artifactId>
  <version>1.0.1</version>
</dependency>

Documentation

To get started, take a look at the Getting Started guide.

The rest of the guides are being worked on.

API reference is also available.

Thank You, Contributors

Cassaforte was started by Michael but ended up being a brain child of Alex.

We would like to thank Max Penet for providing a lot useful feedback, sharing Hayt with us and helping us define what we want Cassaforte to be and feel like.

News and Updates

New releases and updates are announced on Twitter. Cassaforte also has a mailing list, feel free to ask questions and report issues there.

Cassaforte is a ClojureWerkz Project

Cassaforte 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
  • Monger, a Clojure MongoDB client for a more civilized age
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Welle, a Riak client with batteries included
  • Neocons, a Clojure client for the Neo4J REST API
  • Quartzite, a powerful scheduling library

and several others. If you like Cassaforte, you may also like our other projects.

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

Michael on behalf of the ClojureWerkz Team.

Validateur 1.5.0 Is Released

TL;DR

Validateur is a functional validations library inspired by Ruby’s ActiveModel. Validateur 1.5 introduces ways to customize error messages.

Changes between Validateur 1.4.0 and 1.5.0

Optional messages in built-in validators

All built-in validators but length-of accept optional messages for all cases. Their formatting is fixed and based in default ones. For example:

1
2
3
((inclusion-of :genre :in #{"trance", "dnb"} :message "debe pertenecer a:")
 {:genre "pasodoble"})
;; [false {:genre #{"debe pertenecer a: trance, dnb"}}]

Optional function callback to parametrize the construction of messages

All built-in validators accept an optional function callback which will be called by the validator to build the returned error message. The main goal is to facilitate the inclusion of i18n in messages (like previous one but in a more flexible way). For example:

1
2
3
4
5
((inclusion-of :genre :in #{"trance", "dnb"}
               :message-fn (fn [validator map prop & args]
                              [validator map prop args]))
 {:genre "pasodoble"})
;; [false {:genre #{[:inclusion {:genre "pasodoble"} :genre (#{"trance" "dnb"})]}}]

Change Log

We recommend all users to upgrade to 1.5.0.

Validateur change log is available on GitHub.

Thank You, Contributors

Javier Neira contributed key features in this release.

Validateur is a ClojureWerkz Project

Validateur 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
  • Monger, a Clojure MongoDB client for a more civilized age
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Cassaforte, a Clojure Cassandra client built around CQL
  • Neocons, a client for the Neo4J REST API
  • Welle, a Riak client with batteries included
  • Quartzite, a powerful scheduling library

and several others. If you like Validateur, you may also like our other projects.

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

Michael on behalf of the ClojureWerkz Team