> -----Original Message----- > From: Luke Chambers [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 09, 2005 7:09 PM > To: inline@perl.org > Subject: Forking using mod_perl > > > I am trying to use Inline Java under mod_perl. > > The code that I am running forks right before it executes the Inline > Java sub. It is a very expensive sub... a web services call.. so I > want it to run asynchronously.
Usually I'd recommend not doing that. If you have a database handy, you can solve the problem by quickly inserting a row into a database representing the web services call that needs to be performed, and then you can have another process periodically poll the database to asynchronously perform the calls as needed. This approach also helps you deal with load-averaging problems - you only issue the web services calls as fast as you can actually deal with them, not as fast as the users happened to submit them (which might be too fast). -Ken