Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

cgi forking, parent and child both writing to CGI::Session

by leocharre (Priest)
on Oct 22, 2009 at 18:35 UTC ( [id://802779]=perlquestion: print w/replies, xml ) Need Help??

leocharre has asked for the wisdom of the Perl Monks concerning the following question:

I'm using CGI::Application and CGI::Application::Plugin::Session

In runmode A, the user select two or more from a list of files pdf to merge together. This is a simple form with checkboxes.

This directs to runmode B, in which the operation takes place, any errors are recorded as feedback in the session object. Runmode B gives no output to the user, simply runs the operation, records any errors in the session, and redirects back to the list. (At most any given runmode, the session is checked for "feedback" and it is output to the user one time, and then erased. This has come in incredibly handy. CGI::Application::Plugin::Feedback)

The users say this takes a long time to do- waiting for the operation to actually take place. It's not going to take less time, because it's an expensive operation.

What I have in mind as a solution is; they select from a list of files, and I fork mid runmode. While forked, the operation takes place, and if errors happen, they are saved to the session object.

My concern is that two instances will potentially be writing to the session object at the same time. Are there any other concerns that I should have (not about fork) in regards to what I am going to do here?

  • Comment on cgi forking, parent and child both writing to CGI::Session

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-25 13:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found