comp.lang.ada
 help / color / mirror / Atom feed
* Client connected to two servers in Glade
@ 2002-01-16 10:26 Tomas Hlavaty
  2002-01-16 18:05 ` Pascal Obry
  0 siblings, 1 reply; 12+ messages in thread
From: Tomas Hlavaty @ 2002-01-16 10:26 UTC (permalink / raw)


Hi,

is it possible to connect a client to two or more servers simultaneously
using Glade? It seems it is not possible because there is only one boot
location. Am I right? I have to design a client which reads,
simultaneously displays data from two servers.

Thanks

Tomas

-- 
Tomas Hlavaty                       mailto:hlavaty@labe.felk.cvut.cz
Department of Cybernetics           http://labe.felk.cvut.cz/~hlavaty
Faculty of Electrical Engineering   phone: (+420 2) 2435 7284
Czech Technical University



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Client connected to two servers in Glade
  2002-01-16 10:26 Client connected to two servers in Glade Tomas Hlavaty
@ 2002-01-16 18:05 ` Pascal Obry
  2002-01-18 17:11   ` Tomas Hlavaty
  0 siblings, 1 reply; 12+ messages in thread
From: Pascal Obry @ 2002-01-16 18:05 UTC (permalink / raw)



Tomas Hlavaty <hlavaty@labe.felk.cvut.cz> writes:

> Hi,
> 
> is it possible to connect a client to two or more servers simultaneously
> using Glade? It seems it is not possible because there is only one boot
> location. Am I right? I have to design a client which reads,
> simultaneously displays data from two servers.

I would say yes. This is not a matter of boot location. With GLADE a
distributed program is composed of many partitions. You can have many
partitions acting as servers, a client can call RCI procedures on one 
or many of them. It is also possible to have many clients.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Client connected to two servers in Glade
  2002-01-16 18:05 ` Pascal Obry
@ 2002-01-18 17:11   ` Tomas Hlavaty
  2002-01-18 17:47     ` Frank
  2002-01-18 17:48     ` Pascal Obry
  0 siblings, 2 replies; 12+ messages in thread
From: Tomas Hlavaty @ 2002-01-18 17:11 UTC (permalink / raw)


> > is it possible to connect a client to two or more servers simultaneously
> > using Glade? It seems it is not possible because there is only one boot
> > location. Am I right? I have to design a client which reads,
> > simultaneously displays data from two servers.
> 
> I would say yes. This is not a matter of boot location. With GLADE a
> distributed program is composed of many partitions. You can have many
> partitions acting as servers, a client can call RCI procedures on one
> or many of them. It is also possible to have many clients.

But how the client find out what is the address of the second server?
What is the boot location then? Should be there one boot location for
both servers?

Thank you. I'll think about it.

Tomas



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Client connected to two servers in Glade
  2002-01-18 17:11   ` Tomas Hlavaty
@ 2002-01-18 17:47     ` Frank
  2002-01-18 17:48     ` Pascal Obry
  1 sibling, 0 replies; 12+ messages in thread
From: Frank @ 2002-01-18 17:47 UTC (permalink / raw)



>
> But how the client find out what is the address of the second server?
> What is the boot location then? Should be there one boot location for
> both servers?
>
> Thank you. I'll think about it.
>
> Tomas

Hi!

I believe you can put each of your servers into a partition, probably as
tasks in packages in each package.
A package can be assigned to a Partition, these partition can be located at
different computers,
this is done in the configuration file to the distributed application
(check: "Glade user guide")

The aprx syntax:

....
Partition_A, Partition_B : Partition

for Partition_A'Host use "this.that.there"
for Partition_B'Host use "some.where.else"

procedure Server_A is in Partition_A;
procedure Server_B is in Partition_B;
....

Boot server is described in the "Glade user guide" p.53.

(In short I agree with Obry.)

Frank






