Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 65633 invoked from network); 9 Dec 2008 18:30:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Dec 2008 18:30:04 -0000 Received: (qmail 47818 invoked by uid 500); 9 Dec 2008 18:30:13 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 47759 invoked by uid 500); 9 Dec 2008 18:30:13 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 47750 invoked by uid 99); 9 Dec 2008 18:30:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 10:30:13 -0800 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.59.134.9] (HELO idcmail-mo2no.shaw.ca) (64.59.134.9) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 18:29:58 +0000 Received: from pd6ml1no-ssvc.prod.shaw.ca ([10.0.153.160]) by pd6mo1no-svcs.prod.shaw.ca with ESMTP; 09 Dec 2008 11:29:37 -0700 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=0 a=mV9VRH-2AAAA:8 a=EEVepwE7oXogNo7gVZsA:9 a=BRZdA_Y4TMoMOeB2LuAA:7 a=AKKgIW1bxN6g81UauT4DSAFDJ-0A:4 a=rMrCPMKZW9YA:10 a=k74LRfvg_ngA:10 Received: from s010600119555dbca.gv.shawcable.net (HELO [192.168.0.103]) ([24.69.70.142]) by pd6ml1no-dmz.prod.shaw.ca with ESMTP; 09 Dec 2008 11:29:37 -0700 Message-ID: <493EB95B.3040105@pearsoncmg.com> Date: Tue, 09 Dec 2008 10:30:51 -0800 From: Chris Darroch Organization: Pearson CMG/CTG User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18) Gecko/20081114 SeaMonkey/1.1.13 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r724745 - in /httpd/httpd/trunk: include/ap_socache.h modules/ssl/ssl_scache.c References: <20081209151908.BDA102388879@eris.apache.org> In-Reply-To: <20081209151908.BDA102388879@eris.apache.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Joe Orton wrote: > * include/ap_socache.h: Use C++ safety wrappers, and rename ->delete > to ->remove since the former is a C++ reserved word. Thanks again for the socache refactoring! I've been trying to keep these two modules up-to-date with both the socache stuff and Apache ZooKeeper (http://hadoop.apache.org/zookeeper/) releases: http://people.apache.org/~chrisd/projects/shared_map/ These were conceived as a way to set up a simple test harness for all the socache providers, and also to write one for something interesting outside of the standard SSL cache providers. With a config like this: LoadModule shmap_module modules/mod_shmap.so LoadModule socache_zookeeper_module modules/mod_socache_zookeeper.so SharedMapProvider zookeeper localhost:7000 SetHandler shmap-handler and ZooKeeper listening on localhost:7000 one can get and put stuff into ZK with simple GET/PUT/DELETE commands. Other providers can be swapped in or mapped to various sub-directories: SharedMapProvider shmcb /home/chrisd/work/install/dlm1/var/httpd/shm A couple of things came up while I was writing these modules which I think it would be great to tackle before the socache API is locked for 2.4: - have all providers consistently return APR_NOTFOUND from retrieve() when an item is not found - pass a pool argument for temporary allocations to store() and remove() - return an apr_status_t instead of void from remove() and maybe also destroy() And -- I know, I know, I'm a glutton for punishment when it comes to naming issues -- I still feel that "socache" as a name for this API does it an injustice, since it can be used for a lot more than just a small-object cache. The ZK module, at a minimum, I think shows how you could use it for something that's not a cache at all, and not necessarily for small objects either. Something more generic to the idea of a common, shared key/value storage API seems like a good idea to me. But if no one sees this as a concern, I'll shut up forever about it. I promise. :-) Chris. -- GPG Key ID: 366A375B GPG Key Fingerprint: 485E 5041 17E1 E2BB C263 E4DE C8E3 FA36 366A 375B