The ClojureWerkz Blog

News and updates about ClojureWerkz projects

Langohr 1.6.0 Is Released

TL;DR

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

1.6.0 is a minor feature release.

Changes between Langohr 1.5.0 and 1.6.0

RabbitMQ Java Client Upgrade

RabbitMQ Java client dependency has been updated to 3.2.0.

Automatic Recovery Improvements

Connections will only be recovered if shutdown was not application-initiated.

Contributed by Stephen Dienst.

Support Update

Langohr now depends on ClojureWerkz Support 0.20.0.

langohr.conversion/BytePayload and langohr.conversion/to-bytes are replaced by clojurewerkz.support.bytes/ByteSource and clojurewerkz.support.bytes/to-byte-array, respectively.

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
  • Cassaforte, a Clojure Cassandra client built around CQL 3.0
  • 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

Machine Head 1.0.0-beta3 Is Released

TL;DR

Machine Head is a small Clojure MQTT client.

1.0.0-beta3 is a development milestone which exposes a minor feature in the Paho Java client.

Changes between Machine Head 1.0.0-beta2 and 1.0.0-beta3

Clean Session Support

clojurewerkz.machine-head.client/connect now supports one more option: :clean-session. When set to true, the option means that the client and MQTT broker should discard state that might have been kept from earlier connections.

Change Log

Machine Head change log is available on GitHub.

Machine Head is a ClojureWerkz Project

Machine Head 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
  • Cassaforte, a Cassandra client built around CQL 3
  • Neocons, a feature rich Clojure client for Neo4J REST API

and several others. If you like Machine Head, 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.3.0-beta2 Is Released

TL;DR

Cassaforte is a 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.3.0-beta2 is a milestone release that upgrades Hayt which contains a slew of bug fixes.

Changes between Cassaforte 1.3.0-beta1 and 1.3.0-beta2

Hayt Update

Hayt dependency has been updated to 1.4.1, which supports if-not-exists in create-keyspace:

1
2
3
4
5
(create-keyspace "main"
           (if-not-exists)
           (with {:replication
                    {:class "SimpleStrategy"
                     :replication_factor 1 }}))

Thank You, Contributors

Kudos to Max Penet for contributing to this release.

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
  • EEP, a Clojure library for stream (event) processing
  • 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.

Cassaforte 1.3.0-beta1 Is Released

TL;DR

Cassaforte is a 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.3.0-beta1 is a milestone release that introduces one minor feature and upgrades Cassandra Java driver.

Changes between Cassaforte 1.2.x and 1.3.0-beta1

Extra Clauses Support in insert-batch

It is now possible to use extra CQL clauses for every statement in a batch insert (e.g. to specify TTL):

1
2
3
(cql/insert-batch "table"
  {:something "cats"}
  [{:something "dogs"} (using :ttl 60)])

Contributed by Sam Neubardt.

Cassandra Java Driver Update

Cassandra Java driver has been updated to 1.0.4 which contains a bunch of bug fixes.

Thank You, Contributors

Kudos to Sam Neubardt for contributing to this release.

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
  • EEP, a Clojure library for stream (event) processing
  • 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.

Machine Head 1.0.0-beta2 Is Released

TL;DR

Machine Head is a small Clojure MQTT client.

1.0.0-beta2 is a development milestone which refines the API and has breaking changes.

Changes between Machine Head 1.0.0-beta1 and 1.0.0-beta2

client/subscribe-with-qos is Removed

clojurewerkz.machine-head.client/subscribe-with-qos is removed. Instead, clojurewerkz.machine-head.client/subscribe now takes a new option, :qos.

Contributed by Martin Trojer.

Change Log

Machine Head change log is available on GitHub.

Machine Head is a ClojureWerkz Project

Machine Head 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
  • Cassaforte, a Cassandra client built around CQL 3
  • Neocons, a feature rich Clojure client for Neo4J REST API

and several others. If you like Machine Head, 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 2.0.0-rc1 Is Released

TL;DR

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

2.0.0-rc1 is a release candidate. It is 100% backwards compatible with 1.1 and has one breaking API change compared to 2.0.0-beta3.

Neocons documentation has been updated to cover the new features in Neocons 2 and Neo4J.

Changes between Neocons 2.0.0-beta3 and 2.0.0-rc1

Renamed Function

Renamed the clojurewerkz.neocons.rest.constraints/drop to clojurewerkz.neocons.rest.constraints/drop-unique for future portability.

Documentation Updates

Neocons documentation has been updated to cover the new features in Neocons 2 and Neo4J:

Change Log

We encourage all users to give this version (and Neo4J 2.0!) 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
  • Cassaforte, a Cassandra client built around CQL 3
  • 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 2.0.0-beta3 Is Released

TL;DR

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

2.0.0-beta3 is a development milestone that adds support to remaining Neo4J 2.0 features. It is 100% backwards compatible.

Changes between Neocons 2.0.0-beta2 and 2.0.0-beta3

Constraints Support (Neo4J 2.0 Only)

clojurewerkz.neocons.rest.constraints is a new namespace that implements Neo4J 2.0 constraints.

