Hi Rainer,

On 02/05/2013 08:04 PM CEST +02:00, Rainer Jung wrote:
Example code using it: modules/cluster/mod_heartmonitor.c should be
simplest, look for slotmem and SLOTMEM in there. That should at least
show how to bootstrap and use slotmem.

Okay, the longer I am reading anything related to mod_slotmem_shm, the more I get the impression that it is the wrong tool for my task. If I understood it correctly, mod_slotmem_shm organizes data in slots. This appears to make it unnecessarily limited to the number of slots I initialize it with.

What I need is a way to transfer information from one long living request to another entirely independent request some time later. The first request contains a cookie (i.e. a random string), which is also contained in the second request. I would like to use this cookie as a handle to store some data (fixed size, if needed) generated during processing of the first request somewhere (at least for the life time of the first request). The second request then needs to be able to use the cookie to access the data the first request already generated. Moreover, an arbitrary number of such request pairs can happen at the same time.

Given the requirements above, is the mod_slotmem_shm API still the right tool for this purpose?

I just started looking at mod_socache_shmcb -- is this maybe better suited for the purpose described above?

I could also go for a custom shared memory usage implementation, but I thought making use of any already existing API might be a better idea (trying avoid implementing things twice). So, any hint is appreciated...

Regards,
Micha

Reply via email to