<br><br><div><span class="gmail_quote">On 9/6/07, <b class="gmail_sendername">Phil Mayers</b> &lt;<a href="mailto:p.mayers@imperial.ac.uk">p.mayers@imperial.ac.uk</a>&gt; wrote:</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
&gt; I want to have my python code being called from an external process<br>&gt; via COM, and the external process will expect to be calling a class<br>&gt; method that will do something (blocking as long as required) and then
<br>&gt; return the result. Rewriting the external app to deal with everything<br>&gt; being async is not an option.<br><br>I suggest you abandon Perspective Broker; it&#39;s a fully async protocol,<br>and by trying to call it in a sync/blocking manner you&#39;re going to get
<br>nowhere fast.<br><br>Use something easy like XMLRPC. Twisted can implement that as a server<br>with full deferred-capable semantics, it&#39;ll run over HTTPS, it&#39;s got<br>authentication, it&#39;s got .net bindings etc.
</blockquote><div><br><br>That doesn&#39;t make any sense: XMLRPC can&nbsp; be used asynchronously, as PB can. Switching to XMLRPC won&#39;t change anything about his situation, the biggest problem being that his COM interface doesn&#39;t support callbacks (?).
<br><br>Rasjid: Being asynchronous on the server does not require being asynchronous on the client. Communication boundaries let you do that. You should check to see if the &quot;being a COM server&quot; interface allows you to accept a call, and then later asynchronously trigger the response. Ideally, it would allow this, and the client would be none the wiser about whether the implementation of the server is blocking or not, while it&#39;s waiting for the response to its request.
<br></div><br></div>-- <br>Christopher Armstrong<br>International Man of Twistery<br><a href="http://radix.twistedmatrix.com/">http://radix.twistedmatrix.com/</a><br><a href="http://twistedmatrix.com/">http://twistedmatrix.com/
</a><br><a href="http://canonical.com/">http://canonical.com/</a><br>