Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Perl
Perl Misc
sharing a (tied) hash between processes
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="R. KRause, post: 4751620"] Hmm, this is a good question. I've been on the lookout for an elegant solution to this for quite some time. In one of the modules I wrote for a specialized chat daemon last year, I resorted to doing a process fork, and then passing my read-only hash data to a sister process via bidirectional interprocess pipes using an object request broker type methodology. The primary advantage was that neither process had to rely on disk storage operations, thus removing a slower middle layer, and even more importantly it alleviated dependancy on the internal data structures used by either process, thus providing a level of transparency. The disadvantage, was that request operations were not preemptive (they had to sit in a queue awaiting selection by the host process, like a typical client-server). There are other ways of accomplishing this bidirectional communication technique in UNIX without forked processes, such as open2() and tty device emulation -- and, if you really want to have fun, socket I/O. However, I don't believe there is any way to directly share namespaces or typeglobs between entirely disassociated perl processes. However, I would be eager to learn that I am wrong in that regard! :) --Randall [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Perl
Perl Misc
sharing a (tied) hash between processes
Top