Project

riakrest

0.0
No commit activity in last 3 years
No release in over 3 years
RiakRest provides structured, RESTful interaction with the HTTP/JSON interface of a Riak[http://riak.basho.com] document data store. RiakRest provides two levels of interaction: Core Client and Resource. Core Client works at the Jiak level and exposes Jiak internals. JiakResource is an abstraction built on top of the Core Client that gives a true RESTful feel.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.4.0
>= 1.1.9
>= 1.0.0
>= 1.2.9

Runtime

>= 1.1.9
>= 1.0.0
 Project Readme

RiakREST¶ ↑

More information available at RiakREST.

Description:¶ ↑

RiakREST is a Ruby library providing structured, RESTful interaction with Riak, an open-source document datastore.

Riak:¶ ↑

Riak is an open-source project developed and maintained by the fine folks at Basho Technologies. Riak combines a decentralized key-value store, a flexible map/reduce engine, and a friendly HTTP/JSON query interface to provide a database ideally suited for Web applications.

RiakREST¶ ↑

RiakREST provides Ruby interaction with Jiak, the HTTP/JSON interface to a Riak cluster, through two different levels of Jiak interaction: Core Client and Resource. Core Client works at the Jiak level and mirrors Jiak internals, whereas, Resource is an abstraction built on top of the Core Client that gives a simplier, RESTful feel.

Requirements:¶ ↑

RestClient (Ruby gem rest-client) is used for RESTful server interaction.

JSON is used for data exchange.

Riak provides the runs the server cluser and provides the Jiak HTTP/JSON interface. store.

Install:¶ ↑

sudo gem install riakrest

Example¶ ↑

require 'riakrest'
include RiakRest

class People
  include JiakResource
  server 'http://localhost:8002/jiak'
  attr_accessor :name, :age
end

# Created and store a resource.
remy = Person.new(:name => 'Remy',:age => 10)
remy.post

# Change and store
remy.age = 11
remy.put

# Create another resource
callie = Person.new(:name => 'Callie', :age => 13)
callie.post

# Add a link from remy to callie tagged as 'sister'
remy.link(callie,'sister')
remy.put

# Retrieve sister via link
sisters = remy.query([Person,'sister'])
puts sisters[0].eql?(callie)                     # => true

remy.delete
callie.delete

License:¶ ↑

Copyright © 2009 Paul Rogers, DingoSky. See LICENSE for details.

Go forth and Riak!¶ ↑