comp.lang.ada
 help / color / mirror / Atom feed
From: Fabien Garcia <fabien.garcia@laas.fr>
Subject: Re: Question on Client - Server communication
Date: Fri, 05 Jul 2002 11:48:02 +0200
Date: 2002-07-05T09:47:51+00:00	[thread overview]
Message-ID: <3D256B52.5050608@laas.fr> (raw)
In-Reply-To: mailman.1025856482.6739.comp.lang.ada@ada.eu.org

hi,

This is indeed an old problem of communication, just as you need to know
the phone number of a person you want to talk to, you need the pair 
<address;port> of the application you want to talk to. Most applications
use fixed port (in which case you have only one application server on 
each computer) like FTP and HTTP do. An other way if you want several
application servers on a computer (which seems to be your case) is to
make a directory server.

I think the best way to handle this is to have a directory server on
each machine that waits on a known port (say S_PORT), each time an
application starts, it sends the port it is using to the local server
(through a connection to port S_PORT) and then close the connection.
When an application stops, it send a resignation message to the server
to. In order to avoid problems with server crashs, the server as to
write its configuratio in a file so as not to lose everithing.
each tome application A on computer Ca wants to talk to application B
on computer Cb, it contacts the remote server on Cb and asks for the
port used by application B. This solution make the hypothesis that
an application knows the computer on which the remote application runs,
if this is not the case, you have to make a global server to handle all
the associations <application;address;port>.

I hope this will be usefull, however I do not have any code that does this.

Fabien Garcia




  parent reply	other threads:[~2002-07-05  9:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-05  8:08 Question on Client - Server communication Preben Randhol
2002-07-05  9:23 ` John R. Strohm
2002-07-05  9:48 ` Fabien Garcia [this message]
2002-07-05 10:05   ` Lutz Donnerhacke
2002-07-05 12:47     ` Fabien Garcia
2002-07-05 14:20       ` Lutz Donnerhacke
2002-07-05 10:09 ` John McCabe
2002-07-05 14:58 ` Thierry Lelegard
2002-07-06 23:19   ` Robert A Duff
2002-07-07  1:14     ` David C. Hoos, Sr.
2002-07-06  1:06 ` Caffeine Junky
2002-07-06 19:55   ` Preben Randhol
2002-07-07  2:37     ` Caffeine Junky
2002-07-16  6:32       ` Craig Carey
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox