Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: (shared) memory and preloading modules using Mod-perl

by gmpassos (Priest)
on Dec 30, 2004 at 01:53 UTC ( #418152=note: print w/ replies, xml ) Need Help??


in reply to (shared) memory and preloading modules using Mod-perl

Take a look at Safe::World, where you can run your code inside a compartment than clean it from the memory. Also you can have many compartments as you want at the same time, each with different packages loades, or even assemble this compartments.

You also can try to make a different architecture in your application, where you can let some part of your application as a service in an unique process, so, the other process will access this service without load it, just making a call using any RPC protocol. So, take a look at SOAP.

About the prefork resource, is very nice if your OS has fork, but note that is not any module/code that can survive from a fork.

Graciliano M. P.
"Creativity is the expression of liberty".


Comment on Re: (shared) memory and preloading modules using Mod-perl
Re^2: (shared) memory and preloading modules using Mod-perl
by perrin (Chancellor) on Dec 30, 2004 at 05:37 UTC
    You also can try to make a different architecture in your application, where you can let some part of your application as a service in an unique process, so, the other process will access this service without load it, just making a call using any RPC protocol. So, take a look at SOAP.

    You'd end up needing to handle concurrent requests there as well, and probably writing your own forking daemon of some kind. Not worth it, unless you can use a single-process model. About the prefork resource, is very nice if your OS has fork, but note that is not any module/code that can survive from a fork.

    The same is true of threads, i.e. don't fork or spawn a thread with an open socket or some XS data structure and then try to use it from the new process/thread.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://418152]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2014-11-26 19:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (172 votes), past polls