^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Client connected to two servers in Glade
  2002-01-18 17:11   ` Tomas Hlavaty
  2002-01-18 17:47     ` Frank
@ 2002-01-18 17:48     ` Pascal Obry
  2002-01-22 14:49       ` Tomas Hlavaty
  1 sibling, 1 reply; 12+ messages in thread
From: Pascal Obry @ 2002-01-18 17:48 UTC (permalink / raw)



Tomas Hlavaty <hlavaty@labe.felk.cvut.cz> writes:

> > > is it possible to connect a client to two or more servers simultaneously
> > > using Glade? It seems it is not possible because there is only one boot
> > > location. Am I right? I have to design a client which reads,
> > > simultaneously displays data from two servers.
> > 
> > I would say yes. This is not a matter of boot location. With GLADE a
> > distributed program is composed of many partitions. You can have many
> > partitions acting as servers, a client can call RCI procedures on one
> > or many of them. It is also possible to have many clients.
> 
> But how the client find out what is the address of the second server?
> What is the boot location then? Should be there one boot location for
> both servers?

But there is no "two servers", there is two RCI partitions to connect to. Each
provides some differents services. When you use a RCI service the boot
location will "redirect" you to the right partition on the right machine.

I don't see a problem here, or maybe I missed something ?

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Client connected to two servers in Glade
  2002-01-18 17:48     ` Pascal Obry
@ 2002-01-22 14:49       ` Tomas Hlavaty
  2002-01-22 19:49         ` Pascal Obry
  0 siblings, 1 reply; 12+ messages in thread
From: Tomas Hlavaty @ 2002-01-22 14:49 UTC (permalink / raw)


> > > > is it possible to connect a client to two or more servers simultaneously
> > > > using Glade? It seems it is not possible because there is only one boot
> > > > location. Am I right? I have to design a client which reads,
> > > > simultaneously displays data from two servers.
> > >
> > > I would say yes. This is not a matter of boot location. With GLADE a
> > > distributed program is composed of many partitions. You can have many
> > > partitions acting as servers, a client can call RCI procedures on one
> > > or many of them. It is also possible to have many clients.
> >
> > But how the client find out what is the address of the second server?
> > What is the boot location then? Should be there one boot location for
> > both servers?
> 
> But there is no "two servers", there is two RCI partitions to connect to. Each
> provides some differents services. When you use a RCI service the boot
> location will "redirect" you to the right partition on the right machine.
> 
> I don't see a problem here, or maybe I missed something ?

Maybe, the problem lies in that I have two RCI partitions which are the
same, i.e. they provide the same services. So I can't write

...
Partition_A, Partition_B : Partition

for Partition_A'Host use "this.that.there"
for Partition_B'Host use "some.where.else"

procedure Server_A is in Partition_A;
procedure Server_B is in Partition_B;
...

as Frank suggests.

The situation is as follows:

+-------------+   +-------------+   +-------------+      
+-------------+
| Machine_A1  |   | Machine_A2  |   | Machine_A3  |  ...  | Machine_An 
|
| Partition_1 |   | Partition_1 |   | Partition_1 |       | Partition_1
|
+---------+---+   +---+-----+---+   +-------------+      
+---+---------+
          |           |     |                                 |
          \-----+-----/     \-----+---------------------------/
                |                 |
         +------+------+   +------+------+
         | Machine_B1  |   | Machine_B2  |  ...
         | Partition_2 |   | Partition_2 |
         +-------------+   +-------------+

where Partition_1 is a program collecting data from somewhere (not
interesting) that is executed on Machine_Ai as a daemon. Partition_2 is
a program simultaneously displaying data collected by any two
Partitions_1. A user specify Machine_Aj and Machine_Ak dynamically when
he wants to execute a Partition_2 on Machine_Bl.

Isn't it to complicated? May be there is something wrong in the
structure of the distributed system. Should it be partitioned in a
different way?

Tomas

-- 
Tomas Hlavaty                       mailto:hlavaty@labe.felk.cvut.cz
Department of Cybernetics           http://labe.felk.cvut.cz/~hlavaty
Faculty of Electrical Engineering   phone: (+420 2) 2435 7284
Czech Technical University



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Client connected to two servers in Glade
  2002-01-22 14:49       ` Tomas Hlavaty
