Taste of Riak

Client Setup

From the install instructions on the lric README, you should now have the source code downloaded as well as having the dependencies for lric and lric itself compiled.

Next, start up the LFE REPL using the make target provided by the lric library (which ensures that all the dependency library paths are passed to LFE, and thus to Erlang):

$ make repl-no-deps
...
LFE Shell V6.2 (abort with ^G)
>

Now let’s create a link to the Riak node. If you are using a single local Riak node, use the following to create the link:

> (set `#(ok ,pid) (lric:start "127.0.0.1" 8087))
#(ok <0.32.0>)

If you set up a local Riak cluster using the five-minute install method, use this code snippet instead:

> (set `#(ok ,pid) (lric:start-link "127.0.0.1" 10017))
#(ok <0.32.0>)

You may have configured Riak to run on a specific IP; in that case be sure to adjust your command, e.g.:

> (set `#(ok ,pid) (lric:start "172.16.4.164" 8087))
#(ok <0.32.0>)