Cassandra datastore client in Go language
Is it possible to write client for Cassand开发者_Go百科ra datastore in Go language?
I was browsing today for the same thing and didn't find any client.
However I found a repo on GitHub, it appears somebody is working on Thrift generators for Go: http://github.com/anatol/thrift
gocql is actively maintained native CQL client library for Cassandra in Go. The original tux21b project was turned into a GitHub organization so that the project could be supported by a core group of maintainers.
If you would prefer something less low level than gocql, you could consider cqlc, which builds on top of gocql. cqlc generates Go code from your Cassandra schema so that you can write type safe CQL statements in Go with a natural query syntax. It still gives you full access to the underlying gocql API if you need it.
The best Cassandra client is currently github.com/tux21b/gocql, however that's likely to change in the next few months.
I think the answer to this has changed since the question was first asked. I believe the current frontrunner in the "Golang Cassandra client" race is Gossie:
https://github.com/carloscm/gossie
There is also another project, cass, but its author recommends Gossie
https://github.com/araddon/cass
The most common way to access Cassandra is via the Thrift interface. Thrift has generators for C++, C#, Erlang, Haskell, Java, Objective C/Cocoa, OCaml, Perl, PHP, Python, Ruby, and Squeak. So unfortunately no GO support out of the box. Take a look at http://github.com/anatol/thrift. Dont know anything about the quality
There is currently no library for Cassandra written in Go. Feel free to start one :)
精彩评论