Created
October 20, 2012 00:54
-
-
Save aurora/3921522 to your computer and use it in GitHub Desktop.
Erlang + Riak notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. It may be required to install Riak on OSX from source. This may be the case, when Riak is reporting | |
an error reading "app.config" when trying to start the Riak server after installation. | |
2. A successfully started Riak server can be tested by visiting the URL http://127.0.0.1:8098/ping, the | |
port may differ, it can be looked up in the "app.config" file. | |
3. To connect to Riak from Erlang it's recommended to use the Riak protobuf client which can be | |
found at: https://github.com/basho/riak-erlang-client | |
4. When installing the protobuf client the client and all libraries below the "deps/" directory of the | |
client must be added to the code-path. This can also be done by installing the client library | |
into the Erlang libs folder and afterwards symlinking the stuff below "deps/" into the Erlang libs | |
folder. If the "deps/" are missing in the code-path Erlang will show error messages -- for example | |
"unable to load module" -- when trying to open the connection to Riak. The entries of the code-path | |
can be viewed by calling ```code:get_path().``` from the Erlang shell. | |
5. The port for connecting to Riak using protobuf is configured in the "app.config" of Riak. Default | |
should be 8087. | |
Everything should work fine, if the following test passes without any error: | |
Eshell V5.9.1 (abort with ^G) | |
1> {ok, Pid} = riakc_pb_socket:start_link("127.0.0.1", 8087). | |
{ok,<0.33.0>} | |
2> riakc_pb_socket:ping(Pid). | |
pong | |
3> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment