Re: Robust DO connections
Re: Robust DO connections
- Subject: Re: Robust DO connections
- From: Terry Smyth <email@hidden>
- Date: Mon, 7 Apr 2003 13:21:19 +0100
Hi Michael and others,
Just to check my understanding before I charge off down the wrong path.
I think you are suggesting I should have a dedicated NSSocketPort on my
server for listening for new connections, and when a client connects, I
create a new NSSocketPort on the server with a new NSConnection,
running in a separate thread. Is that the gist?
Currently, when my client connects it picks up the root proxy and sends
a "registerNewClient:" message. This is the first my server knows about
a new client. So at this point, my server could set up the new
port/connection to handle the client, and keep listening for new
clients on the original NSSocketPort.
However, I'm unsure what is the best way to create the new
NSSocketPort/NSConnection to talk to the client. Should I get the
server to call back to the client on a new NSSocketPort (having created
a listening port on the client), or is there an easier way?
Sorry for the basic nature of these queries, but I'm not too familiar
with this stuff, and was quite pleased just to get it all working to
the level it is already!!
Thanks,
Terry Smyth
SGL
On Friday, April 4, 2003, at 05:23 pm, Michael Latta wrote:
It has been quite a few years since I worked with DO, but as I recall
the idea is to listen for new clients on a dedicated connection, then
open private connections for each conversation. Each client
conversation then can operate on its own thread. With all the clients
sharing on e connection you are serializing all traffic to the server.
Michael Latta
On Thursday, April 3, 2003, at 03:58 AM, Terry Smyth wrote:
Hi,
I'm using DO to build a client server architecture into my
application, using Rendezvous to select my server, and NSSocketPort
to connect. Most aspects are now working really well (thanks to the
many helpful posts on this list), and it is reasonably robust in most
circumstances, provided that whichever end is closing down has a
chance to notify the other end, so that things can be tidied up
cleanly.
My issue at the moment is that if one of my clients suffers a
catastrophic crash, the server is not notified. And worse still, the
connection seems to be broken for all other clients (not good). I
tried polling the clients to detect if they go "dead", but after one
client dies, the server can't talk to any of them. Is this behavior
expected? What is the latest recommended way to ensure DO works
robustly. (I've got exception handlers around connection attempts,
and message sending)
Is is possible (and would it help) to talk to each client on a new
NSConnection (ie different from the listening connection) to reduce
the possibility of one client affecting others?
I'm interested to hear if others are fully satisfied with the
robustness of DO/NSConnection/NSSocketPort. ie does it survive client
apps, or client machines crashing, cables unplugging etc?
Thanks,
Terry Smyth
Software Generation Limited
_______________________________________________
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.
_______________________________________________
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.