The ClojureWerkz Blog

News and updates about ClojureWerkz projects

What’s Going on With Titanium

After we announced Titanium, our Clojure library on top of Titan, back in mid-February, there hasn’t been much activity related to it. Let us explain what’s going on with it and where the project is headed.

Joining Forces With Zack Maril

Titanium wasn’t the only Titan-related Clojure project on the block. Zack Maril has been working on another project called Hermes for a while. Then Zack released Ogre, a Clojure library for querying Blueprints graphs.

Titanium and Hermes were largely solving the same problem and after discussing it for some time, we decided to join forces with Zack and continue working together on Titanium. Ogre and Archimedes are now ClojureWerkz projects and Titanium 1.0.0-beta1, which will be shipped after the docs are finalized, will be based on them.

We would like to thank Zack for considering joining the team and all the work he has been doing on Titanium, Ogre and Archimedes in the last few weeks. You should follow him on Twitter and GitHub.

Upgrading to Titan 0.3

Titan is actively being worked on. In version 0.3, Titan introduces several breaking API changes and new features such as

  • Full text search (indexing)
  • Better caching layer
  • Lots of optimizations
  • Properties on vertices can have properties on them which is very useful for version, timestamping, etc

Titanium closely follows these developments. This also means that beta1 will introduce quite a few breaking API changes over alpha2. Fortunately, the earlier in project history we do these changes, the easier it will be for Titanium users.

Improving Documentation

Taking Titanium 1.0.0-beta1 included a major documentation overhaul to adapt to the Titan 0.3 changes. In addition, we are porting Ogre documentation to our standard documentation site template and keep expanding the docs.

It’s not a ClojureWerkz project if it is not documented well!

How To Follow The Development

Titanium, Ogre and Archimedes are all available on GitHub.

If you have questions about these libraries, feel free to ask on the Titan mailing list or Titanium’s own mailing list.

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. We also accept donations.

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

@michaelklishin on behalf of the ClojureWerkz Team

ClojureWerkz Now Accepts Donations

Accepting Donations

ClojureWerkz was started in mid-2011 because we were frustrated with a couple of database and messaging libraries that were very popular in the Clojure community at the time. We were also frustrated with the “culture” of not documenting projects. So developed a library the way we wanted. Then another one. And another one. Today, we find ourselves with dozens of projects that keep moving and have enough users to require us do some support. All of this is both exciting and time consuming. In 2011, the core team that did most of the development was 2 people. In 2013, it is 3 people: Michael, Alex, Zack Maril.

From time to time, we get the question: is it possible to donate to the project? Today we are happy to report that we have first two donation options ready to be announced. That’s right: now you can donate to ClojureWerkz.

How to Donate

PayPal

The easiest way to donate is with PayPal: donate@clojurewerkz.org.

Bitcoin

Our Bitcoin wallet is 1PpoesdZ4XfP9AacFFFvseWEN8jfiChBmH.

Why Donate

Over years, we’ve developed and open sourced dozens of Clojure libraries. It took time to develop and document them (as a benchmark: Elastisch documentation took solidly more than 100 hours alone). Some of them are known to be best in their class in the Clojure community.

In addition, we continue to maintain and improve them. This also takes time. By donating you help the core team justify spending all this time on open source software and help make the Clojure community a better place, both in terms of solid libraries available and spreading the culture of documenting and maintaining libraries well.

Get In Touch

If you have any questions about donations, please contact us as donate@clojurewerkz.org.

FAQ

Why Only These Limited Options?

Services such as GitTip do not work with banks in most countries. PayPal does not let residents of some countries accept payments. Stripe requires you to set up a company or foundation before you can accept card payments: this is something we are not yet ready to do.

In the end, the combination of popularity of PayPal and ease of accepting donations in Bitcoin strike the right balance for us for now.

What Will The Money Go To?

Maintaining our existing libraries and their docs, developing new ones.

