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

Hi confreres, I want to develop a web service.

The idea is simple. The user provides a file and I will start (or Perl) a long lasting job with that file, generating same result files.
When the job is finished; i will send the result files of the job to the user by email.
While I have no experience on this task, we want to ask you, if you can give some general hints, a how-to, or ... e.g. After the user submitted the query, that will start the job ... but how do I control jobs? what about stderr? ????
Thanks in advance
Murcia

Retitled by davido.

  • Comment on How do I build a web interface for a command-line program?

Replies are listed 'Best First'.
Re: How do I build a web interface for a command-line program?
by dragonchild (Archbishop) on Dec 13, 2004 at 16:56 UTC
    What do you know how to do? How much of this task have you done? In other words, give us where you're at and we'll help you get further.

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

      I have a perl program that does a text mining, that works a command line tool. As a web service user should provide the query and the email adress. A web service is of course different than a "normal" script, because you can have many users, etc. I have no experiences in writing CGI scripts calling external programs, and possible problems arising by calling an external program when you have multiply users. and possible other problems that I do not see now.
        Ok. I see some of the confusion. "Web service" has a very specific meaning. You mean that you want your program to be accessible from the web under certain defined conditions.

        You will need a form that has, at minimum, two inputs - the query and the email address. You will then need a Perl script that will accept that input (you will want to look at Ovid's CGI beginner course for this) and will call the Perl program with the appropriate input.

        To run a website, you will need a webserver. The most common one is Apache, though IIS is often used on Windows. Your systems administrator should be able to help you here.

        After that, go as far as you can and come back with specific questions. Good luck, and have fun!

        Being right, does not endow the right to be rude; politeness costs nothing.
        Being unknowing, is not the same as being stupid.
        Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
        Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.