Created
June 28, 2010 13:32
-
-
Save PharkMillups/455836 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BrianTheCoder # drev1: got a schema design question, got a second? | |
| drev1 # sure | |
| BrianTheCoder # ok, so lets say I have a days bucket and a months bucket | |
| and an events bucket so /months/12/events,_,_ would get all the events | |
| for that month and /days/7/events,_,_ would get all the events for that day | |
| would there be an advantage to tagging the months link with the day? | |
| drev1 # you might also consider: months/12/days,_,_/events | |
| BrianTheCoder # so I could get all the events for a day via: | |
| /months/12/days,7,_/events er I mean /months/12/events,7,_ would get all the events for dec 7th | |
| drev1 # so you would tag the event by day? | |
| BrianTheCoder # yeah | |
| drev1 # that works | |
| BrianTheCoder # would that be better than /months/12/days,7,_/events? | |
| drev1 # you'd have to add a link to the month object every time an event is added | |
| depending on how many events a month you might overload the month object | |
| BrianTheCoder # I just trying to figure out the best link structure | |
| I mean if I link the day to the month and tag it with that day | |
| then something link /months/12/days,7,_/events is possible | |
| what is the cost of an extra level of links? | |
| drev1 # it's an extra phase in the map reduce chain | |
| but the extra phase just collects the links on the object and walks to them | |
| so it is very minimal | |
| BrianTheCoder # ok so if I link events to days and months, and then link days | |
| to months and tag that link, that'd make sense right? | |
| so I could do /months/12/events | |
| er /months/12/events,_,_ | |
| drev1 # you could skip that and just do: /months/12/days,_,_/events | |
| are you going to add the year to the month object? | |
| BrianTheCoder # but wouldn't short circuit that linkage be faster? | |
| drev1 # 122010 | |
| BrianTheCoder # yeah well maybe do a year bucket | |
| so I could do /years/2010/months,5,_/days,1,_/events | |
| er /years/2010/months,5,_/days,1,_/events,_,_ | |
| always forget the last bit | |
| drev1 # I think that is a sensible structure | |
| BrianTheCoder # coolio :D | |
| starting to get the hang of this :D | |
| drev1 # the individual month and day objects need to have the context of the year | |
| so, month/122010 so that object is distinguishable from month/122011 | |
| does that make sense? | |
| BrianTheCoder # yeah | |
| drev1 # you could predefine your year objects as well | |
| BrianTheCoder # what do you mean? | |
| just seed the store? | |
| drev1 # you could define a "year/2010" with links to "month/012010", "month/022010", etc. | |
| yes, seed the store | |
| BrianTheCoder # yeah, working on a little library wrapper around | |
| riak client to make all this time stuff easy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment