The ClojureWerkz Blog

News and updates about ClojureWerkz projects

Monger 1.5.0-beta1 Is Released

TL;DR

Monger is an idiomatic Clojure MongoDB driver for a more civilized age. It has batteries included, offers powerful expressive query DSL, strives to support every MongoDB 2.0+ feature and has sane defaults. It also has solid documentation.

1.5.0 is a minor completely backwards-compatible release that includes updated dependencies and very minor improvements.

Changes in 1.5.0-beta1

Explicit DBCursor Closure by monger.collection/find-maps and the like

monger.collection/find-maps and the like will now explicitly close DB cursors.

GH issue: #47

MongoDB Java Driver Update

MongoDB Java driver dependency has been updated to 2.10.1.

Cheshire 5.0.2

Cheshire, the Clojure JSON serialization library used by monger.json and monger.joda-time extensions, has been upgraded to 5.0.2.

Cheshire 5.0 change log is available on GitHub.

ClojureWerkz Support 0.14.0

ClojureWerkz Support library is upgraded to 0.14.

Change Log

Monger change log is available on GitHub.

Monger is a ClojureWerkz Project

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

  • Welle, a Riak client with batteries included
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Neocons, a client for the Neo4J REST API
  • Langohr, a Clojure client for RabbitMQ that embraces the AMQP 0.9.1 model
  • Quartzite, a powerful scheduling library

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

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

@michaelklishin on behalf of the ClojureWerkz Team

Welle 1.4.0 Is Released

TL;DR

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

1.4.0 is a minor release that is 100% backwards-compatible with 1.3.x. This version has been tested against Riak 1.2.x as well as RCs of Riak 1.3.0.

Changes between Welle 1.3.0 and 1.4.0

Riak 1.3.0 Ready

Welle 1.4.0 has been tested against the upcoming Riak 1.3.0 release.

Tombstones Handling

In eventually consistent systems such as Riak, deleted objects may sometimes “reappear” due to concurrent modifications. Welle by default will filter out tombstones in clojurewerkz.welle.kv/fetch. If you want to retrieve all objects including tombstones, pass :return-deleted-vlock as true to clojurewerkz.welle.kv/fetch. This behavior is new in Welle 1.4.0 which uses Riak Java client 1.1.0.

Riak Java Client Update

Welle now uses Riak Java client 1.1.0.

Cheshire Update

Cheshire dependency has been upgraded to version 5.0.2.

clojurewekz.welle.kv/delete-all Is No Longer Lazily Evaluated

Contributed by Renaud Tircher.

Automatic Deserialization Support For clojurewerkz.welle.kv/store

clojurewerkz.welle.kv/store, when used with the :return-body option, now will automatically deserialize it the same way clojurewerkz.welle.kv/fetch and clojurewerkz.welle.kv/fetch-one do.

Suggested by Allen Johnson.

clj-http Update

clj-http dependency has been upgraded to version 0.6.4.

HTTP Cluster Connection URLs

Updated HTTP cluster connections to be full URLs. This change is primarily to allow users to specify alternate ports.

HTTP cluster connections now require a full url:

