Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: How to keep network connection persistent during session?

by sflitman (Hermit)
on Oct 11, 2009 at 22:17 UTC ( [id://800586]=note: print w/replies, xml ) Need Help??


in reply to How to keep network connection persistent during session?

I've had similar issues with any webapp system. Rather than serializing the connection, which just freezes the 'name' of the connection and doesn't really keep it open, the right way to handle this is to use a daemon which runs continuously on the server and brokers the requests to the database, and you're right, uses a FIFO (Unix socket) to talk with your Mason app instances. The daemon can be written in Perl, there are many examples. This way, you can multiplex requests and cache database connections.

That said, you might be better off using Apache 2.x, mod_perl, and Apache::DBI which caches connections for you.

HTH,
SSF

  • Comment on Re: How to keep network connection persistent during session?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-24 05:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found