Search the web
Sign In
New User? Sign Up
apache-asp · Apache::ASP
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
using memcached as a StateDB   Message List  
Reply | Forward Message #2254 of 2277 |
RE: using memcached as a StateDB.. getting there

I, for one, am interested, though I haven't been able to do much or get
involved.

"Namespace" - I suggest making this an option that is user tunable, but pick
a good default value that hopefully won't need to be tweaked all the time.

"Lock/Unlock" - Each individual operation of memcached is atomic.. if two
processes attempt to write to one location at the same time, they will be
serialized and one will not corrupt the other. The problem is you don't
necessarily know which one will actually win. This means you can't guarantee
state if you don't do locking to ensure the right one wins. Consider an
incrementing counter. Assuming you do a get to read the value, increment it
by one, and then do a set to save it; each individual operation is safe
(get, set), but not the combination (get+set). If two hit at the same time,
the number would increment by 1 and not by 2 (one for each). I'd worry that
making lock and unlock a no-op would create new problems, especially as site
volume increases and chances of simultaneous updates increase.

"No list of keys" - Usually I know what keys I'm stuffing into memcacheb and
I don't need to walk through the keys, or if I do I have a place outside of
memcache that has the keys to lookup. This one could get tricky. How would
you keep the list of keys in a second entry intact, especially if two
processes wanted to add a key at the same time?

Other thoughts/suggestions:

Having not looked at your code or design this may not be applicable, but
consider making this generic, something that memcache or another cache
engine could be plugged into. If you're interested, and my time permits, I'd
be interested in working on part of this with you.

Greg

> -----Original Message-----
> From: Thanos Chatziathanassiou [mailto:tchatzi@...]
> Sent: Thursday, March 26, 2009 5:33 AM
> Cc: 'asp@...'
> Subject: Re: using memcached as a StateDB.. getting there
>
> (ignoring the fact that no-one seems interested)
>
> I came accross Cache::Memcached::Tie which pretty much does most of the
> work, however I'm having some issues - actually design decisions:
> - I suppose StateDir should equal ``namespace'' in memcached parlance.
> Do we want to make this transparent to the end user or add a
> configuration option ?
> - memcached has no concept of Lock(), UnLock() and some stuff I haven't
> figured out yet. Add no-ops for these to Cache::Memcached::Tie or is
> there some more elegant way to bypass them inside Apache::ASP ?
> - It seems there's no obvious way to enumerate keys in memcached
> (FIRSTKEY NEXTKEY). Perhaps keep a separate index of keys inside
> memcached and add methods that use those (?)
> - memcached needs a few extra configuration options. Most important is
> obviously ``servers'', but also ``compress_threshold'' and ``debug''
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: asp-unsubscribe@...
> For additional commands, e-mail: asp-help@...
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 8.0.238 / Virus Database: 270.11.26/2020 - Release Date:
> 03/25/09 07:16:00


---------------------------------------------------------------------
To unsubscribe, e-mail: asp-unsubscribe@...
For additional commands, e-mail: asp-help@...




Fri Mar 27, 2009 4:52 pm

greg@...
Send Email Send Email

Forward
Message #2254 of 2277 |
Expand Messages Author Sort by Date

I'm toying with idea presently, but it would make for a great step up from MLDBM and company. And although Apache::ASP::State makes quite a few assumptions...
Thanos Chatziathanass...
tchatzi@...
Send Email
Feb 20, 2009
2:09 pm

(ignoring the fact that no-one seems interested) I came accross Cache::Memcached::Tie which pretty much does most of the work, however I'm having some issues -...
Thanos Chatziathanass...
tchatzi@...
Send Email
Mar 26, 2009
12:35 pm

I, for one, am interested, though I haven't been able to do much or get involved. "Namespace" - I suggest making this an option that is user tunable, but pick ...
Gregory S. Youngblood
greg@...
Send Email
Mar 27, 2009
4:53 pm

... It would vaguely resemble ``StateDir''. Each separate StateDir signifies a unique application. Thus far, using StateDir in shmfs/tmpfs I'd use ...
Thanos Chatziathanass...
tchatzi@...
Send Email
Mar 27, 2009
6:33 pm

I had my svn repository disk die on me recently, but still have my working copy around and got some free time to hack it. It turned into a real Apache::Session...
Thanos Chatziathanass...
tchatzi@...
Send Email
Dec 17, 2009
7:11 pm
< Prev Topic  |  Next Topic >
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help