Hi - I am trying to leveraging CRDT sets to store chat messages that my
distributed Riak infrastructure would store. Given the intrinsic
conflict-resolution, I thought this might be more beneficial than me
putting together a merge implementation based on the causal context.

However, my data model requires each chat message to be associated to
something like a post, hence I was thinking of having the post reference as
the bucket, and chat references as keys in that bucket. With of course the
bucket-type datasource equated to 'set'. Unfortunately though, from the
documentation, I'm not able to ascertain how to associate a created set
with an existing bucket and a new key reference if I use the Erlang client.
This seems possible for other languages but not for Erlang, with the Basho
doc mentioning  "%% Sets in the Erlang client are opaque data structures
that collect operations as you mutate them. We will associate the data
 structure
with a bucket type, bucket, and key later on.".

Subsequent code only seems to fetch the set from the bucket / key but where
exactly is the allocation happening?

{ok, SetX} = riakc_pb_socket:fetch_type(Pid, {<<"sets">>,<<"travel">>}, <<
"cities">>).

Perhaps I'm missing something, or is there a code snippet that I can
leverage?

Thanks!
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to