How Much Should I Donate?

It’s up to you. We can give you a rule of thumb: if you use one or more of our libraries, chances are, it’s saved you at least one hour of time. So consider donating the amount you charge for 1 hour.

Can I Fund Development of a New Clojure Library?

Please contact us as donate@clojurewerkz.org and we will try to work something out. We have only one requirement: we are not based in North America and will not travel in order to develop the project.

Let us know what you think on Twitter or via email.

@michaelklishin on behalf of the ClojureWerkz Team

Money 1.2.0 Is Released

Money is a Clojure library that deals with monetary amounts and currencies, built on top of Joda Money.

1.2.0 is a minor release that has no breaking API changes and contains support for additional currencies.

Changes between Money 1.1.0 and 1.2.0

ClojureWerkz Money now provides a list of additional currencies on top of the default Joda Money currency provider. Right now the only additional currency is BTC (Bitcoin).

Change Log

Money change log is available on GitHub.

Money is a ClojureWerkz Project

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

  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Monger, a Clojure MongoDB driver for a more civilized age
  • Langohr, a Clojure client for RabbitMQ that embraces the AMQP 0.9.1 model
  • 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 Money, 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

Money 1.1.0 Is Released

Money is a Clojure library that deals with monetary amounts and currencies, built on top of Joda Money.

1.1.0 is a minor release that contains one breaking API change, contains minor improvements and upgrades dependencies.

Changes between Money 1.0.0 and 1.1.0

Comparison Functions

It is possible to compare monetary amounts using >, >=, < and <=.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
(require '[clojurewerkz.money.amounts    :as ma])
(require '[clojurewerkz.money.currencies :as mc])

(ma/< (ma/amount-of mc/USD 100) (ma/amount-of mc/USD 100))
;= false

(ma/<= (ma/amount-of mc/USD 100) (ma/amount-of mc/USD 100) (ma/amount-of mc/USD 120))
;= true

(ma/>= (ma/amount-of mc/USD 100) (ma/amount-of mc/USD 100) (ma/amount-of mc/USD 120))
;= false

(ma/> (ma/amount-of mc/USD 200) (ma/amount-of mc/USD 100))
;= true

Contributed by Ben Poweski.

Change Log

Money change log is available on GitHub.

Money is a ClojureWerkz Project

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

  • Elastisch, a minimalistic Clojure client for ElasticSearch
  • Monger, a Clojure MongoDB driver for a more civilized age
  • Langohr, a Clojure client for RabbitMQ that embraces the AMQP 0.9.1 model
  • 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 Money, 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

Introducing ClojureWerkz Money

TL;DR

ClojureWerkz Money is a tiny Clojure library for working with money and currencies. It is built on top of Joda Money. Money is small, easy to use, integrates with Monger and Cheshire.

Money, Money, Money

Many ClojureWerkz projects take advantage of existing mature JVM libraries. Today we introduce another library to this club: Money. Money is a very thin layer on top of Joda Money, an excellent money library from the creator of Joda Time.

What’s In The Box

  • Operations on monetary amounts (add, substract, multiply, divide, negate, etc)
  • Conversion between currencies
  • Support for multiple rounding modes
  • Parsing of strings (e.g. USD 20)
  • Currency unit looks by ISO-4217 code and country
  • Cheshire integration
  • Monger integration

Documentation

Money is a small library and all of its documentation guide fits in the README.

Supported Clojure Versions

Money supports Clojure 1.4+.

News and Updates

New releases and updates are announced on Twitter.

Money is a ClojureWerkz Project

Money 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 Money, 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.

Quartzite 1.1.0 Is Released

Quartzite is a Clojure DSL on top of the Quartz scheduler.

1.1.0 is a minor release that contains one breaking API change, contains minor improvements and upgrades dependencies.

Changes between Quartzite 1.0.0 and 1.1.0

1.1.x has one breaking API change in how it converts job context maps to JobDetailContext in Quartz.

clj-time upgraded to 0.5.0

clj-time dependency has been upgraded to version 0.5.0, uses Joda Time 2.2.

clojurewerkz.quartzite.date-time functions were pushed upstream to clj-time, find them in clj-time.core and clj-time.periodic.

clojurewerkz.quartzite.date-time will be removed from Quartzite in the release following 1.1.0.

Stringified Keys in JobDetailContext

Quartzite will now stringify all keys in Clojure maps converted to job detail context instances. This is due to the fact that some Quartz internals implicitly assume JobDetailContext keys are always strings.

Clojure 1.5 By Default

Quartzite now depends on org.clojure/clojure version 1.5.1. It is still compatible with Clojure 1.3+ and if your project.clj depends on a different version, it will be used, but 1.5 is the default now.

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

Change Log

Quartzite change log is available on GitHub.

Quartzite is a ClojureWerkz Project

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

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

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

Monger 1.5.0 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, MongoDB 2.4’s full text search support and various minor improvements.

Full Text Search Support

Full text search in MongoDB 2.4 can be used via commands but Monger 1.5 also provides convenience functions in the monger.search namespace:

  • monger.search/search for performing queries
  • monger.search/results-from for obtaining hit documents sorted by score
1
2
3
4
5
6
7
8
(require '[monger.collection :as mc])
(require '[monger.search     :as ms])

(mc/ensure-index coll {:subject "text" :content "text"})
(mc/insert coll {:subject "hello there" :content "this should be searchable"})
(mc/insert coll {:subject "untitled" :content "this is just noize"})

(println (ms/results-from (ms/search coll "hello"))

MongoDB Java Driver Update

MongoDB Java driver dependency has been updated to 2.11.0.

New Geospatial Operators

monger.operators now defines a few more operators for convenience:

  • $getWithin
  • $getIntersects
  • $near

Of course, these and any other new operators can be passed as strings (e.g. "$near") as well.

monger.core/admin-db

monger.core/admin-db is a new convenience function that returns the admin database reference.

monger.command/admin-command

monger.command/admin-command is a new convenience function for running commands on the admin database.

monger.core/mongo-options Updates

monger.core/mongo-options options are now up-to-date with the most recent MongoDB Java driver.

Factory DSL Is Gone

Monger’s factory DSL (an undocumented experimental feature) has been removed from monger.testkit. It did not work as well as we expected and there are better alternatives available now.

Clojure 1.5 By Default

Monger now depends on org.clojure/clojure version 1.5.1. It is still compatible with Clojure 1.3+ and if your project.clj depends on a different version, it will be used, but 1.5 is the default now.

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

Authentication On Default Database

monger.core/authenticate now has a 2-arity version that will authenticate on the default database:

1
2
3
4
5
(let [username "myservice"
      pwd      "LGo5h#B`cTRQ>28tba6u"]
  (monger.core/use-db! "mydb")
  ;; authenticates requests for mydb
  (monger.core/authenticate username (.toCharArray pwd)))

ClojureWerkz Support Upgrade

ClojureWerkz Support dependency has been updated to version 0.15.0. This means Monger now will use Cheshire 5.0.x.

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

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

Monger 1.5.0-rc1 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, MongoDB 2.4’s full text search support and various minor improvements.

Full Text Search Support

Full text search in MongoDB 2.4 can be used via commands but Monger 1.5 also provides convenience functions in the monger.search namespace:

  • monger.search/search for performing queries
  • monger.search/results-from for obtaining hit documents sorted by score
1
2
3
4
5
6
7
8
(require '[monger.collection :as mc])
(require '[monger.search     :as ms])

(mc/ensure-index coll {:subject "text" :content "text"})
(mc/insert coll {:subject "hello there" :content "this should be searchable"})
(mc/insert coll {:subject "untitled" :content "this is just noize"})

(println (ms/results-from (ms/search coll "hello"))

MongoDB Java Driver Update

MongoDB Java driver dependency has been updated to 2.11.0.

New Geospatial Operators

monger.operators now defines a few more operators for convenience:

  • $getWithin
  • $getIntersects
  • $near

Of course, these and any other new operators can be passed as strings (e.g. "$near") as well.

monger.core/admin-db

monger.core/admin-db is a new convenience function that returns the admin database reference.

monger.command/admin-command

monger.command/admin-command is a new convenience function for running commands on the admin database.

monger.core/mongo-options Updates

monger.core/mongo-options options are now up-to-date with the most recent MongoDB Java driver.

Factory DSL Is Gone

Monger’s factory DSL (an undocumented experimental feature) has been removed from monger.testkit. It did not work as well as we expected and there are better alternatives available now.

Clojure 1.5 By Default

Monger now depends on org.clojure/clojure version 1.5.1. It is still compatible with Clojure 1.3+ and if your project.clj depends on a different version, it will be used, but 1.5 is the default now.

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

Authentication On Default Database

monger.core/authenticate now has a 2-arity version that will authenticate on the default database:

1
2
3
4
5
(let [username "myservice"
      pwd      "LGo5h#B`cTRQ>28tba6u"]
  (monger.core/use-db! "mydb")
  ;; authenticates requests for mydb
  (monger.core/authenticate username (.toCharArray pwd)))

ClojureWerkz Support Upgrade

ClojureWerkz Support dependency has been updated to version 0.15.0. This means Monger now will use Cheshire 5.0.x.

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

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

The Future of Neocons

A Bit of History

Neocons was started in late 2011 because there was no Clojure client for Neo4J Server that we were happy with.

Neocons reached 1.0 in July 2012. Thanks to solid documentation, it quickly gathered several users besides its original developers and was generally well received.

Ever since then people contributed ideas, bug fixes and features. Neocons moved in small steps and we tried hard to keep things backwards-compatible. 1.1 was released in March 2013 and (as far as we know) is a drop-in replacement for 1.0.x.

This incremental releases philosophy is appreciated by the Clojure community. Clojure itself does not try to pack features as fast as possible. Many things are introduced into the language literally years after they were first discussed. This is a good thing and that’s why so many codebases can go from 1.3 to 1.4 and then to 1.5 without any changes.

However, every once in a while you need to have some freedom to make sweeping changes.

Looking To The Future

Not so long ago a little birdie told us about what’s coming in Neo4J Server 2.0. We cannot share it in this post but it is nice and may require breaking API changes in client libraries. That’s why the next non-bugfix release of Neocons will be 2.0.

It will target Neo4J Server 2.0. For 1.1, we wanted to move most of the code to use the Cypher language. Unfortunately, Cypher still has several limitations (one example) that do not let us do that. But it is still a good idea and we will try to get there with 2.0.

What Does It Mean For You?

We will try to keep Neocons 2.0 backwards compatible if we can. ClojureWerkz maintainers care about backwards compatibility and hate changes app code for no good reason as much as you do.

However, there’s always a possibility that the awesome Neo4J team will pack 2.0 with features so sweet, we will have to re-focus the library around them.

Time will tell!

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.1.0 Is Released

TL;DR

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

1.1.0 is a minor release that includes several minor improvements and bug fixes and is 100% backwards-compatible with 1.0.x.

Next release of Neocons will be 2.0. It will target development of Neo4J 2.0 closely and may include breaking API changes.

Changes between Neocons 1.0.x and 1.1.0

ClojureWerkz Support Upgrade

Neocons now uses ClojureWerkz Support 0.15.0.

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.

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

GH issue: #20

clj-http Upgrade

Neocons now uses clj-http 0.6.4.

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.

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.

Pass Configuration When Creating Node Indexes

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

Change Log

We recommend all users to upgrade to 1.1.0.

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