@ 2002-01-22 19:49         ` Pascal Obry
  2002-01-22 21:27           ` Frank
  2002-01-23 19:31           ` Tomas Hlavaty
  0 siblings, 2 replies; 12+ messages in thread
From: Pascal Obry @ 2002-01-22 19:49 UTC (permalink / raw)



Tomas Hlavaty <hlavaty@labe.felk.cvut.cz> writes:

> Maybe, the problem lies in that I have two RCI partitions which are the
> same, i.e. they provide the same services. So I can't write
> 
> ...
> Partition_A, Partition_B : Partition
> 
> for Partition_A'Host use "this.that.there"
> for Partition_B'Host use "some.where.else"
> 
> procedure Server_A is in Partition_A;
> procedure Server_B is in Partition_B;
> ...
> 
> as Frank suggests.
> 
> The situation is as follows:
> 
> +-------------+   +-------------+   +-------------+      
> +-------------+
> | Machine_A1  |   | Machine_A2  |   | Machine_A3  |  ...  | Machine_An 
> |
> | Partition_1 |   | Partition_1 |   | Partition_1 |       | Partition_1
> |
> +---------+---+   +---+-----+---+   +-------------+      
> +---+---------+
>           |           |     |                                 |
>           \-----+-----/     \-----+---------------------------/
>                 |                 |
>          +------+------+   +------+------+
>          | Machine_B1  |   | Machine_B2  |  ...
>          | Partition_2 |   | Partition_2 |
>          +-------------+   +-------------+
> 
> where Partition_1 is a program collecting data from somewhere (not
> interesting) that is executed on Machine_Ai as a daemon. Partition_2 is
> a program simultaneously displaying data collected by any two
> Partitions_1. A user specify Machine_Aj and Machine_Ak dynamically when
> he wants to execute a Partition_2 on Machine_Bl.
> 
> Isn't it to complicated? May be there is something wrong in the
> structure of the distributed system. Should it be partitioned in a
> different way?

Yes. What you described is not achievable with RCI. It is just not possible to
have 2 instances of the same RCI on the distributed application. You should
definitely have a look at the RACW. This will make this architecture possible.

In short:

- create a partation "Manager" that will server as a name server.

- create Partition_1 as a RACW partition, each one will register to the
  manager with a specific name (string)

- Partition_2 will request 2 Partition_1 using the name server.

This is a short description I agree. Have a look at the GLADE bank example
which is somehow similar. And be sure to read the documentation, as you seem
quite confused it could be possible that you have just skipped this step :)

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Client connected to two servers in Glade
  2002-01-22 19:49         ` Pascal Obry
@ 2002-01-22 21:27           ` Frank
  2002-01-22 22:17             ` Pascal Obry
  2002-01-22 22:23             ` Michal Nowak
  2002-01-23 19:31           ` Tomas Hlavaty
  1 sibling, 2 replies; 12+ messages in thread
From: Frank @ 2002-01-22 21:27 UTC (permalink / raw)


Hi!

I'm curious: which versions of GNAT(and possibly OS) are Hlavaty and Obry
using?

Frank





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Client connected to two servers in Glade
  2002-01-22 21:27           ` Frank
@ 2002-01-22 22:17             ` Pascal Obry
  2002-01-22 22:23             ` Michal Nowak
  1 sibling, 0 replies; 12+ messages in thread
From: Pascal Obry @ 2002-01-22 22:17 UTC (permalink / raw)



"Frank" <franjoe@frisurf.no> writes:

> I'm curious: which versions of GNAT(and possibly OS) are Hlavaty and Obry
> using?

GNAT 3.13, 3.14 and 3.15 on Windows (some testing on Linux). But I'm curious:
What this question is about ?

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Client connected to two servers in Glade
  2002-01-22 21:27           ` Frank
  2002-01-22 22:17             ` Pascal Obry
@ 2002-01-22 22:23             ` Michal Nowak
  1 sibling, 0 replies; 12+ messages in thread
