[Pythonmac-SIG] problems with Distributed Objects and PyObjC
hsanderson at s-brandingsolutions.com
Fri Oct 23 16:45:26 CEST 2009
Ronald Oussoren wrote:
> On Tuesday, October 20, 2009, at 01:20PM, "Hamish Sanderson" <hsanderson at s-brandingsolutions.com
> > wrote:
>> Trying to use Distributed Objects to communicate between PyObjC-based
>> processes on 10.5 and/or 10.6, but encountering various problems when
>> passing Python values, as illustrated below.
> Full DO support requires defining new protocols, which won't work on
> 64-bit builds. Even the limited DO support you need may or may not
> work because it is a low-level library that might interfere with
> PyObjC. I don't have unittests or sample code for this and hence
> cannot guarantee that this will work.
Hmm. Sounds like DO isn't a good way to go in Python (and I've already
discounted Apple events), so I suspect I'll have to look elsewhere for
a long-term solution.
> I will look into your issues though, but not today.
OK, it isn't urgent. I'm not passing anything complex so can work
around the problem by ensuring all Python objects are converted to
Cocoa instances before handing them off to DO.
> An alternative to DO is to use a native Python library (Twisted, XML-
> RPC, ...) combined with Bonjour.
Will investigate these options.
Irmen de Jong wrote:
>> Anyone any thoughts? (Including suggestions for alternative LAN-
>> capable IPC options.)
> Both ends are Python?
Python + PyObjC.
> If they are, maybe you should try Pyro (http://pyro.sourceforge.net).
Reading the docs. A few questions, if you don't mind:
- Will Pyro play well with PyObjC objects?
- How does it compare to, say, DO+Bonjour (which is the only object-
oriented IPC system I'm vaguely familiar with)?
- And how well will it cope if some components stall or crash? (One of
the reasons for moving to a more distributed design is that some parts
of the system are inherently unreliable, so the rest of the system
will need to survive if/when those processes go down, and be able to
reconnect once they are restarted.)
Production Workflow Developer
Sun Branding Solutions Ltd
Tel: +44(0)1274 200 700
More information about the Pythonmac-SIG