473,385 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

[Off Topic] Web Application need to call a perl program.

Hi,

I would like to know how can I make a daemon program in perl,say DP . The said program need to call a a program say A, which will to parse huge text file. The run time of A may vary say 5 to 6 hrs on average. There will be a lot of execution request reach the daemon program(DP) parsing different text files. so I need this daemon program to schedule each request in proper interval of time.

I need to call the program from a web interface. so that the DP will take the request from the web interface and invoke it.Since the web user cant wait for long time online, could any body tell me a idea how a perl program can survive in this scenario.

Regards
Shyam
Feb 9 '07 #1
4 1611
KevinADC
4,059 Expert 2GB
instead of a deamon, maybe cron or task would be more appropriate. People make a request, which is stored in a file or database. The cron/task starts and reads the request file/database and starts the jobs at a convenient time for the server. From there I'm not sure. Write the results to files ID'ed by the user requests or something similar so they can come back later and read the results.
Feb 9 '07 #2
@shyamkumars

If you want to tell your daemon about a new task, your web interface should invoke a cgi-script, when the submit button is hit. This cgi-script should, however (e.g. interprocess communication via shared memory, signals, files), communicate with your daemon DP, telling him about the new job.

Forget about to introduce a cron job, because this does not solve your problem to trigger requests "on demand" via the web interface. Your approach, using a daemon, is appropriate!

Greetz, Doc
Feb 12 '07 #3
Hi,

Thanks KevinADC and docsnyder for your valid suggestions.

I think the cron job scenerio will not work for me. Since it is a web application. The "Work" have to start from the moment when any one of the user click the submit button. But I think the the search parameter and the file details can be stored in the database itself, which is identified by a suitable user id.

Just assume the case. There is a max of 6 of parsing per day in a sequential order. I will make use of database field value as some status flag to make use of it say.But I need to restrict the number of execution request. How can I get the details how much process is running in this daemon.

Thanks In advance.
Regards
Shyam
Feb 12 '07 #4
KevinADC
4,059 Expert 2GB
if the work has to start immeadiatly then cron/task is not appropriate. But it seems that it's a good possibility to consider since the process takes so long to complete. The jobs could still be run in order of request as a cron/task and load taken off the server if they run during off-peak hours (if there are any off-peak hours). But anyways, thats just a general thought and something to keep in mind in case you ever need to do something like that.

Maybe doc can answer the last part of your question, it's a bit out of my range of experience and I don't need another tounge lashing from him so soon. ;)
Feb 12 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Charles Handy | last post by:
How does FastCGI compare against java Apps running in java app servers like TomCat, Sun One, WebLogic and WebSphere? Is there a business case for switching from CGI to Java? Performance?...
82
by: nobody | last post by:
Howdy, Mike! mikecoxlinux@yahoo.com (Mike Cox) wrote in message news:<3d6111f1.0402271647.c20aea3@posting.google.com>... > I'm a C++ programmer, and have to use lisp because I want to use >...
5
by: dixie | last post by:
Is it possible to have Access do a docmd.quit if a key is not pressed for 5 minutes? I have been trying to get users out of a program when it is necessary to update it. To do this, I have been...
19
by: Jasper Dozer | last post by:
Is this a healthy way to get a pointer to point ? char *p = "longenough"; regards, jasper
33
by: Chris Croughton | last post by:
I notice the real reason for not posting "off-topic" here is that the result will be a long thread on whether the matter is off-topic or not -- caused by the very people who claim that they don't...
5
by: Dave A | last post by:
I have an application that does lots of socket communications all asynchronously via the TcpClient class. The code has been working 99.9999% of the time (yeah one of those bugs) but occasionally...
7
by: vze7jsc0 | last post by:
Has anyone computed the percentage of off topic posts in this group using ANSI C? usenet is a strange place
8
by: fabio | last post by:
hi everybody i have a weird problem with my project, look at this: **************************************************** Debian:/progetto/PROGETTO$ ls -al server -rwsr-xr-x 1 root faz 372731...
5
by: talk2mishal | last post by:
Hi, I have to make the application like the Directory Structure in PERL. so basically i need to make one page which evaluate all directories and display on page (e.g...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.