1
2
3
(require '[clojurewerkz.welle.core :as wc])

(wc/connect-to-cluster! ["http://node1:8098/riak" "http://node2:8098/riak"])

Also included in this change:

clojurewerkz.welle.core/default-port removed and replaced by the following:

  • clojurewerkz.welle.core/default-http-port
  • clojurewerkz.welle.core/default-pb-port

Reasonable Vclock Pruning Defaults

Welle now uses reasonable vclock pruning setting defaults in clojurewerkz.welle.buckets/update.

Kudos to @mefesto for reporting the issue.

Change Log

We recommend all users to upgrade to 1.4.0 a try.

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.

Michael on behalf of the ClojureWerkz Team

Neocons 1.1.0-beta4 Is Released

TL;DR

Neocons is a feature rich idiomatic Clojure client for the Neo4J REST API.

1.1.0-beta4 is a preview 1.1.0 release that is 100% backwards-compatible with 1.0.x.

Changes between Neocons 1.1.0-beta3 and 1.1.0-beta4

Improved URI Path Encoding

Keys with colons are now handled correctly (as of Urly 2.0.0-alpha5).

GH issue: #21

Change Log

We recommend all users to give 1.1.0-beta4 a try.

Neocons change log is available on GitHub.

Neocons is a ClojureWerkz Project

Neocons 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
  • Welle, a Riak client with batteries included
  • Quartzite, a powerful scheduling library

and several others. If you like Neocons, 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.0-beta11 Is Released

TL;DR

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

1.0.0-beta11 is a development milestone release. We recommend all users to upgrade to it.

Changes between Langohr 1.0.0-beta10 and 1.0.0-beta11

HTTP API Client

Langohr 1.0.0-beta11 features initial bits of RabbitMQ HTTP API client under langohr.http.

More Convenient TLS Support

Langohr will now automatically enable TLS/SSL if provided :port is 5671.

RabbitMQ Java Client 3.0.x

RabbitMQ Java Client has been upgraded to version 3.0.2.

langohr.exchange/declare-passive

langohr.exchange/declare-passive is a new function that performs passive exchange declaration (checks if an exchange exists).

An example to demonstrate:

1
2
3
4
5
(require '[langohr.channel  :as lch])
(require '[langohr.exchange :as le])

(let [ch (lch/open conn)]
  (le/declare-passive ch "an.exchange"))

If the exchange does exist, the function has no effect. If not, an exception (com.rabbitmq.client.ShutdownSignalException, java.io.IOException) will be thrown.

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

Introducing Titanium

TL;DR

Titanium is a powerful Clojure graph library that is built on top of Aurelius Titan. It combines a Clojure-friendly API and graph processing DSL with the power of Titan.

The Quest To Improve

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.

Some of them work very well and we will likely be happy with them for years to come. However, with some projects we keep thinking there is a limit to their usefullness or application. Sometimes the limitations are completely outside of our control, for example, licensing or implementation details of dependencies.

Standing On The Shoulders of Giants

Fortunately, the open source community is moving fast and new data stores are being released every year. Last year folks from Aurelius released Titan, a new powerful graph library that has pluggable storage backends and nails a few problems we’ve been having with other graph data stores.

Titan is primarily used as a JVM library which is significantly more efficient than issuing HTTP requests all the time when you are busy populating or updating the graph from an ongoing flow of events in the same JVM (e.g. a Web crawler activity). In addition, it can use Cassandra or HBase for durable storage, largely eliminating operations-related limitations (backup tools, HA) in some other popular open source graph data stores.

As Titan was getting more and more mature, we kept evaluating it and discussing what a good Clojure library on top of it would look like.

Today we are happy to release some results of that thinking.

Introducing Titanium

Titanium is a powerful Clojure graph library that is built on top of Aurelius Titan. It combines a Clojure-friendly API and graph processing DSL with the power of Titan:

Today we release a very early version, 1.0.0-alpha1.

What’s In The Box

In 1.0.0-alpha1, with Titanium you can

  • Populate the graph (add vertices, edges)
  • Manipulate properties of vertices and edges
  • Define indexes for graph elements
  • Query the graph using key/value lookups
  • Query and traverse the graph via a (semi-complete) DSL powered by Gremlin and Pipes
  • Configure Titan graphs

all via easy to use, Clojuric API.

Documentation & Examples

Because this is a ClojureWerkz project, we could not make this release public without at least one complete documentation guide.

Titanium’s test suite can be used to get more code examples.

Development, Issue Tracking, Supported Clojure Versions

Titanium targets Clojure 1.3+ and tested against 3 Clojure versions (1.4, 1.3, 1.5-master-SNAPSHOT) x 3 JDKs (OpenJDK 7, Oracle JDK 7, OpenJDK 6).

The source is available on GitHub. We also use GitHub to track issues. If you want to contribute, there is a section on our workflow in the README.

License

Titanium is double-licesned under the Eclipse Public License (the same as Clojure) and the Apache Public License 2.0 (the same as Titan).

What’s Ahead

We definitely want Titanium to be feature complete and get more powerful as Titan itself gets more powerful and mature. The Tinkerpop stack has a lot to offer and a lot of potential to grow into the industry standard graph technologies stack (at least on the JVM). Titanium will take full advantage of that.

We also think Titanium can grow to offer useful features of its own. There is a lot of work ahead even to catch up with Titan, but we already have a few ideas. Our short term goal is to make Titanium reach rough feature parity with Neocons and expose all the good parts of Titan.

Needless to say, documentation guides will only get better.

News and Updates

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

Titanium is a ClojureWerkz Project

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

  • Welle, a Riak client with batteries included
  • Monger, a Clojure MongoDB client for a more civilized age
  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Neocons, a Clojure client for the Neo4J REST API
  • Langohr, a Clojure client for RabbitMQ that embraces the AMQP 0.9.1 model
  • Quartzite, a powerful scheduling library

and several others. If you like Titanium, 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.

Neocons 1.1.0-beta3 Is Released

TL;DR

Neocons is a feature rich idiomatic Clojure client for the Neo4J REST API.

1.1.0-beta3 is a preview 1.1.0 release that is 100% backwards-compatible with 1.0.x.

Changes between Neocons 1.1.0-beta2 and 1.1.0-beta3

Correct URI Path Encoding

Neocons now correctly encodes all parts of URIs, which means index keys and values can contain whitespace and Unicode characters, for example.

GH issue: #20

clj-http upgraded to 0.6.4

Neocons now uses clj-http 0.6.4.

Support upgraded to 0.12.0

Neocons now uses ClojureWerkz Support 0.12.0.

Change Log

We recommend all users to give 1.1.0-beta3 a try.

Neocons change log is available on GitHub.

Neocons is a ClojureWerkz Project

Neocons 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
  • Welle, a Riak client with batteries included
  • Quartzite, a powerful scheduling library

and several others. If you like Neocons, 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

‘Spyglass 1.1.0-beta2 Is Released’

TL;DR

Spyglass is a very fast Clojure client for Memcached (as well as Couchbase and Kestrel) built on top of SpyMemcached.

1.1.0-beta2 is second preview 1.1.0 release that is 100% backwards-compatible with 1.0.x.

Changes between 1.1.0-beta1 and 1.1.0-beta2

SASL (Authentication) Support

clojurewerkz.spyglass.client/text-connection and clojurewerkz.spyglass.client/bin-connection now support credentials:

(ns my.service (:require [clojurewerkz.spyglass.client :as c]))

;; uses credentials from environment variables, e.g. on Heroku: (c/text-connection “127.0.0.1:11211” (System/getenv “MEMCACHE_USERNAME”)

                                 (System/getenv "MEMCACHE_PASSWORD"))

When you need to fine tune things and want to use a custom connection factory, you need to instantiate auth descriptor and pass it explicitly, like so:

1
2
3
4
5
6
7
8
(ns my.service
  (:require [clojurewerkz.spyglass.client :as c])
  (:import [net.spy.memcached.auth AuthDescriptor]))

(let [ad (AuthDescriptor/typical (System/getenv "MEMCACHE_USERNAME")
                                 (System/getenv "MEMCACHE_PASSWORD"))]
  (c/text-connection "127.0.0.1:11211" (c/text-connection-factory :failure-mode :redistribute
                                                                  :aut-descriptor ad)))

Changes between 1.0.0 and 1.1.0-beta1

Blocking Deref for Futures

Futures returned by async Spyglass operations now implement “blocking dereferencing”: they can be dereferenced with a timeout and default value, just like futures created with clojure.core/future and similar.

Contributed by Joseph Wilk.

Support For Configurable Connections

New functions clojurewerkz.spyglass.client/text-connection-factory and clojurewerkz.spyglass.client/bin-connection-factory provide a Clojuric way of instantiating connection factories. Those factories, in turn, can be passed to new arities of clojurewerkz.spyglass.client/text-connection and clojurewerkz.spyglass.client/bin-connection to control failure mode, default transcoder and so on:

1
2
3
4
(ns my.service
  (:require [clojurewerkz.spyglass.client :as c]))

(c/text-connection "127.0.0.1:11211" (c/text-connection-factory :failure-mode :redistribute))

core.cache Implementation

clojurewerkz.spyglass.cache now provides a clojure.core.cache implementation on top of Memcached:

1
2
3
4
5
6
7
8
9
(ns my.service
  (:require [clojurewerkz.spyglass.client :as sg]
            [clojurewerkz.spyglass.cache  :as sc]
            [clojure.core.cache           :as cc]))

(let [client (sg/text-connection)
      cache  (sc/sync-spyglass-cache-factory)]
      (cc/has? cache "a-key")
      (cc/lookup cache "a-key"))

SyncSpyglassCache uses synchronous operations from clojurewerkz.spyglass.client. Asynchronous implementation that returns futures will be added in the future.

SpyMemcached 2.8.4

SpyMemcached has been upgraded to 2.8.4.

Improved Couchbase Support

clojurewerkz.spyglass.couchbase/connection is a new function that connects to Couchbase with the given bucket and credentials. It returns a client that regular clojurewerkz.spyglass.memcached functions can use.

Clojure 1.4 By Default

Spyglass now depends on org.clojure/clojure version 1.4.0. It is still compatible with Clojure 1.3 and if your project.clj depends on 1.3, it will be used, but 1.4 is the default now.

We encourage all users to upgrade to 1.4, it is a drop-in replacement for the majority of projects out there.

Change Log

We recommend all users to give 1.1.0-beta2 a try.

Spyglass change log is available on GitHub.

Spyglass is a ClojureWerkz Project

Spyglass 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 * Welle, a Riak client with batteries included
  • Quartzite, a powerful scheduling library

and several others. If you like Spyglass, 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

We Want to Make ClojureWerkz Better. With Your Feedback!

TL;DR

If you use a ClojureWerkz project (or two), please tell us a little bit about your project, your team size and what libraries do you find missing in the Clojure ecosystem.

A Bit of History

When ClojureWerkz was started in mid-2011, the goal had been to release a number of Clojure libraries we needed under a liberal license that other people will find useful. One and a half years later, there are some additional goals behind the project but ultimately it all comes down to sharing projects that are useful and easy to use. We are not fans of highly esoteric, experimental, may-or-may-not-work kind of stuff.

Reading CS papers and implementing what’s there is great but for younger languages such as Clojure, nothing matters more than solid libraries for boring problems. We developed first ClojureWerkz libraries while working on products that involved a lot of data processing, so data store clients was a natural thing to contribute.

Needless to say, we are very happy to see when other people use our libraries.

ClojureWerkz Projects in the Wild

Sometimes we learn about companies and project that use our stuff because their engineers contribute something or simply file an issue. Sometimes they contact us to tell that they appreciate our attention to documentation. Sometimes we hear our libraries mentioned in talks about Clojure adoption, like this talk on Clojure at Nokia.

There are large and small companies on the list of contributors and adopters. But we probably don’t know about 95+% of them. Curious as we are, we figured its time to reach out and learn a little bit more about how our libraries are used.

We Want to Improve

But it’s not just about stroking our egos. It is also about improving our projects. If our stuff sucks or is really hard to adopt, our past, present and future efforts are in vain.

So, today we are asking our community for a little favor: tell us how you use ClojureWerkz projects! Share as much as you can or willing to:

  • Which projects do you use
  • What do you use them for
  • How large is your team. Was it easy to adopt our stuff?
  • What sucks about it?
  • What libraries do you think we should consider looking into in the future?

If we gather enough information about projects and companies, we will put together a testimonials page. Maybe it will make it a bit easier to convince decision makers on your team to consider Clojure and our libraries, maybe not. In any case, we will be more aware of how our work is used by other people.

And if email sounds like an old boring thing you no longer do, just share what you can on Twitter!

Thank You!

Thank you to all our users and contributors. With a number of project going 1.0 last year, we are very much only getting started with ClojureWerkz and very excited about what can be improved with a little bit of community feedback.

Michael on behalf of the ClojureWerkz Team

Neocons 1.1.0-beta2 Is Released

TL;DR

Neocons is a feature rich idiomatic Clojure client for the Neo4J REST API.

1.1.0-beta2 is second preview 1.1.0 release that is 100% backwards-compatible with 1.0.x.

Changes between Neocons 1.1.0-beta1 and 1.1.0-beta2

Support upgraded to 0.10.0

Neocons now uses ClojureWerkz Support 0.10.0.

clj-http upgraded to 0.6.3

Neocons now uses clj-http 0.6.3.

clojurewerkz.neocons.rest.relationship/maybe-create Now Fully Supports Ids

clojurewerkz.neocons.rest.relationship/maybe-create now correctly works with node ids as well as Node records.

GH issue: #19.

More Informative Exceptions

HTTP exceptions bubbling up now will carry more information (namely the response :body).

Contributed by Adrian Gruntkowski.

clojurewerkz.neocons.rest.relationships/get-many

clojurewerkz.neocons.rest.relationships/get-many is a new function that fetches multiple relationships by id in a single request:

1
2
3
(require '[clojurewerkz.neocons.rest.relationships :as rel])

(rel/get-many [id1 id2 id3])

Contributed by Adrian Gruntkowski.

Changes between Neocons 1.0.0 and 1.1.0-beta1

Initial Spatial Plugin Support

Neocons now has initial support for the Neo4J Spatial plugin in the clojurewerkz.neocons.spatial namespace.

Contributed by Kyle Goodwin.

Cheshire For JSON Serliazation

Neocons now uses (and depends on) Cheshire for JSON serialization. clojure.data.json is no longer a dependency.

Clojure 1.4 By Default

Neocons now depends on org.clojure/clojure version 1.4.0. It is still compatible with Clojure 1.3 and if your project.clj depends on 1.3, it will be used, but 1.4 is the default now.

We encourage all users to upgrade to 1.4, it is a drop-in replacement for the majority of projects out there.

Pass Configuration When Creating Node Indexes

clojurewerkz.neocons.rest.nodes/create-index now correctly passes index configuration to Neo4J Server. Reported in #6.

clj-http upgraded to 0.5.5

Neocons now uses clj-http 0.5.5.

Change Log

We recommend all users to give 1.1.0-beta2 a try.

Neocons change log is available on GitHub.

Neocons is a ClojureWerkz Project

Neocons 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
  • Welle, a Riak client with batteries included
  • Quartzite, a powerful scheduling library

and several others. If you like Neocons, 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

Neocons 1.0.3 Is Released

TL;DR

Neocons is a feature rich idiomatic Clojure client for the Neo4J REST API.

1.0.3 is a 100% backwards-compatible bug fix release.

Changes between Neocons 1.0.2 and 1.0.3

clojurewerkz.neocons.rest.relationship/maybe-create Now Fully Supports Ids

clojurewerkz.neocons.rest.relationship/maybe-create now correctly works with node ids as well as Node records.

GH issue: #19.

Change Log

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

Neocons change log is available on GitHub.

Neocons is a ClojureWerkz Project

Neocons 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
  • Welle, a Riak client with batteries included
  • Quartzite, a powerful scheduling library

and several others. If you like Monger, 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