Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/agadelshin/riak_sd

riak_core sample k/v
https://github.com/agadelshin/riak_sd

Last synced: 28 days ago
JSON representation

riak_core sample k/v

Awesome Lists containing this project

README

        

riak_sd: A Riak Core Application
======================================

Description
-----------

Example of Key/Value distributed storage based on riak_core and dets tables

Application Structure
---------------------

This is a blank riak core application. To get started, you'll want to edit the
following files:

* `src/riak_riak_sd_vnode.erl`
* Implementation of the riak_core_vnode behaviour
* `src/riak_sd.erl`
* Public API for interacting with your vnode
# riak_sd

Building
--------
Make sure you have Erlang 17+ installed and operational. You also will need a working C++ compiler and GNU make. Clone the repo.

$ cd riak_sd
$ make devrel

Building a cluster
------------------

$ for d in dev/*; do $d/bin/riak_sd start; done
$ dev/dev2/bin/riak_sd-admin cluster join [email protected]
$ dev/dev3/bin/riak_sd-admin cluster join [email protected]
$ dev/dev4/bin/riak_sd-admin cluster join [email protected]
$ dev/dev1/bin/riak_sd-admin cluster plan
$ dev/dev1/bin/riak_sd-admin cluster commit
$ dev/dev1/bin/riak_sd-admin member-status

Running
-------

$ dev/dev1/bin/riak_sd attach
[email protected]:1> riak_sd:store(<<"foo">>, <<"bar">>).
[email protected]:1> riak_sd:fetch(<<"foo">>).
[email protected]:1> riak_sd:remove(<<"foo">>).