in reply to Buffering and data tranmission in perl

Why aren't you returning the output in the SOAP response?

Alternatively, a different SOAP request could be used to poll to see if there is output available. It makes no sense to use SOAP for one request and a difference mechanism for the other.

  • Comment on Re: Buffering and data tranmission in perl

Replies are listed 'Best First'.
Re^2: Buffering and data tranmission in perl
by py_201 (Acolyte) on Sep 07, 2009 at 05:34 UTC

    The problem with getting the output in SOAP response is that the script running on 2nd server forks our many processes , which return results at different times, and SOAP would return the response only after everything finished. Instead of that i want what main.pl does is , it calls 2nd script on 2nd server, and without waiting for the response from second server it starts looking if the 2nd server script has got some results to display. so my basic question is how can main.pl read out results of many processes running on different server to the 1st server as they arrive.

    Hope i have demonstrated my problem clearly
      So you dismissed my first solution. That's why I presented a second solution for exactly the scenario you presented.

        So, I can use SOAP request to get the data stored on 2nd server.What would be the sample code for that? I need to constantly poll the server ,so that means number of requests to be sent. Actually mine is a web application and 2nd script on parallel server can fork up to 50 resources. and at a moment any number of such scripts might be running. Is SOAP the way to go about it or anything better can do?

        Is using file system as storage for the results and sending them across the servers is a good idea, can anyhow Memcache does this work.