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 queries...one 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?

Regards,
Davis

On Tue, May 1, 2012 at 4:04 AM, Daniil Churikov <ddo...@gmail.com> 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:
> http://riak-users.197444.n3.nabble.com/newbie-data-modeling-questions-tp3951726p3952599.html
> Sent from the Riak Users mailing list archive at Nabble.com.
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to