From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ddc3fe6a39c3123d X-Google-Attributes: gid103376,public From: Samuel Tardieu Subject: Re: [Q]: Distributed System Annex DSA Date: 1996/09/09 Message-ID: #1/1 X-Deja-AN: 179458629 sender: tardieu@gargantua.enst.fr references: <3233EF42.702C@ehs.ericsson.se> to: ehsjony@ehs.ericsson.se content-type: text/plain; charset=iso-8859-1 organization: TELECOM Paris mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-09-09T00:00:00+00:00 List-Id: >>>>> "Jonas" == Jonas Nygren 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