On 9/6/07, David Willams <[EMAIL PROTECTED]> wrote: > Obviously, I'm not involved with apache internals, but are you saying it's > architecturally impossible for apache to somehow manage a hash that can, at > the same time, be available (read-only) to child processes?
There are things for apache that work similarly to Cache::FastMmap, using memory-mapped files to share data. The hard part is using that efficiently from perl (or really anything that isn't C). When you want to read/write perl structures as a series of bytes, you have to deal with serialization and minimizing the amount of data to be read/written. Many of the slow perl modules like IPC::Shareable will just naively serialize an entire hash any time you change a key, which would be a total disaster for an application like yours. Because it has a good caching system, BerkeleyDB essentially accomplishes a shared memory hash, although it still has the overhead of serializing individual values from perl into something C can deal with. Cache::FastMmap does too, but it shouldn't be used as a database because it's designed to work as a cache and drop data as needed. - Perrin