On 6/19/07, Alaric Snell-Pym <[EMAIL PROTECTED]> wrote:
Hi folks, I'm just assembling an egg to act a a memcached client.
Cool, that would be nice to have.
2) Write a second egg containing a Scheme-friendly API for caches. This will involve a simple abstraction for caches, with 'null' (never remembers anything), 'in-memory' (just uses a hash table in RAM) and 'namespace' (uses a parent cache, but inserts a prefix onto keys in order to isolate from other uses of the same cache) implementations. Keys and values can now be arbitrary s-expressions (although memcached keys cannot contain spaces, so I'm going to need to work out some encoding).
Since Chicken continuations are serializable, you could also store them as values in the cache. Not sure of a use-case, but there you are.
But I'd like some feedback... I could incorporate both eggs into one, but then apps that want to use the in-memory cache would get a memcached implementation, too. Said implementation wouldn't be very big, but still, it's not good to bloat things. I'm open to the decision of the community on this one. One egg that contains the generic cache API with all the backends, and a separate API for low-level access to memcached? Or two separate eggs?
Personally, I'd only be interested in the memcached egg. If you're implementing the memcached protocol (i.e. not depending upon a libmemcache library) then having one common egg doesn't seem bad to me. If there is a library dependency, then I'd vote for separating out the library-dependent ones into a separate egg. (Note, there's a rule (unwritten?) about providing only one extension module per egg.)
Either way, I'd like a subversion repository login, please. Whether or not I have an egg called 'memcached' as well, I'll certainly make an egg which I propose to innovatively called 'cache'.
Hm, maybe something a bit less generic? "Cubby", "pigeonhole", and "haberdashery" are all available...
My favourite username is 'alaric', and my favourite colour is dark blue.
(Dark blue?! Great, another one of those.) Good luck with the egg, Alaric. Graham PS: I visited your blog; I was also the Akela of a Cub pack for many happy years. Dyb-dyb-dyb on that egg! :-) _______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/chicken-users