Re: Distributed Objects pitfalls and strategies
Re: Distributed Objects pitfalls and strategies
- Subject: Re: Distributed Objects pitfalls and strategies
- From: mmalcolm crawford <email@hidden>
- Date: Tue, 30 Mar 2004 01:50:56 -0800
On Mar 30, 2004, at 12:44 AM, John Scalo wrote:
Is there any reliable and resilient way to set up a DO server/client?
By reliable and resilient, I mean something that can withstand server
stops and starts, multiple user logout/logins, Panther fast user
switching, and deals with multiple clients and servers running on the
same network
It's not clear what your problem domain is, but if you're after
"industrial strength distributed processing" would Xgrid suit your
needs?
<
http://www.apple.com/acg/xgrid/>
Otherwise:
-- Server set to reuse ports --
i.e. the server uses initWithProtocolFamily and the client uses
initRemoteWithProtocolFamily, setting up their own BSD socket
bind()ing, and listen()ing. Each calls setsockopt(newSocket,
SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)) before binding.
Problems:
* Client hangs and gets timeout exceptions trying to resolve
connections after the server process has been stopped and started
again. e.g., a user logs out and another logs in.
I'm sure I had a similar problem using NSFileHandles for an example I
put together last year using Rendezvous for AddressBook sharing. I'm
afraid I can't now remember exactly what the solution was, or just how
effective it was (IIRC it was pretty robust with 20 client/servers),
but in case it might be of any help at all you're welcome to take a
look to compare with your code and test it out:
<
http://homepage.mac.com/mmalc/CocoaExamples/RendezvousExercise.zip>
Any other feedback -- to correct any mistakes or to enhance its
usefulness to others -- would be welcome (although, yes, I am aware of
the rather unfortunate application name <sigh>).
mmalc
_______________________________________________
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.