GithubHelp home page GithubHelp logo

lethalbrains / flockdb-client Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twitter-archive/flockdb-client

0.0 2.0 0.0 191 KB

A Ruby client library for FlockDB

License: Other

Ruby 100.00%

flockdb-client's Introduction

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.

INSTALLATION

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.

USAGE

Instantiate a client:

flockdb = Flock.new 'localhost:7915, :graphs => { :follows => 1, :blocks => 2 }

Flock.new is a convenience shortcut for Flock::Client.new. Flock.new expects a list (or a single) servers as the first argument, and an options hash. Flock::Client.new 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:

flockdb.select(1, :follows, nil).to_a

The client supports a rich query api to build up complex set operations:

flockdb.select(nil, :follows, 1).difference(flockdb.select(1, :follows, nil).intersect(2, :follows, nil)).to_a

CONTRIBUTORS

Nick Kallen Matt Freels Rael Dornfest Tina Huang

LICENSE

Copyright (C) 2010 Twitter, Inc.

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

flockdb-client's People

Contributors

fizx avatar freels avatar joshbuddy avatar lethalbrains avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.