Thanks for your support.
I have tried both approaches with OS threads and Coro.
As above started one OS thread per vendor (used limited functionality for 3 vendors) and serial loop for inside calls per thread.
With Coro started 3 threads and each doing inside calls asynchronously.
Even though Coro seems to fetch all results in parallel overall response time for Coro is much higher.
Is this because Coro is running in a single process while OS threads has 4.
I thought as my scripts waits for IO for larger amount of time compared to actually process the received data Coro should win.

I have logged request and response times for SOAP calls for both as below.

Using OS threads total time 13 seconds Start time Tue Sep 30 15:29:00 2014 Request 859 sent time Tue Sep 30 15:29:01 2014 #thread 1 Request 532 sent time Tue Sep 30 15:29:01 2014 #thread2 Request 906 sent time Tue Sep 30 15:29:02 2014 #thread3 Response 859 receive time Tue Sep 30 15:29:03 2014 #thread 1 respon +se Request 155 sent time Tue Sep 30 15:29:03 2014 Response 532 receive time Tue Sep 30 15:29:03 2014 #thread 2 respon +se Request 232 sent time Tue Sep 30 15:29:04 2014 Response 906 receive time Tue Sep 30 15:29:04 2014 #thread 3 respon +se Request 870 sent time Tue Sep 30 15:29:04 2014 Response 870 receive time Tue Sep 30 15:29:06 2014 Request 570 sent time Tue Sep 30 15:29:06 2014 Response 232 receive time Tue Sep 30 15:29:07 2014 Response 155 receive time Tue Sep 30 15:29:07 2014 Request 461 sent time Tue Sep 30 15:29:07 2014 Response 570 receive time Tue Sep 30 15:29:09 2014 Request 585 sent time Tue Sep 30 15:29:09 2014 Response 585 receive time Tue Sep 30 15:29:10 2014 Response 461 receive time Tue Sep 30 15:29:10 2014 Request 479 sent time Tue Sep 30 15:29:10 2014 Response 479 receive time Tue Sep 30 15:29:13 2014 Using Coro's total time 31 sec Coros Start time Tue Sep 30 16:03:53 2014 Request 812 sent time Tue Sep 30 16:03:53 2014 #thread1 Request 923 sent time Tue Sep 30 16:03:54 2014 #thread2 Request 942 sent time Tue Sep 30 16:03:57 2014 #thread3 Response 812 receive time Tue Sep 30 16:03:59 2014 #thread1 respons +e Response 923 receive time Tue Sep 30 16:04:00 2014 #thread2 respons +e Response 942 receive time Tue Sep 30 16:04:01 2014 #thread3 respons +e # individual threads starting sub threads async Request 312 sent time Tue Sep 30 16:04:01 2014 Request 607 sent time Tue Sep 30 16:04:02 2014 Request 578 sent time Tue Sep 30 16:04:03 2014 Request 675 sent time Tue Sep 30 16:04:04 2014 Request 310 sent time Tue Sep 30 16:04:05 2014 Request 720 sent time Tue Sep 30 16:04:06 2014 Request 502 sent time Tue Sep 30 16:04:07 2014 Request 867 sent time Tue Sep 30 16:04:08 2014 Response 312 receive time Tue Sep 30 16:04:11 2014 Response 607 receive time Tue Sep 30 16:04:13 2014 Response 578 receive time Tue Sep 30 16:04:16 2014 Response 675 receive time Tue Sep 30 16:04:18 2014 Response 310 receive time Tue Sep 30 16:04:21 2014 Response 720 receive time Tue Sep 30 16:04:22 2014 Response 502 receive time Tue Sep 30 16:04:24 2014 Response 867 receive time Tue Sep 30 16:04:26 2014

May be i am better of with BrowserUK suggested approach or have not understood Coro correctly.
please suggest.


In reply to Re^6: Do I need to use Coro instead of threads/forks by mohan2monks
in thread Do I need to use Coro instead of threads/forks by mohan2monks

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.