[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Web Service Request - Response Delay



Dhanushka,

Dynamic arrays might be an issue in case the arrays must be extended too 
often or if you use symbolic names instead of the array handle.

Because you use dynamic arrays I assume that you do not use WSDL2RPG 1.3 
but v1.13, right?

Background information:

If you use symbolic names instead of the array handles, WSDL2RPG has to get 
the handle from a "Map" each time you access the array. For that it uses 
the binary search algorithm. I wished I had a true index to get rid of the 
binary search to increase performance.

When creating a dynamic array the array allocates storage for 256 elements. 
Each time the array is full it reallocates storage for another 256 
elements. So for extremely huge arrays time to reallocate storage can 
dramatically slow down performance. If you use very huge arrays, you should 
specify a reasonable initial size at each MemoryManager_createArray() 
statement:

    MemoryManager_createArray(
       serviceUUID: elemSize: name: ensureUniqueName: increment)

Do not use Array_new() directly!

You may also add debug statements to procedure HTTP_receiveResponse() of 
your stub module:

      else;
         http_DebugLog_appendText('anyDebugText-StartParser');
         if (XMLSAXParser_parse(g_hSAXParser: i_data: i_length) = cTrue);
            http_DebugLog_appendText('anyDebugText-EndParser-Success');
            return i_length;
         else;
            http_DebugLog_appendText('anyDebugText-EndParser-Failure');
            return -1;
            // return i_length;
         endif;
      endif;

   /end-free
   *
  P HTTP_receiveResponse...
  P                 E


http_DebugLog_appendText

Last but not least it might be an idea to set up a soapUI mock web service 
to debug the problem inside the local network.

Thomas

Am 21.09.2011 18:43, schrieb Dhanushka Manjula:
>
>     @ Mike
>     I'll try to do it tomorrow...
>     @ Thomas,
>     One thing I forgot to mention, I use dynamic arrays in order to get
>     around the 64k barrier..
>     and processor utilization in our system is not more than 65%
>     I'll ask network guys to look into the firewall again..
>
>     On Wed, Sep 21, 2011 at 9:30 AM, Thomas Raddatz
>     <[1]thomas.raddatz@xxxxxxxxxxx>  wrote:
>
>       Good idea, Mike!
>       It is hard to believe that WSDL2RPG consumes the additional time. I
>       assume
>       that one of the following things is true:
>       1. Network connection is different for the System i and his PC.
>       2. Too much workload on the System i.
>       3. soapUI does not parse the response, hence it must be faster (but
>       not
>       that much)
>       If Dhanushka really uses WSDL2RPG 1.3 then WSDL2RPG uses simple
>       string
>       operations to create the request message. That should not take that
>       much
>       time. Then is calls http_post_xml() to send the request, receive
>       the
>       response and parse the response message.
>       Thomas.
>       Am [2]21.09.2011 18:01, schrieb Mike Krebs:
>
>     >  Let's narrow it down a bit. Are you experiencing the delay in
>     transmission, receipt, or parsing. I don't know or use WSDL2RPG but
>     you can insert a couple of TIME statements to see the time of things
>     in your debug log. Edit member HTTPAPIR4 and change the following
>     lines (from current beta):
>     >
>     >  About 354 (find entered)
>     >  c                   callp     http_dmsg( 'do_oper(' + peOper + '): '
>     >  c                                      + 'entered at ' +
>     %char(%time()))
>     >
>     >  About 904 (find comm_blockread)
>     >  c                   callp     http_dmsg('calling comm_blockread at '
>     +
>     >  c                                %char(%time()))
>     >
>     >  Recompile the service program by calling the INSTALL routine again
>     or by following the instructions in the program source.
>     >
>     >  If WSDL2RPG has some similar debug points, do the same there so you
>     can see progression as it prepares/parses the XML.
>     >
>     >  So then you can look at your debug file and see how long each part
>     takes. Narrows down where to look for issues.
>     >
>     >
>     >  -----Original Message-----
>     >  From: [3]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>     [mailto:[4]ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of
>     Dhanushka Manjula
>     >  Sent: Wednesday, September 21, 2011 6:34 AM
>     >  To: [5]ftpapi@xxxxxxxxxxxxxxxxxxxxxx
>     >  Subject: Web Service Request - Response Delay
>     >
>     >  Hello,
>     >
>     >  I'm using WSDL2RPG 1.3 + scott's LIBHTTP to send the attached
>     request
>     >  message to the server in remote location via 2MB E1 line.
>     >  it takes around 3 minutes to receive the attached response message.
>     >  Then, I used the SOAP-UI from my windows machine&   execute the same
>     request
>     >  &   it takes around 10 seconds to complete the process.
>     >  what will be the reason for this delay?
>     >
>     >  Thank you
>     >  Dhanushka
>     >
>     ----------------------------------------------------------------------
>     -
>     >  This is the FTPAPI mailing list.  To unsubscribe, please go to:
>     >  [6]http://www.scottklement.com/mailman/listinfo/ftpapi
>     >
>     ----------------------------------------------------------------------
>     -
>     >
>     ----------------------------------------------------------------------
>     -
>     This is the FTPAPI mailing list.  To unsubscribe, please go to:
>     [7]http://www.scottklement.com/mailman/listinfo/ftpapi
>     ----------------------------------------------------------------------
>     -
>
> References
>
>     1. mailto:thomas.raddatz@xxxxxxxxxxx
>     2. tel:21.09.2011%2018
>     3. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>     4. mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
>     5. mailto:ftpapi@xxxxxxxxxxxxxxxxxxxxxx
>     6. http://www.scottklement.com/mailman/listinfo/ftpapi
>     7. http://www.scottklement.com/mailman/listinfo/ftpapi
>
>
>
>
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------