Reputation: 61
Currently we're using cassandra with cassandra-driver, doing standard queries and accessing "raw" results in our DAL and BL layers. Our application should support millions of users, each request in average dose 3 reads from the DB, we have about 30 models.
We are thinking about using some kind of ORM library, map the models our own and handle each raw in a representative object, or simple functions to handle the get, set and creation for each model(raw data). Our use cases are manly for encapsulating the handling of "raw" data structure, avoiding code duplications, preventing schema structure mistakes and enforcing validations. We manly wonder about the impact on performance, future flexibility and lack of ORM lib/framworks popularity.
It will be helpful to get best practices (and references) in this subject, as we don't really know what's the impact using ORM layer over cassandra.
Upvotes: 6
Views: 7114
Reputation: 4012
Depending on how soon you need this, I'd like to point you to this ticket on the DataStax Node.js driver JIRA https://datastax-oss.atlassian.net/browse/NODEJS-144
Shortly said, we are planning to add support for a mapper directly in the driver and in the future determine how to best integrate with other Node.js mappers.
Upvotes: 2
Reputation: 447
Cassandra-co is an actively maintained modern ORM for Cassandra and node.js used at scale in production.
Disclaimer: I'm the author
Upvotes: 1
Reputation: 1693
You may want to have a look at express-cassandra, a NodeJS ORM that supports many popular Node frameworks.
It automatically loads your models, creates the appropriate tables in cassandra if needed and binds several convenient CRUD operations for your models. It supports latest cassandra 3 features too.
Disclaimer: I'm the author of this node module.
Upvotes: 2