Express-Cassandra, an Advanced Cassandra 3 ORM for NodeJS

While searching for a good Cassandra ORM for NodeJS, I was a bit frustrated because I couldn't find a good library that would support almost all the Cassandra features. There are some good open source Cassandra ORMs for NodeJS, but they were too basic and didn't support most of the important Cassandra features that distinguished Cassandra from other databases.

Also there are some popular multi-database ORMs like waterline which is part of the sailsjs framework and there is a cassandra adapter for waterline.

But there is something fundamentally wrong about ORMs that tries to support multiple databases. The problem becomes more prevalent, when the same orm does support both SQL and NoSQL dbs. You start to lose the reason for choosing the database of your choice. Because that excellent new feature supported by your db is not supported by your orm. On the other hand, the orm features are too generic that if all your needs are available there, then there was no reason for you to choose any specific database for your app at the first place. Anything would work out well for your app.

So while I chose Cassandra as my database for some specific reasons where Cassandra shines, but could't find many of those "cool" features of Cassandra supported in any of the available Cassandra ORMs for NodeJS. The closest one I could find was Apollo though it looks like it's not actively maintained anymore. Also there are important new features in new Cassandra 3.x that was not supported by any of the available ORM options out there.

So I decided to write one for me. I started based on the Apollo codebase but then largely modified it to suit my needs and eventually wrote my own module express-cassandra. After open sourcing the node module, several other guys joined me on github and contributed to the development of the module. The module now supports most of the Cassandra features including the latest materialized views and aggregate functions.

Express-Cassandra is a Framework Independent Cassandra ORM for NodeJS. It automatically loads your models and provides you with object oriented mapping to your cassandra tables like a standard ORM. It's a node module and published into npm, so you can install it like the following:


For cassandra version 3.x

npm install express-cassandra

For older cassandra 2.x

npm install express-cassandra@0.5.4

For a detailed documentation on how to use this module, please refer to the github repository:

Express-Cassandra Docs on Github