Article View: comp.sys.next.programmer
Article #1061Re: DIstributed Objects Problem (HELP!)
From: Sam Streeper
Date: Tue, 15 Sep 1992 18:17
Date: Tue, 15 Sep 1992 18:17
32 lines
1878 bytes
1878 bytes
samurai@cs.mcgill.ca (Darcy BROCKBANK) writes:
> (... A bunch of stuff about distributed applications)
You mentioned that you ran the server's connection, but you didn't mention
running the clients connection. Let's see if I can make this clear.
When you asked for the registered server object, you actually got a proxy
to that object. In order to make that happen, a connection was created for
you automatically on the client side. You can get this connection like this:
magicConnection = [myServerProxy connectionForProxy];
This connection will receive messages at its inPort, but how will it
send those messages to you? It must have some "thread" of execution to
dispatch those messages to you. You probably want to run that connection from
DPSclient ("runFromAppKit") so that the Objective-C messages are dispatched
from the main thread. You could run the connection in a new thread, but then
when unsolicited messages came in (like those your server sends) you would
handle those messages in the client's connection's thread, and you don't
want multiple threads running in a NeXTstep app unless you really know
what you're doing.
In other words, since you don't run the client connection, messages
arrive there but you never give control to the connection code to
do anything with those messages, so they just sit there at the port.
-sam
--
Opinions expressed herein are not those of my employer. They're not even
mine. They're probably wrong besides. How did they get in here, anyway?
Technical Details
Message-ID:
<4987@rosie.NeXT.COM>Path:
arc1-ca.pugleaf.net!sparky!uunet!rosie!NeXT.comReferences:
<1992Sep15.000616.1105@cs.mcgill.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!rosie!NeXT.com From: sam_s@NeXT.com (Sam Streeper) Newsgroups: comp.sys.next.programmer Subject: Re: DIstributed Objects Problem (HELP!) Message-ID: <4987@rosie.NeXT.COM> Date: 15 Sep 92 18:17:58 GMT References: <1992Sep15.000616.1105@cs.mcgill.ca> Sender: news@NeXT.COM Reply-To: sam_s@NeXT.com Lines: 32