comp.lang.ada
 help / color / mirror / Atom feed
* Re: [Q]: Distributed System Annex DSA
@ 1996-09-21  0:00 Douglas Rupp
  1996-09-24  0:00 ` Mike Stark
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Douglas Rupp @ 1996-09-21  0:00 UTC (permalink / raw)



Reposting article removed by rogue canceller.

Robert A Duff <bobduff@world.std.com> wrote:
>Any sufficiently advanced technogoy is indistinguishable from magic.
>Who said that?  ;-)"

This sounds like the sci fi author E. E. "Doc" Smith.




^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [Q]: Distributed System Annex DSA
@ 1996-09-21  0:00 Douglas Rupp
  0 siblings, 0 replies; 18+ messages in thread
From: Douglas Rupp @ 1996-09-21  0:00 UTC (permalink / raw)



Robert A Duff <bobduff@world.std.com> wrote:
>Any sufficiently advanced technogoy is indistinguishable from magic.
>Who said that?  ;-)"

This sounds like the sci fi author E. E. "Doc" Smith.




^ permalink raw reply	[flat|nested] 18+ messages in thread
* [Q]: Distributed System Annex DSA
@ 1996-09-09  0:00 Jonas Nygren
  1996-09-09  0:00 ` Jonas Nygren
  1996-09-09  0:00 ` Samuel Tardieu
  0 siblings, 2 replies; 18+ messages in thread
From: Jonas Nygren @ 1996-09-09  0:00 UTC (permalink / raw)



For Gnat there now is a release of support for DSA. So I thought
it was time to get an understanding what DSA can do for me. I have
a few questions around this topic after trying to understand what
the Rational and the RM's texts on this feature. (If you can point me
to some more good educational text for DSA I would appreciate that.)

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

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

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

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

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

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

Any help appreciated!

Thanks in advance,

/jonas

-- Tape example from Ada RM e.4.2

(2)
       package Tapes is
          pragma Pure(Tapes);
          type Tape is abstract tagged limited private;
          -- Primitive dispatching operations where
          -- Tape is controlling operand
          procedure Copy (From, To : access Tape; Num_Recs : in Natural)
is abstract;
          procedure Rewind (T : access Tape) is abstract;
          -- More operations
       private
          type Tape is ...
       end Tapes;
(3)
       with Tapes;
       package Name_Server is
          pragma Remote_Call_Interface;
          -- Dynamic binding to remote operations is achieved
          -- using the access-to-limited-class-wide type Tape_Ptr
          type Tape_Ptr is access all Tapes.Tape'Class;
          -- The following statically bound remote operations
          -- allow for a name-server capability in this example
          function  Find     (Name : String) return Tape_Ptr;
          procedure Register (Name : in String; T : in Tape_Ptr);
          procedure Remove   (T : in Tape_Ptr);
          -- More operations
       end Name_Server;
(4)
       package Tape_Driver is
         -- Declarations are not shown, they are irrelevant here
       end Tape_Driver;
(5)
       with Tapes, Name_Server;
       package body Tape_Driver is
          type New_Tape is new Tapes.Tape with ...
          procedure Copy
           (From, To : access New_Tape; Num_Recs: in Natural) is
          begin
            . . .
          end Copy;
          procedure Rewind (T : access New_Tape) is
          begin
             . . .
          end Rewind;
          -- Objects remotely accessible through use
          -- of Name_Server operations
          Tape1, Tape2 : aliased New_Tape;
       begin
          Name_Server.Register ("NINE-TRACK",  Tape1'Access);
          Name_Server.Register ("SEVEN-TRACK", Tape2'Access);
       end Tape_Driver;
(6)
       with Tapes, Name_Server;
       -- Tape_Driver is not needed and thus not mentioned in the
with_clause
       procedure Tape_Client is
          T1, T2 : Name_Server.Tape_Ptr;
       begin
          T1 := Name_Server.Find ("NINE-TRACK");
          T2 := Name_Server.Find ("SEVEN-TRACK");
          Tapes.Rewind (T1);
          Tapes.Rewind (T2);
          Tapes.Copy (T1, T2, 3);
       end Tape_Client;




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

end of thread, other threads:[~1996-09-26  0:00 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-09-21  0:00 [Q]: Distributed System Annex DSA 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
  -- strict thread matches above, loose matches on Subject: below --
1996-09-21  0:00 Douglas Rupp
1996-09-09  0:00 Jonas Nygren
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
1996-09-09  0:00 ` Samuel Tardieu

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