1
2
3
4
5
6
7
8
9
10
(require '[clojurewerkz.neocons.rest.constraints :as cts])

;; create a uniqueness constraint
(cts/create-unique "Person" :name)

;; get constraint info
(cts/get-unique "Person" :name)

;; drop a constraint
(cts/drop "Person" :name)

Labels Support (Neo4J 2.0 Only)

clojurewerkz.neocons.rest.labels is a new namespace that provides support for labels in Neo4J 2.0.

It is possible to add, replace, remove and retrieve labels to/from a node.

To add labels to a node, use clojurewerkz.neocons.rest.labels/add:

1
2
3
(require '[clojurewerkz.neocons.rest.labels :as nl])

(nl/add node ["neo4j" "clojure"])

To add replaces all labels on a node, use clojurewerkz.neocons.rest.labels/replace:

1
2
3
(require '[clojurewerkz.neocons.rest.labels :as nl])

(nl/replace node ["graph" "database"])

Deleting a label from a node is possible with clojurewerkz.neocons.rest.labels/remove:

1
2
3
(require '[clojurewerkz.neocons.rest.labels :as nl])

(nl/remove node "database")

clojurewerkz.neocons.rest.labels/get-all-labels is the function that lists either all labels in the database (w/o arguments) or on a specific node (1-arity):

1
2
3
4
5
6
(require '[clojurewerkz.neocons.rest.labels :as nl])

(nl/get-all-labels node)
;= [all labels]
(nl/get-all-labels node)
;= [labels on node]

Change Log

We encourage all users to give this version (and Neo4J 2.0!) 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

Route One 1.0.0-rc3 Is Released

Route One is a Clojure DSL for URL/URI/path generation from a route map, compatible with Compojure’s Clout.

1.0.0-rc3 is a release candidate that introduces one small Compojure integration feature.

Changes Between 1.0.0-rc2 and 1.0.0-rc3

Catch All Route

clojurewerkz.route-one.compojure/catch-all is a new helper macro that generates a route that matches any path.

It is useful for defining fallback routes (such as 404 or 500 status pages).

Change log

Route One change log is available on GitHub.

Route One is a ClojureWerkz Project

Route One 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 small feature complete Clojure client for ElasticSearch
  • Cassaforte, a Clojure Cassandra client
  • Monger, a Clojure MongoDB client for a more civilized age
  • 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

Elastisch 1.3.0-beta5 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.3.0-beta5 is a development milestone release that is compatible with 1.2.0 and includes one minor feature.

Changes between Elastisch 1.3.0-beta4 and 1.3.0-beta5

Upserts in Native Client

Native client now supports upserts of documents:

1
2
3
(require '[clojurewerkz.elastisch.native.document :as doc])

(doc/upsert "people" "person" "elastisch" {:name "Elastisch" :language "Clojure"})

Change log

Elastisch change log is available on GitHub.

Thank You, Contributors

Kudos to Max Barnash 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
  • Meltdown, a Clojure interface to Reactor
  • 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

Neocons 2.0.0-beta2 Is Released

TL;DR

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

2.0.0-beta2 is a development milestone that targets Neo4J 2.0 and drops Clojure 1.3 support but otherwise is backwards compatible.

With this release, we begin introducing new features to Neocons that are specific to Neo4J 2.0.

Changes between Neocons 1.1.0 and 2.0.0-beta2

Clojure 1.3 Support Dropped

Neocons no longer supports Clojure 1.3.

Transaction Support (Neo4J Server 2.0)

Neocons 2.0 gains support for transactions.

Higher Level API

A group of Cypher statements can be executed in a transaction that will be committed automatically upon success. Any error during the execution will trigger a rollback.

1
2
3
4
5
(require '[clojurewerkz.neocons.rest.transaction :as tx])

(tx/in-transaction
  (tx/statement "CREATE (n {props}) RETURN n" {:props {:name "Node 1"}})
  (tx/statement "CREATE (n {props}) RETURN n" {:props {:name "Node 2"}}))

Lower Level API

Transactions are instantiated from a group of Cypher statements that are passed as maps to clojurewerkz.neocons.rest.transaction/begin:

1
2
3
4
5
(let [t (tx/begin-tx [{:statement "CREATE (n {props}) RETURN n" {:props {:name "My node"}}}])]
  (tx/commit t))

(let [t (tx/begin-tx)]
  (tx/rollback t))

clojurewerkz.neocons.rest.transaction/commit and clojurewerkz.neocons.rest.transaction/rollback commit and roll a transaction back, respectively.

Macro for working with a transaction

If you want a more fine grained control of working in a transaction without manually committing or checking for exceptions, you can use the clojurewerkz.neocons.rest.transaction/with-transaction macro.

1
2
3
4
5
6
7
8
(require '[clojurewerkz.neocons.rest.transaction :as tx])

(let [transaction (tx/begin-tx)]
  (tx/with-transaction
    transaction
    true
    (let [[_ result] (tx/execute transaction [(tx/statement "CREATE (n) RETURN ID(n)")])]
    (println result))))

If there any errors while processing, the transaction is rolled back.

The first argument is the variable which holds the transaction information. The second argument to the macro is commit-on-success, which commits the transaction there are no errors.

Change Log

We encourage all users to give this version (and Neo4J 2.0!) 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