Cassandra .Net driver and CQL driver (Aug 2012)

匆匆过客 提交于 2019-12-12 15:09:12

问题


Questions have been asked on SO about this, but they are over a year old, so I'm re-posting.

I'm not asking which is the "best" driver as that is subjective. I'm looking for data concerning stability, compliance to the latest Cassandra features, documentation and ease-of-use, and speed.

It seems Hector has little activity (2 years ago per Github). So it's between Cassandra-sharp, Fluentcassandra, Aquiles, and Cassandraemo.

I noticed some do and some don't mention the Thrift API. What's the significance from a .Net perspective?

Is there a CQL solution?


回答1:


FluentCassandra has great support for LINQ-to-CQL, it's type system is second to none, and it is currently being recommended by DataStax. It supports the following types, and properly encodes them using Java's big endian byte format so that they can be read from other libraries.

  • ASCII
  • Boolean
  • Bytes
  • Composite
  • Counter
  • Date
  • Decimal
  • Double
  • Dynamic Composite
  • Float
  • Int32
  • Integer (other wise known as Big Integer - anything beyond 64 bits)
  • Lexical UUID
  • Long
  • Time UUID
  • UTF8
  • UUID

Most of the .NET libraries out there only support the initial 5 that were released in the early days of Cassandra.

In my opinion, and I am the developer of FluentCassandra, mentioning the use of Thrift is like mentioning that .NET uses the Win32 API's. We have built libraries around these things, because as an interface for development they stink, and to the end-user-developer they really don't matter.




回答2:


I am using the "DataStax C# Client Driver" which supports Linq2CQL3.

You can download it using GitHub: https://github.com/datastax/csharp-driver

The driver contains the following modules:

  • Cassandra: the core layer.
  • Cassandra.Data.Linq: Linq2CQL driver
  • TestRunner: basic unit-test environment
  • Cassandra.Test: unit-tests for the core driver
  • Cassandra.Data.Linq.Test: unit-tests for Linq2CQL driver
  • Playground: simple app that presents the basic usage of Linq2CQL driver

    Reference: http://planetcassandra.org/DownLoad/ViewDownLoadType/datastax-c-client-driver-109




    回答3:


    I think Thrift API is the lowest level interface to Cassandra and pretty much any client library would have to use it.

    Cassandraemon is a LINQ provider and also supports CQL.




    回答4:


    Datastax is offering an own implementation of a Cassandra .net driver now. I have experience with it, but usually DataStax do a great job supporting Cassandra.




    回答5:


    as far as I can tell, the Datastax c# driver does not do timeuuid columns at all in linq. So you're screwed if you want to use linq to do range queries of time series rows



    来源:https://stackoverflow.com/questions/11855629/cassandra-net-driver-and-cql-driver-aug-2012

  • 易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
    该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!