<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have just started looking at Twisted, and it looks really
cool and useful. &nbsp;I have read through much of the docs and the O&#8217;Reilly
book, but I still have a head full of questions.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>First some background.&nbsp; I am considering using Twisted
to replace a component in a network management suite. &nbsp;All the components
communicate through CORBA (omniORB). &nbsp;The component I want to replace gets
CORBA calls that requests data from servers on the network, and the component retrieves
the data using ssh.&nbsp; Currently it spawns /usr/bin/ssh and uses pexpect to
control the interaction.&nbsp; Typically we will have 20-40 simultaneous calls
in progress to different IP addresses, each on a separate thread and each
spawning a separate ssh client.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I want to replace this with a component that uses Twisted instead.
&nbsp;From what I have read Twisted should be ideal for this &#8211; I can use
the conch library to do the ssh calls and eliminate the need for spawning
dozens of separate processes (something that has been a major cause of bugs).<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>The first problem I have is how to integrate the omniORB
event loop with the reactor event loop. &nbsp;My initial thoughts are to have
the omniORB event loop in one thread and run the reactor loop in another
thread. &nbsp;When a CORBA call comes in it will use callFromThread() &nbsp;to post
a request to the Twisted thread that will create the connection and handle the
ssh session.&nbsp; Is this feasible?&nbsp; Any gotchas to watch out for?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>However I have also seen reference to using threadedselectreactor
for mixing Twisted and foreign even loops (<a
href="http://bob.pythonmac.org/archives/2005/04/17/twisted-and-foreign-event-loops/">http://bob.pythonmac.org/archives/2005/04/17/twisted-and-foreign-event-loops/</a>),
but I have no idea how to use this with omniORB. &nbsp;Is this worth
investigating further, or should I stick with my original idea?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Replacing CORBA with the Twisted PerspectiveBroker is not an
option, since it would require extensively rewriting a dozen or so components.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have plenty of other questions, but will save them for another
time.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-GB style='font-size:
10.0pt;font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><st1:PersonName w:st="on"><font size=2 face=Arial><span
 lang=EN-GB style='font-size:10.0pt;font-family:Arial'>Dave Kirby</span></font></st1:PersonName><o:p></o:p></p>

</div>

</body>

</html>
This email and any attachment may contain confidential, privileged information for the sole use of the intended recipient. If you are not the intended recipient, do not disclose, reproduce, disseminate or otherwise use this communication. If you received this communication in error, please immediately notify the sender via email and delete the communication from your system. Company information : Tideway Systems Ltd, Registered Office: Anchor House, 15-19 Britten Street, London, SW3 3TY. Registered in England & Wales Reg. Reg. No: 4598072  VAT No: 805 5153 50