Rafał Sobota
Rafał Sobota

Reputation: 1468

Cassandra datastore client in Go language

Is it possible to write client for Cassandra datastore in Go language?

Upvotes: 7

Views: 5561

Answers (6)

0x6e6562
0x6e6562

Reputation: 316

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.

Upvotes: 4

Matt Joiner
Matt Joiner

Reputation: 118610

The best Cassandra client is currently github.com/tux21b/gocql, however that's likely to change in the next few months.

Upvotes: 3

laslowh
laslowh

Reputation: 8624

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

Upvotes: 3

Schildmeijer
Schildmeijer

Reputation: 20946

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

Upvotes: 0

Mihai A
Mihai A

Reputation: 1473

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

Upvotes: 8

marketer
marketer

Reputation: 43707

There is currently no library for Cassandra written in Go. Feel free to start one :)

Upvotes: -1

Related Questions