Browse files

update readme

  • Loading branch information...
1 parent f4b1e0e commit b0c8d5bf4361f6c32eb88c57d0b5c73cdf0bb882 @ryanking ryanking committed Jan 20, 2010
Showing with 25 additions and 19 deletions.
  1. +25 −19 README.mkd
@@ -1,48 +1,46 @@
+# cassandra
A Ruby client for the Cassandra distributed database.
-== License
+## License
Copyright 2009 Twitter, Inc. See included LICENSE file. Portions copyright 2004-2009 David Heinemeier Hansson, and used with permission.
-The public certificate for this gem is here[].
-== Features
+## Features
* clean encapsulation of the Thrift API
* compatible UUID and Long classes, for GUID generation
* Ruby 1.9 compatibility
The Github source repository is {here}[]. Patches and contributions are very welcome.
-== Installation
+## Installation
You need Ruby 1.8 or 1.9. If you have those, just run:
sudo gem install cassandra
Cassandra itself is a rapidly moving target. In order to get a working server, use the <tt>bin/cassandra_helper</tt> script:
cassandra_helper cassandra
A server will be installed in <tt>$HOME/cassandra/server</tt>, and started in debug mode.
WARNING: Don't use the test folder for your data, as it will get overwritten when you update the gem.
-== Usage
+## Usage
Now, start IRb and require the library:
require 'cassandra'
Connect to a server and keyspace:
client ='Twitter', '')
Insert into a column family. You can insert a Cassandra::OrderedHash, or a regular Hash, if order doesn't matter:
- client.insert(:Users, "5", {'screen_name' => "buttonscat"})
+ client.insert(:Users, "5", {'screen_name' => "buttonscat"})
Insert into a super column family:
@@ -51,16 +49,24 @@ Insert into a super column family:
Query a super column:
timeline = client.get(:UserRelationships, "5", "user_timeline")
The returned result will always be a Cassandra::OrderedHash.
See Cassandra for more methods.
-== Further reading
+## Configuration
+By default, cassandra is setup to listen on localhost. If you want to move your clients to another host, you're going to need to change which interface it binds to in the storage-conf.xml. You should also change the seed address.
+## Node Auto-Discovery
+The list of hosts you pass to the client is only used to auto-discover all the nodes in your cluster. You don't need to give the client a list of all of your nodes.
+## Further reading
* {Up and Running With Cassandra}[]
-== Reporting problems
+## Reporting problems
-The Github issue tracker is {here}[]. If you have problems with Cassandra itself, please use the {cassandra-user mailing list}[].
+The Github issue tracker is {here}[]. If you have problems with this library or Cassandra itself, please use the {cassandra-user mailing list}[].

0 comments on commit b0c8d5b

Please sign in to comment.