discuss-gnustep
[Top][All Lists]
Advanced

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

Re: General question about GNUStep


From: Richard Frith-Macdonald
Subject: Re: General question about GNUStep
Date: Tue, 25 Aug 2009 20:50:45 +0100


On 25 Aug 2009, at 17:17, Nicolas Roard wrote:

On Tue, Aug 25, 2009 at 4:49 PM, David Chisnall<address@hidden> wrote:
I'm not sure why this follows. Just because you can't use DO doesn't mean
you can't use GNUstep on the server.

By the way, in theory it ought to be possible to port GNUstep's NSPortCoder to Cocoa and use this for serialising messages to be sent across sockets.
 This would let Cocoa apps talk to GNUstep ones via DO.

David

In my experience, the simplest (one-liner!) and robustest solution was
indeed to send plist-serialised data over the wire -- both platforms
(GNUstep and OSX) support fast serialization/deserialisation to plist,
and as an added benefit this is easier to debug as the data is sent in
clear, and in a notably more efficient way than XML do :)
you can find some infos on the architecture I used in
http://xdev.org/thesis/phd-thesis-nicolas-roard.pdf

Note that writing a plist reader in java or C++ is quite simple.
Another possibility is to use XML-RPC, which has implementation
everywhere. But this is quite verbose (even if it's far from the
abomination that SOAP is).


I agree that using the NSPropertyListSerialization class gets you the most efficient way of serialising/deserializing objects in a manner portable between GNUsterp and Apple. It's quite easy to serialize objects, put the result in the body of an HTTP POST request, and have the other end send back serialized objects in the body of the HTTP response. You can be even more efficient with your own protocol rather than HTTP, but HTTP support is so readily available that it's convenience probably outweighs any overheads for most applications.

I also agree that XML-RPC is another good option. Within the GNUstep base library we have XML-RPC support, but I also wrote an XML-RPC implementation in the WebServices library, and that one builds and runs on OSX with the Apple Foundation, so it should build on the iPhone. It's less efficient than using NSPropertyListSerialization, but arguably a little clearer to code (and easier to inspect the data going over the wire for debug purposes than binary plists).

The WebServices library also supports web services using SOAP, but again I agree ... IMO you should *never* use WebServices/SOAP voluntarily (ie unless you absolutely have to in order to connect to some other system which is already using it).






reply via email to

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