newbie data modeling questions

Davis Ford davisford at
Tue May 1 10:11:39 EDT 2012

Thanks for the response Daniil.  If I understand correctly, you are
recommending putting all objects in the same bucket, and prefix the object
keys with device identifier + timestamp -- this enables querying across
devices for a timestamp range.

For example:

=> find all objects for device foo between timestamp bar and baz

By putting everything in the same bucket and naming it as you suggest, it
also supports:

=> find all objects for *any* device between timestamp bar and baz

...whereas with separate buckets (one per device), the same kind of query
would require multiple per each bucket.

I think this makes perfect sense.  Just wondering if there is any side
effect of grouping all the data in the same bucket -- does it present any
kind of challenge for operational efficiency (e.g. backup / restore) -- or
does it make it easier?


On Tue, May 1, 2012 at 4:04 AM, Daniil Churikov <ddosia at> wrote:

> Currently we build similar system for storing different timeserialized data
> and do almost all as you discribe. But there is could be some logical
> problems with dynamicly created buckets. Maybe will be better to take first
> part of key as mac address, and the second part is timestamp, like
> {<<"devices_bucket">>, <<"001122AABBCC-0001-timestampgoeshere">>}. Then you
> could make queries like "give me all events with all devices from time1 to
> time2(in case if mac+id will be fixed size)", or "give me all events for
> device with mac = 001122AABBCC-0001 from time1 to time2". Also we use new
> riak pipes as a mr on steroids, pretty awesome.
> --
> View this message in context:
> Sent from the Riak Users mailing list archive at
> _______________________________________________
> riak-users mailing list
> riak-users at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the riak-users mailing list