From: Michal Nowak @ 2002-01-22 22:23 UTC (permalink / raw)


On 02-01-22 at 21:27 Frank wrote:

>Hi!
>
>I'm curious: which versions of GNAT(and possibly OS) are Hlavaty and Obry
>using?

According to OS, did somebody succeeded in building GLADE under Win98
or knows where are binaries for this kind of system?
Sometime ago I tried, but something went wrong and I switched to
Linux, where everything went fine (at least on my system). 

Mike

-----------------------------------------
                             ____|
                             \%/ |~~\
  O                                  |
 o>>        Mike Nowak               |
 T                                   |
/ >       vinnie@inetia.pl           |
http://www.geocities.com/vinnie14pl _|__




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Client connected to two servers in Glade
  2002-01-22 19:49         ` Pascal Obry
  2002-01-22 21:27           ` Frank
@ 2002-01-23 19:31           ` Tomas Hlavaty
  2002-01-23 20:14             ` Frank
  1 sibling, 1 reply; 12+ messages in thread
From: Tomas Hlavaty @ 2002-01-23 19:31 UTC (permalink / raw)


Pascal Obry wrote:
> 
> Tomas Hlavaty <hlavaty@labe.felk.cvut.cz> writes:
> 
> > Maybe, the problem lies in that I have two RCI partitions which are the
> > same, i.e. they provide the same services. So I can't write
> >
> > ...
> > Partition_A, Partition_B : Partition
> >
> > for Partition_A'Host use "this.that.there"
> > for Partition_B'Host use "some.where.else"
> >
> > procedure Server_A is in Partition_A;
> > procedure Server_B is in Partition_B;
> > ...
> >
> > as Frank suggests.
> >
> > The situation is as follows:
> >
> > +-------------+   +-------------+   +-------------+
> > +-------------+
> > | Machine_A1  |   | Machine_A2  |   | Machine_A3  |  ...  | Machine_An
> > |
> > | Partition_1 |   | Partition_1 |   | Partition_1 |       | Partition_1
> > |
> > +---------+---+   +---+-----+---+   +-------------+
> > +---+---------+
> >           |           |     |                                 |
> >           \-----+-----/     \-----+---------------------------/
> >                 |                 |
> >          +------+------+   +------+------+
> >          | Machine_B1  |   | Machine_B2  |  ...
> >          | Partition_2 |   | Partition_2 |
> >          +-------------+   +-------------+
> >
> > where Partition_1 is a program collecting data from somewhere (not
> > interesting) that is executed on Machine_Ai as a daemon. Partition_2 is
> > a program simultaneously displaying data collected by any two
> > Partitions_1. A user specify Machine_Aj and Machine_Ak dynamically when
> > he wants to execute a Partition_2 on Machine_Bl.
> >
> > Isn't it to complicated? May be there is something wrong in the
> > structure of the distributed system. Should it be partitioned in a
> > different way?
> 
> Yes. What you described is not achievable with RCI. It is just not possible to
> have 2 instances of the same RCI on the distributed application. You should
> definitely have a look at the RACW. This will make this architecture possible.
> 
> In short:
> 
> - create a partation "Manager" that will server as a name server.
> 
> - create Partition_1 as a RACW partition, each one will register to the
>   manager with a specific name (string)
> 
> - Partition_2 will request 2 Partition_1 using the name server.
> 
> This is a short description I agree. Have a look at the GLADE bank example
> which is somehow similar. And be sure to read the documentation, as you seem
> quite confused it could be possible that you have just skipped this step :)

Thanks. That's a solution.

But the partition manager (main/boot partition) is a strong centralised
element which is the bottleneck of the system. All partitions would have
the partition manager as a boot server. Several problems arises then:
What about unreliable communication channels? Where should it be
located?... I think the situation wouldn't be better by using mirror
boot servers. Maybe I'm too interested in low-level details, but such
questions are important for our application: it is an industrial
application which should be tolerant to connection errors with distant
Partitions_1. Is it possible to split the system, restrict dependencies
and not to build one complex distributed system for all Partitions_1?

I'd like to find a solution using Glade first, because the current
implementation is in it and it saves a lot of work. The current
implementations is standard client/server application. But our customer
changed its specification and he wants to see data from at least two
Partitions_1 simultaneously in one window.

E.g. using sockets it is possible to have a client connected to two
servers. The connection is established only by knowing "host:port" for
each server. In Glade, the client have to connect to a boot server and
then get a link to the other server through an access-to-?-type. But it
leads to building very dependent systems. Could you suggest another
solution?

Thanks a lot, its very instructive discussion for me.

Tomas

P.S.: We use GNAT 3.13 on Linux (RT for Machine_Ai)...



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Client connected to two servers in Glade
  2002-01-23 19:31           ` Tomas Hlavaty
@ 2002-01-23 20:14             ` Frank
  0 siblings, 0 replies; 12+ messages in thread
From: Frank @ 2002-01-23 20:14 UTC (permalink / raw)


>
> But the partition manager (main/boot partition) is a strong centralised
> element which is the bottleneck of the system. All partitions would have
> the partition manager as a boot server. Several problems arises then:
> What about unreliable communication channels? Where should it be
> located?... I think the situation wouldn't be better by using mirror
> boot servers. Maybe I'm too interested in low-level details, but such
> questions are important for our application: it is an industrial
> application which should be tolerant to connection errors with distant
> Partitions_1. Is it possible to split the system, restrict dependencies
> and not to build one complex distributed system for all Partitions_1?
>
> I'd like to find a solution using Glade first, because the current
> implementation is in it and it saves a lot of work. The current
> implementations is standard client/server application. But our customer
> changed its specification and he wants to see data from at least two
> Partitions_1 simultaneously in one window.
>
> E.g. using sockets it is possible to have a client connected to two
> servers. The connection is established only by knowing "host:port" for
> each server. In Glade, the client have to connect to a boot server and
> then get a link to the other server through an access-to-?-type. But it
> leads to building very dependent systems. Could you suggest another
> solution?
>
> Thanks a lot, its very instructive discussion for me.
>

If it is so that you have only one user interface client:
Wouldn't it be a solution to put the server close to your clients office?
Then it is only necessary to have open lines from his office to the nodes.
If one of the nodes
is unavailable then the fun is over anyway wether you use sockets or not.
The same goes for the boot location, your customers office is the only node
(??)  that needs
communication to the other for the other purposes too.
If your lines keeps dropping, you might catch some exceptions in the
application to retry later.



About my question of the versions. I have a couple of problems with GLADE,
and it would be interesting if
someone with a 3-14 or higher could have tested a little program for me :-)
???

Frank










^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-01-23 20:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-16 10:26 Client connected to two servers in Glade Tomas Hlavaty
2002-01-16 18:05 ` Pascal Obry
2002-01-18 17:11   ` Tomas Hlavaty
2002-01-18 17:47     ` Frank
2002-01-18 17:48     ` Pascal Obry
2002-01-22 14:49       ` Tomas Hlavaty
2002-01-22 19:49         ` Pascal Obry
2002-01-22 21:27           ` Frank
2002-01-22 22:17             ` Pascal Obry
2002-01-22 22:23             ` Michal Nowak
2002-01-23 19:31           ` Tomas Hlavaty
2002-01-23 20:14             ` Frank

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