当前的 Node.js Cassandra 驱动程序是什么?

What is the current Node.js driver for Cassandra?

我开始使用 Cassandra 数据库,我正试图为此找到一个像样的 node.js 驱动程序。但是一切都很混乱,让我解释一下我发现了什么。

我找到的第一个驱动程序是 helenus, and I'd search for this one because that was the one that this book 开头提到的(仍在阅读)。书不旧;第一版于 December 29, 2013 发布。所以不应该那么过时。

然后,在 helenus 存储库中我发现了这条消息:

This driver uses the old Thrift protocol if you are using Cassandra 1.2 or higher and you are using CQL, please consider using node-cassandra-cql. While I will continue to fix bugs with this driver, feature development is frozen as many new features coming out will not be supported by Thrift.

所以,逻辑上我去了 node-cassandra-cql 存储库,但出现了另一条消息:

This is not the driver you are looking for

node-cassandra-cql has graduated from community driver to being the foundation of the official Datastax Node.js Driver for Apache Cassandra.

此时我有点迷茫,一切似乎都变化得太快了。我做了更多的研究,最后得到了这三个存储库:

  1. The Datastax driverjorgebay 在他的 repo 上推荐的那个)
  2. The node Cassandra client from Rackspace
  3. Apollo Cassandra(基于 Datastax 驱动程序)

所以,在这一点上我有点迷茫,我想向node.js社区请教,在Cassandra上开发应该使用什么模块?为什么?

就我所见,上面的 none 对我来说似乎已经准备就绪,但我是 Cassandra 的新手,所以也许(并且肯定)我错了。

The book is not old; the first edition was released on December 29, 2013. So should not be that outdated.

2013 年是 Cassandra 时间的 loonggggg 时间。

使用 DataStax 驱动程序,它 full featured 与其他 DataStax 驱动程序一样,这意味着它具有自动故障转移、拓扑感知等功能

如果你想要一个 ORM,在 DataStax 驱动程序获得一个 ORM 之前,Apollo 在短期内可能是一个不错的选择。它基于 datastax 驱动程序构建,因此您可以获得主要功能和性能。

rackspace one 的 last commit 是 2014 年 8 月 26 日,这应该可以帮助您在那里做出决定...

一些历史:

正如 Jorge 提到的,他的社区驱动程序被 DataStax 吸收,转化为 datastax 驱动程序并贡献回开源。

正如您在邮件列表中看到的那样,这是一个充满活力的社区: https://groups.google.com/a/lists.datastax.com/forum/#!forum/nodejs-driver-user

在 Jira 上关注进度并报告 bugs/ideas! https://datastax-oss.atlassian.net/secure/RapidBoard.jspa?rapidView=11&projectKey=NODEJS&view=detail

Cassandra-co 是另一个受 Apollo Cassandra 启发的 ORM,积极维护并在生产中大规模使用。

免责声明:我是作者