comp.lang.ada
 help / color / mirror / Atom feed
From: Samuel Tardieu <sam@ada.eu.org>
To: ehsjony@ehs.ericsson.se
Subject: Re: [Q]: Distributed System Annex DSA
Date: 1996/09/09
Date: 1996-09-09T00:00:00+00:00	[thread overview]
Message-ID: <qw6buff7ps9.fsf@gargantua.enst.fr> (raw)
In-Reply-To: 3233EF42.702C@ehs.ericsson.se


>>>>> "Jonas" == Jonas Nygren <ehsjony@ehs.ericsson.se> writes:

Jonas> Now to my questions for which I use the example of Tape_Driver
Jonas> given in Annex E of the RM. I attach the code from the RM at
Jonas> the end of this posting.

Jonas> 1) When I studied this example I got the impression that the
Jonas> three parts Name_Server, Tape_Server and Tape_Client all could
Jonas> run in different partitions (and on different nodes). What
Jonas> confuses me is that the Name_Server does not have any 'pragma
Jonas> Remote_Call_Interface' and in the explaining text it is
Jonas> referred to as a 'normal package'. Does this imply that
Jonas> Tape_Client and Tape_Server must be co-located in the same
Jonas> partition? If not, how does the compiler know that
Jonas> Tape_Server's interfaces (Copy, Rewind) should be constructed
Jonas> to receive remote calls?

Mmm... Seems like you wrote this in a hurry: the example you gave at
the end of your posting DO have a "pragma Remote_Call_Interface" just
after the "package Name_Server is" line. I suspect you are using an
old paper version of the RM and quoted it from the latest online
version. In the latest version, Name_Server is not referred to as a
'normal package': "Name_Server is a remote call interface package and
is elaborated in a separate active partition to provide the necessary
naming services ...", so your question is quite inappropriate :)

Jonas> 2) I have come to regard the package Tapes as the 'contract' of
Jonas> a tape service. Would this be the right place to enforce
Jonas> constraint and state checks to strengthen the consistency of
Jonas> the interface. State information would then be stored in the
Jonas> Tape (tagged) record. Are there any negative consequences in
Jonas> this approach and are there better ways to do this?

Since the Tape object itself won't migrate from one partition to the
other (all the primitive operations will be executed remotely), the
only overhead with extra check will be the one of the extra remote
calls needed, but this is IMHO the right approach.

Jonas> 3) With CORBA and other similar technologies there is often
Jonas> much discussions on the need for threads in servers. My third
Jonas> question is about if and how one can use Ada tasks to achieve
Jonas> this in one remote active partition.

If I understand your concern correctly, my answer is "don't worry
about this" (see below).

Jonas> One example in the Rationale showed how one could link together
Jonas> a number of active Worker partitions with a Controller
Jonas> partition and how these partitions could be distributed on
Jonas> different nodes. But nothing with tasks involved.

Jonas> My question is really if it is possible to multi-plex several
Jonas> service sessions on one partition. E.g. If Client A and B
Jonas> issues requests to the server 'at the same time' - how do I
Jonas> design the server so that these two calls can be overlapping
Jonas> and executed in parallel.

You don't have to do anything special: the requests will be handled
concurrently in two different tasks. The only thing you have to take
care of is synchronization if the remote procedures have to modify a
global object; in this case, you may need protected types.

Maybe you should try the DSA for GNAT 3.05; it's located at URL

     ftp://ftp.cs.nyu.edu/pub/gnat/dsa/dsa-1.0.tar.gz

  Sam
-- 
  Samuel Tardieu -- sam@ada.eu.org




  reply	other threads:[~1996-09-09  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-09  0:00 [Q]: Distributed System Annex DSA Jonas Nygren
1996-09-09  0:00 ` Samuel Tardieu [this message]
1996-09-09  0:00 ` Jonas Nygren
1996-09-10  0:00   ` Robert A Duff
1996-09-12  0:00     ` Jonas Nygren
1996-09-12  0:00       ` Robert A Duff
1996-09-13  0:00         ` Philip Brashear
1996-09-21  0:00           ` Robert Dewar
1996-09-21  0:00           ` Robert Dewar
1996-09-26  0:00             ` Dale Stanbrough
1996-09-12  0:00   ` Samuel Tardieu
1996-09-13  0:00   ` Jon S Anthony
  -- strict thread matches above, loose matches on Subject: below --
1996-09-21  0:00 Douglas Rupp
1996-09-24  0:00 ` Mike Stark
1996-09-24  0:00 ` Art Schwarz
1996-09-24  0:00 ` Mark A Biggar
1996-09-25  0:00 ` Alan Brain
1996-09-21  0:00 Douglas Rupp
replies disabled

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