I have recently started using nodejs and cassandra, i am switching from mongodb currently using mongooseJS as node-mongo client .
This is one of the best writter client library i have ever used, it has all the necessary features for a database client library, load balancing, node discovery , retry policy etc.
There this one thing i miss from mongooseJS is, in mongooseJS mongoose.connect() caches the connection string and u can simply use
var mongoose = require("mnongoose");
in any file you require it , by just calling mongoose.connect() once during application startup.
I wish cassandra nodejs-driver would have same feature so that we don't have to require client connection in every file where we need to connect to cassandra
if what i explained was not clear here is a stackoverflow question which explains it in detail
i wish this gets added soon if possible
I generally use classes and pass the dependencies in the constructor, composing all the dependency tree in the app startup.
I understand many people use modules without classes and composing gets a little harder.
I think it's a great idea, my only concern would be to how we can implement it keeping it backward compatible.
I renamed the ticket to "Implement instance caching"