On 22 Mrz., 12:12, Richard Frith-Macdonald
<rich...@tiptree.demon.co.uk> wrote:
On 22 Mar 2009, at 10:23, Piotr Isajew wrote:
Hello
I would like to use Distributed Objects to communicate through the
network between Objective C GNU Step application (let's say running
on Linux) and it's Mac OS X counterpart). Does anybody have any
experience using DO in such configuration? Is GNUStep's DO
implementation compatible with Cocoa's one?
No, the two implementations are not binary compatible, and making
them
compatible would be quite a big job (though it's certainly not
impossible ... as we have a binary compatible implementation of keyed
coding for NIBs already, and Nikolaus Schaler has written a binary
compatible version of NSSocketPort for mySTEP which GNUstep could
use ... so a project to implement binary compatible DO would need to
re-implement NSConnection and NSPortCoder to use those).
Currently, for IPC between GNUstep and Cocoa I'd recommend using
XMLRPC. The GNUstep webservices library provides (as a tiny part of
its functionality) an XMLRPC coder and invocation methods, and this
library can be built/used either with gnustep-make (for gnustep) or
with xcode (for cocoa).
As Richard mentioned there are 3 levels where compatibility would have
to be achieved:
1. basic communication stream - this is the NSSocketPort
2. starting and maintaining connections and referencing remote objects
- this is NSConnection, NSProxy and NSDistributedObject
3. encode object's instance variables and the method name - this is
NSPortCoder which probably uses -initWIthCoder
Level 1 has an implementation in mySTEP (but not deeply tested for
real compatibility and robustness)
Level 2 is not yet compatible - but could be made with some more
analysis
Level 3 is probably impossible without turning GNUstep upside down,
since GNUstep encoding of objects is not compatible to Cocoa. There is
no documentation available and it may even be changed by Apple in
every release.