[Twisted-Python] Beginner question: integrating with CORBA

Dave Kirby D.Kirby at tideway.com
Mon Jun 25 07:03:46 EDT 2007


I have just started looking at Twisted, and it looks really cool and
useful.  I have read through much of the docs and the O'Reilly book, but
I still have a head full of questions.

 

First some background.  I am considering using Twisted to replace a
component in a network management suite.  All the components communicate
through CORBA (omniORB).  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.  Currently it spawns /usr/bin/ssh and uses
pexpect to control the interaction.  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.

 

I want to replace this with a component that uses Twisted instead.  From
what I have read Twisted should be ideal for this - 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).

 

The first problem I have is how to integrate the omniORB event loop with
the reactor event loop.  My initial thoughts are to have the omniORB
event loop in one thread and run the reactor loop in another thread.
When a CORBA call comes in it will use callFromThread()  to post a
request to the Twisted thread that will create the connection and handle
the ssh session.  Is this feasible?  Any gotchas to watch out for?

 

However I have also seen reference to using threadedselectreactor for
mixing Twisted and foreign even loops
(http://bob.pythonmac.org/archives/2005/04/17/twisted-and-foreign-event-
loops/), but I have no idea how to use this with omniORB.  Is this worth
investigating further, or should I stick with my original idea?

 

Replacing CORBA with the Twisted PerspectiveBroker is not an option,
since it would require extensively rewriting a dozen or so components.

 

I have plenty of other questions, but will save them for another time.

 

Dave Kirby

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 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20070625/129504d5/attachment.htm 


More information about the Twisted-Python mailing list