helium/plumtree

example of usage

Opened this issue · 7 comments

Is there any documentation on how to use plumtree?

+1, would be awesome.

+1

Look at the tests? I know it's not the best answer but, hope this helps:

> plumtree:start().
...join assuming other node also has had `plumtree:start/0` executed
> plumtree_peer_service:join(OtherNode).
> plumtree_metadata:put({some, prefix}, <<"mykey">>, <<"myvalue">>).
...on other node...
> plumtree_metadata:get({some, prefix}, <<"mykey">>).

This documentation from the original Cluster Metadata (Riak's usage of
plumtree before it was extracted to this library) is available here:
https://gist.github.com/jrwest/d290c14e1c472e562548. Hopefully it can be
helpful. Should probably move it somewhere better than my gists...

On Mon, Jun 8, 2015 at 6:55 PM, Parnell Springmeyer <
notifications@github.com> wrote:

Look at the tests? I know it's not the best answer but, hope this helps:

plumtree:start().
...join assuming other node also has had plumtree:start/0 executed
plumtree_peer_service:join(OtherNode).
plumtree_metadata:put({some, prefix}, <<"mykey">>, <<"myvalue">>).
...on other node...
plumtree_metadata:get({some, prefix}, <<"mykey">>).


Reply to this email directly or view it on GitHub
#10 (comment).

@jrwest thanks that helped a lot :)

@ixmatus sure but tests are not a doc :) Also I was looking specifically at how to handle your own broadcast handler. I didn't realised at first that it was mostly working like in riak_core...

@benoitc my apologies for a slow response to this, and thanks to @jrwest for sharing his gist. I hope to put together something that lives within the repo shortly.

@tsantero no worries :) I will also document the way it's used inside primer so it will give more hints too :)