EEP now depends on org.clojure/clojure version 1.6.0. It is
still compatible with Clojure 1.4 and if your project.clj depends on
a different version, it will be used, but 1.6 is the default now.
clojurewerkz.quartzite.date-time was removed as all of the functions in that
namespace have been contributed to clj-time a while ago, and some provide more
correct or extensible functionality.
Simply use clj-time counterparts when upgrading.
Clojure 1.4 and 1.5 are No Longer Supported
The library no longer supports Clojure 1.4 and 1.5 as of this version.
Langohr no longer implements automatic connection recovery
of its own. The feature is still there and there should be no
behaviour changes but the functionality has now been pushed
“upstream” in the Java client, so Langohr now relies on it
to do all the work.
There is two public API changes:
com.novemberain.langohr.Recoverable is gone, langohr.core/on-recovery
now uses com.rabbitmq.client.Recoverable instead in its signature.
Server-named queues will change after recovery. Use langohr.core/on-queue-recovery
to register a listener for queue name change.
Cassaforte is a Clojure client for
Apache Cassandra and DataStax Enterprise. 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.
2.0.0 is a major release that introduces breaking API changes, new features and
compatibility with Cassandra 2.1.
Cassaforte no longer tries to support query condition DSLs for both Hayt 1.x
and Hayt 2.0. Hayt 2.0 is the only supported flavour now and
is the future.
Providing a :cipher-suites key in the :ssl connection option allows to specify cipher suites
that are enabled when connecting to a cluster with SSL.
The value of this key is a Seq of Strings (e.g. a vector) where each item specifies a cipher suite:
The :cipher-suites key is optional and may be omitted, in which case Datastax Java driver’s
default cipher suites (com.datastax.driver.core.SSLOptions/DEFAULT_SSL_CIPHER_SUITES) are enabled.
This can be used to work around the need to install Java Cryptography Extension (JCE) Unlimited Strength
Jurisdiction Policy Files required by the default set of cipher suites. TLS_RSA_WITH_AES_128_CBC_SHA
is a suite in the default set that works with the standard JCE. E.g. by specifying just that one,
as in the code example, the standard JCE is enough.
To preserve Cassandra 2.0 compatibility yet continue using the most recent Cassandra Java driver
Cassaforte now uses native protocol v2 by default. v3 can be opted into
using the :protocol-version connection option (with value of 3).
Double Licensed Under APL 2.0 and EPL 1.0
The project is now double-licensed under the Eclipse Public License 1.0
and Apache Public License 2.0. The codebase now includes APL 2.0 headers.
License files for both APL 2.0 and EPL 1.0 are included
in the distribution.
Fetch Size Support
(Internal to the client) automatic paging of result set rows now can be configured
or disabled altogether, e.g. when running into problems similar to CASSANDRA-6722.
clojurewerkz.cassaforte.client/with-fetch-size is a macro that does that:
123456789
(require'[clojurewerkz.cassaforte.client:ascc]);; alter page size(cc/with-fetch-size8192(comment "SELECT queries go here"));; disable internal client paging(cc/with-fetch-sizeInteger/MAX_VALUE(comment "SELECT queries go here"))
Default fetch size is unaltered (Cassaforte relies on the Java driver default). This setting
only makes sense for a certain subset of SELECT queries.
Clojure 1.4 and 1.5 Support Dropped
Cassaforte now requires Clojure 1.6.0.
Collections Converted to Clojure Data Structures
Cassandra maps, sets and lists are now automatically converted to their
immutable Clojure counterparts.
It is now possible to connect to a node and switch to a namespace
using a URI string:
12345
(ns cassaforte.docs(:require[clojurewerkz.cassaforte.client:ascc]));; connects to node 127.0.0.1:9042 and uses "new_cql_keyspace" as keyspace(cc/connect-with-uri"cql://127.0.0.1:9042/new_cql_keyspace")
Compression Option
:compression is a new option that can be used when connecting:
Buffy is a Clojure library to working with binary data, writing complete
binary protocol implementations in Clojure, storing complex data
structures in an off-heap cache, reading binary files and doing everything
you would usually do with byte buffers.
Buffy is built on top of Netty byte buffers, which addresses many long standing issues
with java.util.ByteBuffer.
Key Features
Buffy enables you to access buffers in the similar way you work with
the regular Clojure data structures. You can get and set fields separately from one
another, give names to different parts of binary representation and so on:
partial deserialization (read and deserialise parts of a byte buffer)
named access (access parts of your buffer by names)
composing/decomposing from key/value pairs
pretty hexdump
many useful default types that you can combine and extend easily
Data types used in Buffy buffers include:
primitive types, such as int32, boolean, byte, short, medium, float, and long
repeated type (repeat any primitive arbitrary amount of times in payload)
enum type (for mapping between human-readable and binary representation of constants)
The 1.0 release
Starting with the 1.0 release Buffy API is considered to be moderately stable. Releases can
be expected to follow a very SemVer-like change strategy. Most of the work now will
go into minor improvements based on community feedback.
Validateur is a functional validations library inspired by Ruby’s ActiveModel.
Validateur 2.4 is a minor feature release.
Changes Between 2.3.0 and 2.4.0
Clojure 1.4 Support Dropped
The project no longer tries to maintain Clojure 1.4 compatibility.
validate-some
validate-some tries any number of validators, short-circuiting at the first failed validator. This behavior is similar to or.
123456789101112131415161718192021
(require'[validateur.validation:refer:all])(let [v(validate-some(presence-of:cake-count:message"missing_cake")(validate-by:cake-countodd?:message"even_cake"))]"Odd cake counts are valid."(v{:cake-count1});;=> [true #{}]"Even cake counts only throw the second error, since the first validation passed."(v{:cake-count2});;=> [false {:cake-count #{"even_cake"}}]"The second validation never gets called and never throws a NPE, as it would if we just composed them up."(v{});;=> [false {:cake-count #{"missing_cake"}}])
Contributed by Sam Ritchie (PaddleGuru).
errors? and errors
Errors in validateur are vectors if keys are nested. If keys are only
one layer deep – :cake, for example – the error can live at :cake
or [:cake].
The errors function returns the set of errors for some key, nested
or bare. :cake will return errors stored under [:cake] and
vice-versa.
errors? is a boolean wrapper that returns true if some key has
errors, false otherwise.
ClojureWerkz has turned 3 last November. This is an age for an open source
project at which the dust from initial development has begun to settle.
In this post we’d like to briefly outline what our plans are for the next year with ClojureWerkz.
Where We Are Today
We have close to 40 projects total (a few of them are now defunct, about 5 are incubating and not yet
ready to be announced, some 30 have been around and used in production for at least half a year.
Our projects cover boring problems most developers face at some point:
Working with data stores
Working with message brokers (queues)
Data validation
Scheduling
Key derivation (stronger hashing)
Asynchronous and concurrent programming
Web crawling
We’ve also contributed to quite a few of our dependencies and related libraries, as well as clojure-doc.org,
a community-developed set of Clojure documentation guides.
We’ve been true to our values:
Solving boring problems.
No bullshit, easy contribution process that includes people from all over the world.
Solid documentation.
Sane APIs.
which I’m personally quite fond of.
The Most Exciting Change
The most exciting change by far is that several of our projects now have [co-]maintainers outside of the
original ClojureWerkz team. Neocons, Titanium, Ogre, Archimedes are now driven by folks who’ve joined
us in the last year. Elastisch, Cassaforte, Validateur all have contributors
that are active every month (if not every week).
Making it easy to join a project is incredibly important for the project’s sustainability. We are
making progress on that end.
What’s Ahead
As the number of projects and users grows, we have to keep things more predictable. Changes that are
likely to affect more users should be announced upfront and for all projects. A few of such changes
have been considered before and now it’s time to begin implementing them:
Drop Clojure 1.4 and 1.5 support.
Drop JDK 6 support.
Dual-license projects under the Eclipse Public License 1.0 and Apache Software License 2.0, where possible.
Introduce a scale of project maturity.
Most of these are fairly self-explanatory but we’ll post more about them in upcoming weeks.
Helping You Help Us
Another thing that we’ve learnt over the last few years is: there are awesome people out there
who would come out of the blue with contributions if original project authors make it easy.
We’ve been trying to make it easy, namely
We don’t require a contributor agreement
We accept pull requests on GitHub instead of asking for patches in a bottle
We try to make it easy to discover how to set up a test environment and run project tests
We use a hosted CI service
However, there’s one thing where we have a lot of work to do: making it easy to discover what to work on.
In upcoming weeks we are going through issue trackers of all of our actively developed projects and tagging
issues suitable for beginners with “Low hanging fruit”. Leiningen has been doing this for a long time
and it works well (they have 241 contributor at the time of writing, for science’s sake!).
We’ll also try to pipe some of those low hanging fruit issues into Clojure in the Open,
an awesome initiative by Vic Goldfeld.
Legal Entity for ClojureWerkz
We are considering setting up a legal entity to make it easy to donate to ClojureWerkz and take
us to the next level. Having such entity is going to take a lot of work but also going to
open a lot of doors for us. If you have experience with setting up foundations in the UK
or EU and would like to help, please contact us.
Wrapping Up
ClojureWerkz is growing. We’re still not attracted by esoteric problems, so you can expect more of what we’ve
been doing all this time. It will be easier to help us.