Re: Sending and receiving files to remote server through cocoa
Re: Sending and receiving files to remote server through cocoa
- Subject: Re: Sending and receiving files to remote server through cocoa
- From: Wade Tregaskis <email@hidden>
- Date: Sun, 8 Feb 2004 22:48:33 +1100
I am writing a cocoa - ObjC app in which I have to send and receive
files to remote server. The remote server (Also MAC machine) is
locally
mounted on my machine (through Finder -> Go -> connect to Server). How
do this? Does NSURL will help?
In this day and age, I *strongly* recommend *against* building new
client-server systems using network filesystems. Such client-server
systems are typically very fragile, far more so than purely
network-based client-server systems, because file semantics and
network messaging semantics are not identical in practice (no matter
what theory might say).
One particular issue is that many filesystems -- both local and
network -- don't actually support the ability to notify one process
when another closes a file. For example, any system that implements
"hot folders" is fragile there because it need to implement some sort
of heuristic to tell when the second process is done writing the file.
These heuristics can very often be defeated through casual use,
leaving the user mystified.
Another issue is that not all network filesystem protocols are the
same. Things that work perfectly fine with a mounted AFP volume may
not work with the same volume mounted via SMB or NFS, for example.
And then there are distributed filesystems like AFS...
In this day and age, exchanging XML-formatted messages via HTTP is the
way to implement distributed systems. You can easily develop your own
custom protocol or use either XML-RPC or SOAP and get your code done a
lot faster and a lot more robustly.
I agree with all these comments, regarding using mounted file systems
programmatically, but am unsure about the XML-RPC/SOAP suggestion. The
original poster asked for a Cocoa solution, and I must say that when I
looked some time ago there seemed to be absolutely no documented API's
for XML-RPC nor SOAP. The best I could find was some implementations
for AppleScript, which may be sufficient for some use, but needlessly
complicates the process.
My immediate thought when reading the poster's original message was to
suggest Distributed Objects. That seems to be the "truest" Cocoa
solution.
Wade Tregaskis
-- Sed quis custodiet ipsos custodes?
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.