Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
My question is similar in spirit to Creating Socket Connections that are persistent across multiple page loads in a single web session. I need to keep certain objects alive and well between requests to a mod_perl program. As unlinker mentioned in his last comment on that thread, I also need to keep the pool of persistent objects global (one pool total, not one pool per apache process or apache thread). In my case it will be ssh connection objects. Is there a way to keep a global cache?

My understanding of POE and the like is that it can run as a separate process on the web server and my mod_perl code can possible talk to it. However, it seems like I won't be able to actually pass active Net::SSH objects or similar back and forth between separate programs. I could potentially have all interaction with the Net::SSH objects happen on the POE side but I would appreciate suggestions on how to structure this so that my mod_perl program can talk to the POE program to get the correct POE child/thread/process and then talk to that directly.

Essentially, I will have a number of users connecting to apache which will be running mod_perl. These users would be indirectly interacting with remote SSH connections that need to be pooled on the server side and must be persistent so the users' current ssh sessions don't get disconnected/lost/overwritten between requests.

In reply to mod_perl persistent SSH connections by saberworks

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2024-04-23 09:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found