Skip to content
A Ruby client library for FlockDB
Latest commit 5120d6c Jul 1, 2011 @joshbuddy joshbuddy fix constant lookup
Failed to load latest commit information.
lib fix constant lookup Jul 1, 2011
spec merge nk's stuf Jun 15, 2011
.gitignore extracted version Apr 13, 2010
Gemfile merge nk's stuf Jun 15, 2011
Gemfile.lock fix constant lookup Jul 1, 2011
LICENSE README and LICENSE Apr 19, 2010 add Tina as a contributor May 11, 2010
Rakefile merge nk's stuf Jun 15, 2011
flockdb.gemspec merge nk's stuf Jun 15, 2011

FlockDB ruby client

FlockDB is a distributed graph database capable of storing millions of nodes, billions of edges, and handling tens of thousands of operations per second. Interact with it in ruby with this client.


gem install flockdb

FlockDB depends on thrift and thrift_client, which will install as part of the gem's dependencies. Note that thrift has a native C extension which it will need to compile.


Instantiate a client:

flockdb = 'localhost:7915, :graphs => { :follows => 1, :blocks => 2 } is a convenience shortcut for expects a list (or a single) servers as the first argument, and an options hash. takes the same options as ThriftClient for configuring the raw thrift client, as well as :graphs for mapping ruby symbols to the corresponding graph ids. See thrift_client's documentation for information on the other options it takes.

Edge manipulation:

flockdb.add(1, :follows, 2)
flockdb.remove(1, :blocks, 2)

Perform a query:, :follows, nil).to_a

The client supports a rich query api to build up complex set operations:, :follows, 1).difference(, :follows, nil).intersect(2, :follows, nil)).to_a


Nick Kallen Matt Freels Rael Dornfest Tina Huang


Copyright (C) 2010 Twitter, Inc.

This work is licensed under the Apache License, Version 2.0. See LICENSE for details.

Something went wrong with that request. Please try again.