discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUStep and Cocoa Distributed Objects compatibility


From: hns
Subject: Re: GNUStep and Cocoa Distributed Objects compatibility
Date: Sun, 22 Mar 2009 10:31:44 -0700 (PDT)
User-agent: G2/1.0

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.

A restricted level of compatibility could be achieved by avoding Level
3 as much as possible. This may be achievable, if we restrict all
messages to be byRef. And only a handful of basic objects to be
allowed for byCopy (i.e. NSString, NSData, NSDate). With that scheme,
it could be possible to remotely call all the getters and setters of
distant objects and really exchange some basic data. So you would
never *copy* a full object to the peer, you would just pass a
reference to the other side.

My educated guess is that this could cover 80-90% of all DO use cases.

Nikolaus


reply via email to

[Prev in Thread] Current Thread [Next in Thread]