atomic get-then-delete command
Brad Fitzpatrick
brad at danga.com
Thu Apr 21 00:21:10 PDT 2005
Using memcached as a Linda tuplespace is kinda sick, but workable. I'd
take a patch. I think the more approriate verb is "grab" (I think that's
what I've seen before), but maybe I misremember.
Do you license your contribution under the same terms as memcached itself?
- Brad
On Wed, 20 Apr 2005, scott moody wrote:
> Hello,
>
> I'm completely new to memcached (and I'm happy to report that I've had
> no problems getting everything up-and-running). I know protocols
> aren't something one extends on a whim, but I was wondering if the
> addition of an atomic 'get-then-delete' command has ever been bandied
> about by anyone here. I would use such a command (which I refer to as
> a "consume" command) for memcached-based queues in order to implement
> non-persistent Linda/tuplespace/distributed computing patterns.
>
> My question is: Is such a command a bad idea for any reason? I ask
> because I cloned and then frankensteined the handler for the "get"
> command in memcached.c to create such a beast and it seems to be
> working okay thus far -- but I haven't programmed in C in nearly a
> dozen years and don't know the memcache code, so I'm certain that it's
> not a commercial-grade mod. However, it would seem to me that, because
> of the singled-threaded nature of memcached, it shouldn't a risky
> proposition. Am I wrong?
>
> Apologies for adding even more mail to your inbox,
>
> Scott
>
>
More information about the memcached
mailing list