<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On Oct 7, 2007, at 15:03 , Brian Aker wrote:</div><div><br class="webkit-block-placeholder"></div><blockquote type="cite"><div><div><blockquote type="cite"><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div><span class="Apple-style-span" style="color: rgb(0, 99, 18); -webkit-text-stroke-width: -1; "><span class="Apple-tab-span" style="white-space:pre">        </span>Tags aren't intended to be an index, just a mass invalidation mechanism.  It's *possible* to use them as an index, but not in any cheap way.</span></div></span></blockquote></div></blockquote><div><br class="webkit-block-placeholder"></div>I can imagine that they will get used as such though. Give someone a wrench, and if they need to do surgery, and lack the proper tool, somehow they will use the wrench  :)</div></div></blockquote><div><br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>I agree.  That's why there were no plans to provide the set of items tagged with a given tag.  :)</div><br><blockquote type="cite"><div><div><blockquote type="cite"><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>2) Allow the "set" of an object with its tag name. This will solve the problem of creating an object and then tagging the object.</div></span></blockquote><div><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; "><span class="Apple-tab-span" style="white-space:pre">        </span>If you can prove that setandtag is *considerably* cheaper than set+tag, then it could possibly be added as an extension.</span></div></div></blockquote><div><br class="webkit-block-placeholder"></div>It would be hard to say until I saw the implementation. The cost of parsing out the extra  bit of information, vs parsing out an entirely new command. The nice thing about one command is you can get a more atomic response. AKA my client dies between set and tag.</div></div></blockquote><div><br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>In the case of the binary protocol, it's effectively pre-parsed.  In general, I don't think the cost is worth considering.<br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Atomicity may be, but it can make the protocol dirty.  This is getting back to the MVCC part of the discussion.  Does it make more sense to combine two discrete concepts into one command to effect atomicity or have a generic transactional wrapper mechanism.<br class="webkit-block-placeholder"></div><br><blockquote type="cite"><div><div><blockquote type="cite"><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div>3) Clear an object from a tag.</div></span></blockquote><div><span class="Apple-tab-span" style="white-space:pre">        </span>You mean untagging an object?  It's not clear to me how that would ever be used.  I imagine people will be setting and tagging around the same time, and would never want to go back and say, ``no, that really *isn't* dependent on this information.''<br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>How would you imagine this being used?</div></div></blockquote><div><br class="webkit-block-placeholder"></div>Having an object belong to multiple tags, but allowing me to remove it from a particular tag set. For instance on slashdot you could request all stories under a certain tag, but if users decided that the tag was no longer accurate it could be removed.</div></div></blockquote><div><br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>I'm not sure that really works.  The only reason you'd tag it is if you wanted to delete it.  Tags would typically be based on the contents of a cache value.  Revoking a tag would suggest that you made a mistake.  It is to say, ``I actually *don't* want to delete this when this tag invalidates because it really doesn't contain the thing I said it does.''</div><br><blockquote type="cite"><div><div>And yes, if you have multiple tags on an object, it is possible to do secondary indexes.</div></div></blockquote><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>It's getting more expensive, though, and just to solve a problem it wasn't intended to solve.</div><div><br class="webkit-block-placeholder"></div><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>-- </div><div>Dustin Sallings</div><br class="Apple-interchange-newline"></span> </div><br></body></html>