Skip to content

Instantly share code, notes, and snippets.

@PharkMillups
Created July 15, 2011 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PharkMillups/1085488 to your computer and use it in GitHub Desktop.
Save PharkMillups/1085488 to your computer and use it in GitHub Desktop.
15:33 <nathanmarz> hey guys
15:33 <nathanmarz> could riak-core be used to build other kind of data models,
such as key -> set?
15:34 <nathanmarz> and have redis-like operations
15:45 <etrepum> nathanmarz: yes
15:46 <nathanmarz> cool
15:46 <nathanmarz> has anyone done anything like that?
15:47 <etrepum> nathanmarz: because you can also do it on the client side
15:48 <etrepum> nathanmarz: which works well enough most of the time
15:49 <nathanmarz> etrepum: what do you mean by do it on the client side?
15:50 <etrepum> nathanmarz: fetch things from the server, do stuff with them on the
client, and then put the updated version back to the server
15:50 <nathanmarz> yea, that's vastly more inefficient than having it native like redis
15:51 <pharkmillups> explodes: I assume you found rekon?
15:51 <etrepum> nathanmarz: for small sets it doesn't matter
15:52 <nathanmarz> etrepum: it's still a read and a write vs. just a write
15:52 <pharkmillups> nathanmarz: have you seen this ? https://github.com/jtuple/riak_zab
15:52 <nathanmarz> etrepum: and for the use cases i'm thinking of, which is sets
ranging from 1000's to millions of elements, it's obviously a huge difference
15:53 <nathanmarz> pharkmillups: yea, that's cool
15:53 <nathanmarz> pharkmillups: that's what got me thinking about using riak-core
for alternative data models
15:54 <etrepum> nathanmarz: yeah, well obviously nobody with your use case has
needed the other properties of riak_core/riak_kv enough to implement that kind of
data model for it (while at the same time, being nice enough to open source it)
15:54 <nathanmarz> pharkmillups: is there good documentation anywhere on using
riak-core do implement things like this?
15:56 <pharkmillups> nothing extensive.
15:57 <pharkmillups> nathanmarz: this might be a good place to start
https://github.com/rzezeski/try-try-try/
15:57 <pharkmillups> assuming you haven't seen it.
15:58 <etrepum> you might also want to look at the other projects that use
riak_core, such as riak_zab, riak_kv
15:58 <pharkmillups> or even if you have, I guess.
15:58 <nathanmarz> that's a great resource
15:58 <etrepum> strictly speaking you might actually want to implement this on top of
riak_kv instead of riak_core directly
15:59 <nathanmarz> etrepum: that's a good idea
16:00 <etrepum> nathanmarz: http://hal.archives-ouvertes.fr/inria-00555588/
16:00 <etrepum> nathanmarz: there's a similar concept that we use on the client
side implemented here https://github.com/mochi/statebox
16:01 <etrepum> nathanmarz: you could do better inside riak though
16:08 <nathanmarz> etrepum: thanks for the links... that paper looks useful
16:09 <etrepum> yeah, I wish I had read it before implementing statebox,
would've saved me some serious thinking time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment