[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-modules
Subject:    Re: [apache-modules] Sharing data between apache processes.
From:       Jean-Luc Rochat <jnix () cybercable ! fr>
Date:       2000-02-29 17:10:43
[Download RAW message or body]

Vikas Bansal wrote:
> 
> How about creating a shared memory while initialising the module and protecting
> this shared memory by semaphore. Since the key of the semaphore and shared memory
> will be the same all the processes would know that.
> Once a shared memory is created a process would lock this memory by locking the
> semaphore and unlock it by unlocking the semaphore.
> 
> -Vikas.
> 
> Vinod Mehra wrote:
> 
> > When we run the apache server it creates multiple threads (processes) and
> > as the number of concurrent request increases it goes on creating new threads
> > and bringing them down during the period of inactivity. Now I have a module
> > in which I maintain a state. What is the best way to share the state between
> > different instances of the module (in different threads of apache)? What is
> > the
> > best way to cause min performance hit?
> >
> > Any pointers on this will be a great help.
> >

you could have a look at RSE's "mm" patch.
Or, a shared memory (mmaped file) is used in mod_jserv (jserv_mmap.c) (
http://java.apache.org ).

Jean-Luc

--
----------------------------------------------------------------
Apache Modules Mailing List            624 currently subscribed
----------------------------------------------------------------

If you wish to be removed from this list, send the word
'unsubscribe' to: apache-modules-request@covalent.net

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic