axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Uthaiyashankar <shan...@wso2.com>
Subject Re: [Axis2] Apache process problems [Was - Re: Urgent: Specifying scope in Axis2c]
Date Wed, 07 Nov 2007 07:49:59 GMT
Hi,

Since apache is creating child processes using fork (in linux), only 
possible option to share data between children is using an ipc method. 
For example, creating Axis2_worker, conf_context and global pool in a 
shared memory, and sharing between processes (using apr_shm, apr_rmm). 
We can use global mutex to control the access of shared memory. An 
example implementation is given in  
http://people.apache.org/~sctemme/mod_example_ipc.c.
mod_ldap is also using a similar approach to cache and share data 
between child processes.

However, to hide the low level details from service/module implementers, 
we might have to write a wrapper to manage the shared memory, 
growing/shrinking the shared memory according to the demand, creating 
objects in shared memory, etc.

It is also possible to use apr_dbm/apr_memcache to share data, but those 
are similar to using a database.

Any other thoughts or comments ??

Regards,
Uthaiyashankar.

Samisa Abeysinghe wrote:
> FYI: This mail was in the user list.
> I think we have to solve this mod_axis2 related problems, specially 
> for the benefit of the production users.
>
> At a glance, it looks to me as if we can solve this by using either 
> apr_proc_mutex [1] or apr_global_mutex [2].
> At a glance, it looks to me as if using apr_global_mutex and locking 
> the stuff could be the solution.
>
> Thoughts please...
>
> [1] http://apr.apache.org/docs/apr/0.9/apr__proc__mutex_8h.html
> [2] http://apr.apache.org/docs/apr/0.9/apr__global__mutex_8h.html
>
> Thanks,
> Samisa...
>
>
> -------- Original Message --------
> Subject:     Re: Urgent: Specifying scope in Axis2c
> Date:     Fri, 12 Oct 2007 08:59:17 +0600
> From:     Samisa Abeysinghe <samisa@wso2.com>
> Reply-To:     Apache AXIS C User List <axis-c-user@ws.apache.org>
> To:     Apache AXIS C User List <axis-c-user@ws.apache.org>
> References:     
> <489947c0710111559t7f0c74a7s3c0c919f54a24523@mail.gmail.com>
>
>
>
> Subra A Narayanan wrote:
>> Hello everyone,
>>
>> I have run in to an issue which I can't seem to figure out. In my 
>> init method in the service skeleton I call the initialization routine 
>> of one of the libraries that my web service uses. I notice in my logs 
>> that the library initialization function is being called 8 times. 
>> This corresponds to the number of apache processes that are running.
> This is a problem yet to be solved in Axis2/C. See 
> http://damithakumarage.wordpress.com/2007/09/23/an-axis2-c-design-issue/.
> This is a pending issue that needs to be fixed.
> The workaround for the time being would be to use some persistent 
> storage to keep a flag and call the init routine based on the flag value.
>
> Samisa...
>>
>> This is causing a lot of issues because I was under the impression 
>> that my web service init function is called only once when the first 
>> request comes in. My library sets up some resources which I want to 
>> share among all processes. Can this be done?
>>
>> In Axis2/Java there is a way to specify scope for the webservice 
>> (request, session, application) in the services.xml file? can 
>> something similar be done in Axis2/c? I took a look at the axis2c 
>> code and saw that there is an enum called axis2_scope defined. Is it 
>> used for the same purpose as in Axis2/Java?
>>
>> Thanks for any help.
>>
>> Subra
>>
>>
>>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Mime
View raw message