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.
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.
Cassaforte was started about 11 months 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.
Hayt makes working with CQL as nice as the new
1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8
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
- 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.
Cassaforte documentation is far from finished but it follows the “if it is not documented, it is not part of ClojureWerkz” rule. 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
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
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.