The range of possible solutions heavily depends on your application. Assuming that your "process" takes too long to just return the result in the HTTP reply, there are many solutions. I'll try to show you some of them:

If this is a private project, the "process" doesn't need to run very often and finishes in a forseeable amount of time, you could just write your result in a "buffer.txt" within your webservers document root and use curl, wget or others th fetch this file.
If you need to be sure that the job has finished before the download runs, create it as "buffer.txt.new" and rename it as soon as you're done. On the other side, curl and wget have parameters which let them download only newer-than-local - files.
I'm using wget this way and parse the output to fetch files from an FTP server and process them only when they're updated.
This solution is done very fast, but there are many things which could go wrong.

The second sample is near by the first, but this time the download isn't triggered by cron or anything else which is timed, but by the server running the process. An abstrace CGI there could be:

Parse_the_parameters(); Run_the_process(); Call_URL(http://server2/trigger_download.cgi);
trigget_download.cgi could be just a bash script which starts curl/wget or a Perl CGI which does the same and then processes the result. (Actually, I'm using curl much more often than LWP, because a simple one-line curl call requires about a dozen lines with LWP :-( ).

If you got a commercial environment and both servers could reach each other only via internet, you should add authentication on both sides (htaccess Basic Auth may be enough) and let the called server ack that the request has been fully processed and the calling server must retry if this isn't received.

Final note: If you're using SOAP without being absolutly forced to, you should read the first two paragraphs of SOAP::Simple's description on CPAN.


In reply to Re: Buffering and data tranmission in perl by Sewi
in thread Buffering and data tranmission in perl by py_201

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.