tag proposal
Brian Aker
brian at tangent.org
Thu Oct 4 15:24:34 UTC 2007
Hi Dustin!
On Oct 3, 2007, at 4:17 PM, Dustin Sallings wrote:
> Tags seem to be getting hot and lots of people have talked about
> it fairly abstractly. I wanted to try to bring some of those
> together with respect to a memcached implementation and sit back
> and watch it all happen. :)
>
> Firstly, I think there are two new commands to implement tags:
>
> 1) add_tag (key, tag_name)
> 2) invalidate_tag (tag_name)
>
> I don't think there's a need for tag inspection for a given
> object. There is *definitely* no command to search by tag.
It would be nice to do three additional things with tags:
1) Get a list of all active keys associated with a tag (even if it is
lossy). Two optimizations would be:
* Give me the count of objects within this tag
* For a read, take a snapshot version of the list to have read
consistency (aka take an MVCC approach)
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.
3) Clear an object from a tag.
4) Option to invalidate a tag, and blow away all keys associated with
it (think of it as a mini-operation to save on round trips)
> [It's unclear whether it's worth the effort to ever release a tag
> once it's been added. If we assume that tags live forever, we
> don't have to refcount them and a few things get easier. Any
> opinions?]
If you invalidate a tag, the tag should go away.
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/20071004/f84adfcc/attachment-0001.htm
More information about the memcached
mailing list