in reply to Fastest way to talk to a perl daemon

Another fast method of sharing data is the System V IPC shared memory setup. Look at  shmctl(), shmget(), shmread() and <code> shmwrite(). <code>

-Mark

Replies are listed 'Best First'.
Re: Re: Fastest way to talk to a perl daemon
by suaveant (Parson) on Aug 06, 2002 at 17:56 UTC
    I had thought of that, but what I remember of shared memory from school, I'm not sure how to apply that to this situation. Multiple children run, so to have them all available they would either have to share the same memory space (which is limited in size, if I recall), or each have their own segment of memory, in which case you would still probably have to connect via a socket to identify, losing your speedup in most cases, probably.

    I suppose maybe they could have a pooled memory space and individual... and identify calls through the pooled space, I'm not familiar enough with it.

    The way the system currently works is that a master listen socket is created, which is then listened on by all the children. I'm not sure how to handle the calls with the shared memory, not that I am saying it couldn't be done, I just am not sure how it would...

                    - Ant
                    - Some of my best work - (1 2 3)