Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 10989 invoked from network); 13 Jul 2006 15:55:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jul 2006 15:55:40 -0000 Received: (qmail 24652 invoked by uid 500); 13 Jul 2006 15:55:36 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 24599 invoked by uid 500); 13 Jul 2006 15:55:35 -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 24588 invoked by uid 99); 13 Jul 2006 15:55:35 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 08:55:35 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jfclere@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jul 2006 08:55:33 -0700 Received: by nf-out-0910.google.com with SMTP id c2so132095nfe for ; Thu, 13 Jul 2006 08:55:12 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=lQJBlNezWkjNCxC8LyYghv3kcxfRGPZPLws0sgimde+lilJkjfGI93GCi1nj7RmRjhwzRalctVwl0ctPFZ/inKd+VRE1UeGcHt2lbbHYumofoHueGtG298XOdFE2GLG5LJOpuSCogsaQxIgRi4GjZF9XKKkqZVBUcpYTHayApfA= Received: by 10.49.21.8 with SMTP id y8mr1055887nfi; Thu, 13 Jul 2006 08:55:12 -0700 (PDT) Received: from ?192.168.4.43? ( [217.8.202.234]) by mx.gmail.com with ESMTP id x24sm1247134nfb.2006.07.13.08.55.12; Thu, 13 Jul 2006 08:55:12 -0700 (PDT) Message-ID: <44B66CD5.5050508@gmail.com> Date: Thu, 13 Jul 2006 17:55:01 +0200 From: Jean-frederic Clere User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060417 X-Accept-Language: en, fr MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: Additing a storage for the shared information of the worker in mod_proxy References: <44B576AF.6080303@gmail.com> <44B579AA.1080205@turner.com> <5D8F9212-834B-4E18-AC7E-9A4008C634BD@jaguNET.com> <44B65285.8070901@turner.com> In-Reply-To: <44B65285.8070901@turner.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Brian Akins wrote: > Jim Jagielski wrote: > >> If this is data that needs to be accessed from "non-proxy" modules >> then yes, I agree. > > > A basic API could look like. By worker, I am thinking about the mpm > sense, not the proxy sense. I guess "slot" may be a better term: > > /*used for ap_scoreboard_do. mem is the memory associated with a > worker, data is what is passed to ap_scoreboard_do. pool is pool used > to create scoreboard*/ > typedef apr_status_t ap_scoreboard_callback_fn_t(void* mem, void > *data, apr_pool_t *pool); > > /*call the callback on all worker slots*/ > AP_DECLARE(apr_status_t)ap_scoreboard_do(ap_scoreboard_t *s, > ap_scoreboard_callback_fn_t *func, void *data, apr_pool_t *pool); > > /*create a new scoreboard with each item size is item_size. name is a > key used for debuggin and in mod_status output. This would create > shared memory, basically*/ > AP_DECLARE(apr_status_t) ap_scoreboard_create(ap_scoreboard_t **new, > const char *name, apr_size_t item_size, apr_pool_t *pool); > > /*get the memory associated with this worker slot. use c->id or c->sbh > to get offset into shared memory*/ > AP_DECLARE(apr_status_t) ap_scoreboard_mem(ap_scoreboard_t *s, > conn_rec *c, void**mem); > > > Thoughts. Somthing very similar to this is used by several very busy > web sites... > With such an interface you assume only one process will access to one slot... That is what the scoreboard allows. Allowing updates from different proccesses on the same slot. Should we have an ap_slot_read_look() and an ap_slot_unlock() for that? Cheers Jean-Frederic