CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate: Re: [Zhris] simultaneous exection of script on webpage: Edit Log

Veteran / Moderator

Dec 18, 2014, 6:22 AM

Views: 7605
Re: [Zhris] simultaneous exection of script on webpage

"Locking" the script implies that only 1 instance of the script should be running at any given time, which goes against one of the requirements in the opening post.

how can I make the script so that it can execute simultaneously on different requests ?

Now, the new question/requirement.

If the script is running everytime anew, how would I get it to know what is the correct entry in the database table to use, so that it does not repeat itself ? Delete the entry, I guess ?

We don't have enough info on what the script does or how the data is being used to be able to properly answer that question. However, instead of locking the script to a single instance, it may be more appropriate to do the locking at the DB (either table locking or row locking depending on the storage engine). Using a storage engine that supports transactions would be best and is what is needed to support row level locking.

If the processing script takes 45+ minutes to complete, my first suggestion would be to profile the script to see if there are bottlenecks that can be optimized.

(This post was edited by FishMonger on Dec 18, 2014, 6:23 AM)

Edit Log:
Post edited by FishMonger (Veteran) on Dec 18, 2014, 6:23 AM

Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives