Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8D7EA9065 for ; Tue, 22 Nov 2011 19:14:29 +0000 (UTC) Received: (qmail 75048 invoked by uid 500); 22 Nov 2011 19:14:29 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 75017 invoked by uid 500); 22 Nov 2011 19:14:29 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 75009 invoked by uid 99); 22 Nov 2011 19:14:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 19:14:29 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of oguzhantopgul@gmail.com designates 209.85.210.173 as permitted sender) Received: from [209.85.210.173] (HELO mail-iy0-f173.google.com) (209.85.210.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Nov 2011 19:14:22 +0000 Received: by iakk32 with SMTP id k32so778596iak.18 for ; Tue, 22 Nov 2011 11:14:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Jc/N4KYmqbH3nbvK9H9RIHLvIxcaqZIozSB6yLbMyRE=; b=Y6Eo8sDJ2QveHDpfuR9UnCverhaBZjgvbkHDf2LimSkahRxlgjMBruSwpd6RGGJ9MN 0zXdX3DtbQySjffLh2E3k0amw/N8mnqPzcqDo9DQ/HSkTLhTLEzNCpUmUzjlFY1C0Wrp yz0PiEGnETomYsZGOQlHUWv26Ia36k6Pr+fA8= MIME-Version: 1.0 Received: by 10.231.63.209 with SMTP id c17mr5755135ibi.65.1321989241499; Tue, 22 Nov 2011 11:14:01 -0800 (PST) Received: by 10.231.207.16 with HTTP; Tue, 22 Nov 2011 11:14:01 -0800 (PST) In-Reply-To: <20111122151557.279b83f7@baldur> References: <9563170F-F748-4D4E-BD57-05B874C42EB7@apache.org> <000d01cca924$c39c50e0$4ad4f2a0$@com> <20111122151557.279b83f7@baldur> Date: Tue, 22 Nov 2011 21:14:01 +0200 Message-ID: Subject: Re: basic example shared memory code From: =?UTF-8?B?T8SfdXpoYW4gVE9QR8OcTA==?= To: modules-dev@httpd.apache.org Content-Type: multipart/alternative; boundary=000e0cd5712c22f47204b2579b25 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd5712c22f47204b2579b25 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thank you guys so much. What i want to do with shared memory is to hold the requester IPs and a counter that holds how many times an IP made request. I'm planning to hold them in a binary tree. I thought holding these IPs and counters in a file is slower than holding them in a shared memory because of the file I/O loss. And using binary tree as a data structure is going to make my search process faster and easier. Do you have any suggestions about shared memory-file usage or data structure usage. Regards O=C4=9Fuzhan TOPG=C3=9CL On Tue, Nov 22, 2011 at 5:15 PM, Nick Kew wrote: > On Tue, 22 Nov 2011 09:41:02 -0500 > "Pranesh Vadhirajan" wrote: > > > Nick, can you suggest some of these higher-level abstractions, please? > I have been trying to make a module of mine work with a POSIX shared > memory implementation, but I'm going nowhere with that. Are you referrin= g > to the apache shared memory implementation (apr_shm_...) or something els= e? > Either way, if you could suggest what I should look into, it would be > greatly appreciated. > > apr_shm is the old way of doing it. > > Today I'd recommend looking at mod_slotmem, and the socache modules. > I used the latter for mod_authn_socache, which is a simple example. > > -- > Nick Kew > --000e0cd5712c22f47204b2579b25--