tag proposal

Brian Aker brian at tangent.org
Sun Oct 7 22:03:07 UTC 2007


Hi!

On Oct 4, 2007, at 11:21 AM, Dustin Sallings wrote:

>> 	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.

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  :)

If I can create a list of objects, then I can make this happen. The  
other option is to have an "append set", that way I can just push in  
appended data into one node and read from it whenever I need too  
(which does not give you the option of deleting, unless you allow  
someone to acquire a write lock on an object).


>> 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.
> 	If you can prove that setandtag is *considerably* cheaper than set 
> +tag, then it could possibly be added as an extension.

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.

>> 3) Clear an object from a tag.
> 	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.''
>
> 	How would you imagine this being used?

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.

And yes, if you have multiple tags on an object, it is possible to do  
secondary indexes.

Cheers,
	-Brian

--
_______________________________________________________
Brian "Krow" Aker, brian at tangent.org
Seattle, Washington
http://krow.net/                     <-- Me
http://tangent.org/                <-- Software
http://exploitseattle.com/    <-- Fun
_______________________________________________________
You can't grep a dead tree.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/memcached/attachments/20071007/b65bbc7e/attachment.htm


More information about the memcached mailing list