Hackathon notes (non-binary protocol thread), (BUSTARRET, Jean-francois)

Jan Miczaika jan at hitflip.de
Wed Jul 18 07:50:17 UTC 2007


Regex deletes on the keys may be used to delete interconnected groups of 
keys, but I think it is not very efficient. Lets assume we have two sets 
of data for a DVD: details and actors. The title of a DVD changes, I 
want to update all relevant data and not have stale titles on the 
plattform. To delete all connections with one DVD I would have to:
- delete the key for details (probably dvd_1234_details) - easy
- delete the keys for all related actors - this is harder. encode all 
dvd_ids in the actor keys? Iterate the actors and run a regex for each one?
Point 2 multiplies for each loosely related keys. The direct ones are 
easy to hit, the others not so.

Additionally, some people (including us) programmatically generate the 
name of the key. We use the service name, request parameters, sort etc. 
to build a long string and then md5 that for a key name. We have no way 
of knowing what the key names are, other than rebuilding each 
combination of parameters. Then we don't need a regex either.

Sorry for my vage explanations, I studied business ;-)


>
> ------------------------------
>
> Message: 3
> Date: Tue, 17 Jul 2007 20:21:15 +0200
> From: "BUSTARRET, Jean-francois" <jfbustarret at wat.tv>
> Subject: RE: Hackathon notes (non-binary protocol thread)
> To: <memcached at lists.danga.com>
> Message-ID:
> 	<53C652A09719C54DA24741D0157CB2695FF4A9 at TFPRDEXS1.tf1.groupetf1.fr>
> Content-Type: text/plain;	charset="iso-8859-1"
>
>
> I'm not a very experienced C coder, but I'll try to share some ideas... Please be tolerant
>
> - add "char* tags" to the _stritem struct
> - store tags in a comma/whatever-delimited string : ",tag1,tag2,tag3," (space and comma being reserved), the client being eventually responsible for formatting the tag string
> - modify the protocol to add an optional tag parameter <command name> <key> <flags> <exptime> <bytes>[ <tags>]\r\n
> - add a new deletetag command ?
> - delete items using the same rule approach as described by Dustin, strpos-ing(",tag,") instead of regexp-ing the key
> Multi-tag deletes can be split in multiple rules
>
> IMHO, limiting the max number of tags and the max size of a tag would not be a problem.
>
> JFB
>
>
> -----Message d'origine-----
> De : Paul Querna [mailto:chip at corelands.com] 
> Envoyé : mardi 17 juillet 2007 19:01
> À : Tobias Lütke
> Cc : BUSTARRET, Jean-francois; memcached at lists.danga.com
> Objet : Re: Hackathon notes (non-binary protocol thread)
>
> Tobias Lütke wrote:
>   
>> Agreed,
>>
>> I think the tagging solves the same problem as the wildcard deletes in 
>> a more elegant way. The concept is so simple that you can explain it 
>> in a single sentence which is a indicator of a good feature.
>>
>> On 7/16/07, BUSTARRET, Jean-francois <jfbustarret at wat.tv> wrote:
>>     
>>> What about tagging (as discussed last week on the mailing-list) ?
>>> IMHO, it would be more useful than wildcard deletes/namespaces/...
>>>
>>>       
>
> Well, what it came down to is that we had very simple ideas for how wildcard deletes could be implemented, but no one seemed to have any suggestions how to best do tagging.  Have any ideas for the list?
>
> Thanks,
>
> -Paul
>   

-- 
Geschäftsführer / Managing Director
Hitflip Media Trading GmbH
Gürzenichstr. 7, 50667 Köln
www.hitflip.de - new: www.hitflip.co.uk

Tel. +49-(0)221-272407-27
Fax. 0221-272407-22 (that's so 1990s)
HRB 59046, Amtsgericht Köln

Geschäftsführer: Andre Alpar, Jan Miczaika, Gerald Schönbucher



More information about the memcached mailing list