<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : slow Remote Procedure Call</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : slow Remote Procedure Call</description>
  <pubDate>Tue, 21 May 2013 15:44:54 -700</pubDate>
  <lastBuildDate>Fri, 05 Sep 2008 00:42:03 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=928</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>slow Remote Procedure Call : I found the cause. My rpc-method...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=928&amp;PID=3364#3364</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=173" rel="nofollow">lars-erik</a><br /><strong>Subject:</strong> 928<br /><strong>Posted:</strong> 05-Sep-2008 at 12:42am<br /><br /><P>I found the cause.</P><DIV>My rpc-method "DirectoryExists" is very slow.&nbsp;All it does is to call&nbsp;S<FONT size=2>ystem.IO.Directory.Exists .</FONT></DIV><DIV><FONT size=2>I have now replaced it with a win32 call (findfirstfile) - and it runs fast.</FONT></DIV><DIV><FONT size=2>Thanks for the description of </FONT><FONT face="Times New Roman" size=3>Asynchronous version of RPC anyway.</FONT></DIV>]]>
   </description>
   <pubDate>Fri, 05 Sep 2008 00:42:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=928&amp;PID=3364#3364</guid>
  </item> 
  <item>
   <title>slow Remote Procedure Call :   Are you using Remoting or...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=928&amp;PID=3354#3354</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 928<br /><strong>Posted:</strong> 03-Sep-2008 at 10:32am<br /><br /><DIV></DIV><DIV></DIV><DIV></DIV>Are you using Remoting or WCF? <DIV>&nbsp;</DIV><DIV>Are you using a BOS?&nbsp; If so, are using IIS, Windows Service, or Console Server?</DIV><DIV>&nbsp;</DIV><DIV>Do all RPC calls exhibit this behavior, or is it just one or a few?</DIV><DIV>&nbsp;</DIV><DIV>Here is some documentation on <FONT face="Times New Roman" size=3>InvokeServerMethodAsync</DIV><DIV></FONT><FONT size=3><FONT face="Times New Roman"></FONT></FONT>&nbsp;</DIV><DIV><FONT size=3><FONT face="Times New Roman">Asynchronous version of RPC call (#467)</FONT></FONT></DIV><DIV><FONT size=3><FONT face="Times New Roman"><?: prefix = o ns = "urn:schemas-microsoft-com:office:office" /><O:P></O:P></FONT></FONT>&nbsp;</DIV><DIV><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><FONT face="Times New Roman"><SPAN style="COLOR: white; 316ac5: ">PersistenceManager</SPAN> now contains an overloaded InvokeServerMethodAsync method which allows for asynchronous invocation of a server-side method.&nbsp; This method works similarly to the synchronous InvokeServerMethod, except that the method return data is available in the event arguments passed to the InvokeServerMethodCompleted event.&nbsp; An outstanding request can be canceled using the CancelAsync method.<O:P></O:P></FONT></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: Arial">&nbsp;</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">void</SPAN> MakeAsyncCall() {</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: white; 316ac5: ">PersistenceManager</SPAN> pm = <SPAN style="COLOR: white; 316ac5: ">PersistenceManager</SPAN>.DefaultManager;</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: green">// Setup completion handler</SPAN></SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">pm.InvokeServerMethodCompleted += </SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">new</SPAN><SPAN style="FONT-FAMILY: 'Courier New'"> <SPAN style="COLOR: teal">EventHandler</SPAN>&lt;<SPAN style="COLOR: teal">InvokeServerMethodCompletedEventArgs</SPAN>&gt;(InvokeServerMethodCompletedHandler);</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: green">// Make async call</SPAN></SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: teal">Guid</SPAN> myToken = <SPAN style="COLOR: teal">Guid</SPAN>.NewGuid();</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pm.InvokeServerMethodAsync(<SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">ServerRpcPersistenceDelegate</SPAN>(<SPAN style="COLOR: teal">Order</SPAN>.GetNumberOfOrdersSlow), myToken,</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">DateTime</SPAN>(1995, 1, 1), <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: teal">DateTime</SPAN>(1999, 1, 1));</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; }</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">private</SPAN> <SPAN style="COLOR: blue">void</SPAN> InvokeServerMethodCompletedHandler(<SPAN style="COLOR: blue">object</SPAN> sender, <SPAN style="COLOR: teal">InvokeServerMethodCompletedEventArgs</SPAN> e) {</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN lang=NO-BOK style="COLOR: teal; FONT-FAMILY: 'Courier New'; mso-ansi-: NO-BOK">Guid</SPAN><SPAN lang=NO-BOK style="FONT-FAMILY: 'Courier New'; mso-ansi-: NO-BOK"> token = (<SPAN style="COLOR: teal">Guid</SPAN>)e.UserState;</SPAN><SPAN lang=NO-BOK style="mso-ansi-: NO-BOK"><O:P></O:P></SPAN></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN lang=NO-BOK style="FONT-FAMILY: 'Courier New'; mso-ansi-: NO-BOK">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN style="COLOR: blue; FONT-FAMILY: 'Courier New'">if</SPAN><SPAN style="FONT-FAMILY: 'Courier New'"> (!e.Cancelled) {</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: teal">MessageBox</SPAN>.Show(<SPAN style="COLOR: maro&#111;n">"my async result = "</SPAN> + <SPAN style="COLOR: teal">Convert</SPAN>.ToInt32(e.Result).ToString());</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: 'Courier New'">&nbsp;&nbsp;&nbsp; }</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><FONT size=3><SPAN style="FONT-FAMILY: Arial">&nbsp;</SPAN><O:P></O:P></FONT></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><O:P>&nbsp;There is also a Tech Tip which you might find relevant:</O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><O:P></O:P></SPAN>&nbsp;</P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><O:P><a href="http://www.ideablade.com/techtip_Extract_Maximum_Data_Retrieval_Per&#102;ormance.htm" target="_blank">http://www.ideablade.com/techtip_Extract_Maximum_Data_Retrieval_Performance.htm</A></O:P></SPAN></P><P style="MARGIN: 0in 0in 0pt" ="Ms&#111;normal"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><O:P></O:P></SPAN>&nbsp;</P></DIV><span style="font-size:10px"><br /><br />Edited by davidklitzke - 03-Sep-2008 at 10:38am</span>]]>
   </description>
   <pubDate>Wed, 03 Sep 2008 10:32:46 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=928&amp;PID=3354#3354</guid>
  </item> 
  <item>
   <title>slow Remote Procedure Call : The first time I am running a...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=928&amp;PID=3351#3351</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=173" rel="nofollow">lars-erik</a><br /><strong>Subject:</strong> 928<br /><strong>Posted:</strong> 03-Sep-2008 at 5:06am<br /><br /><P>The first time I am running a remote procedure call, it is really slow. It takes about a minute - but it always succeeds. Then subsequent calls are really fast (2 sec).</P><DIV>I notice that if I wait 15-20 minutes, and tries the RPC call again, it is slow again. I guess it has something to do with proxy or firewall, but I am completely clueless.</DIV><DIV>&nbsp;</DIV><DIV>I am using:&nbsp; <FONT size=2>InvokeServerMethod.</FONT></DIV><DIV><FONT size=2>Maybe I should just use <FONT size=2>InvokeServerMethodAsync, and just assume that it succeeds.</FONT></FONT></DIV><DIV><FONT size=2>Can anyone explain how to use the "pUserstate" argument of the method InvokeServerMethodAsync ?</FONT></DIV>]]>
   </description>
   <pubDate>Wed, 03 Sep 2008 05:06:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=928&amp;PID=3351#3351</guid>
  </item> 
 </channel>
</rss>