Re: Distributed Objects or NSFileHandle?
Re: Distributed Objects or NSFileHandle?
- Subject: Re: Distributed Objects or NSFileHandle?
- From: Uli Kusterer <email@hidden>
- Date: Fri, 22 Jun 2007 00:00:17 +0200
On 21.06.2007, at 20:30, Kam Dahlin wrote:
Is it better to use NSFileHandles to read and write data across the
network, or can I use DO and send the data to the clients inside of
an NSData object? How do iTunes or iPhoto share out their
libraries to clients? I am looking to do a similar kind of thing
but with my own file type.
I haven't seen any example code out there using DO like this, so I
am guessing that NSFileHandles are the way to go, but DO is really
powerful and it would be great if I could share my data to the
clients using this system. I have looked at the PictureSharing/
PictureSharingBrowser examples and Apple doesn't use DO to send the
picture data between the clients - they use NSFileHandles.
AFAIK NSFileHandle is just fine, but NSFileHandle lets you craft a
simple, and more interoperable protocol. I.e. NSFileHandle can be
used by Java apps, Carbon apps, PHP scripts, Windows, Linux etc...
so, if you're not opposed to eventually creating versions for other
platforms, or having third parties provide clients/servers for your
scheme, NSFileHandle is the better choice.
If you want something that "just works", and you want to stay Mac-
only, DO is the way to go. I'm not even sure GNUstep uses the same
protocol for DO as Cocoa.
Cheers,
-- M. Uli Kusterer
http://www.zathras.de
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden