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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d46468aa410c0403 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!news.highwinds-media.com!newspeer1-win.ntli.net!newsfe1-win.ntli.net.POSTED!53ab2750!not-for-mail From: "Dr. Adrian Wrigley" Subject: Re: Distributed Ada, robustness etc. User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-ID: Newsgroups: comp.lang.ada References: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Date: Thu, 25 May 2006 01:12:08 GMT NNTP-Posting-Host: 82.10.238.153 X-Trace: newsfe1-win.ntli.net 1148519528 82.10.238.153 (Thu, 25 May 2006 02:12:08 BST) NNTP-Posting-Date: Thu, 25 May 2006 02:12:08 BST Organization: NTL Xref: g2news2.google.com comp.lang.ada:4438 Date: 2006-05-25T01:12:08+00:00 List-Id: On Tue, 23 May 2006 12:14:05 +0000, Dr. Adrian Wrigley wrote: > Up until now, I have been using fairly elementary Annex E features > with GNAT/GLADE on Linux. Hmm. Seems to have gone quiet round here! OK. I've prototyped a system based on LRM E.4.2 (p. 412), where a Remote_Call_Interface unit registers servers as they are instantiated. This will work nicely, except for the single point of failure issue resulting from having RCI units, and the following nuisance: EITHER every subprogram declaration using the remote despatching type has to refer to it as "access Tape" (or whatever the type is called), procedure Rewind (T : access Tape) is abstract; -- need to add "access" ... TapeAccess := Find ("NINE-TRACK"); ... Rewind (TapeAccess); Or every despatching call needs to dereference an access variable (so calls become something like "Tapes.Rewind (TapeAccess.all);") procedure Rewind (T : Tape) is abstract; ... TapeAccess := Find ("NINE-TRACK"); ... Rewind (TapeAccess.all); -- Need to add ".all" for every call! I'd rather not change all my code to say "access" or "all" every time I define or use one of these calls (lazy). The only solution I have come up with to avoid modifying the existing code to have "all" with every call is to define a corresponding set of subprograms which take the access values as parameters, and call the underlying (remote) despatching interface by dereferencing it in the body. So the code would become: procedure Rewind (T : Tape) is abstract; -- unchanged code procedure Rewind (T : access Tape) is begin Rewind (T.all); end Rewind; ... TapeAccess := Find ("NINE-TRACK"); ... Rewind (TapeAccess); -- unchanged code Am I missing a better, more obvious solution? (interestingly, the remote despatching call may fail from communications errors or other failure. The corresponding non-remote call can handle the exception by using the "Find" to get another server to call instead, or take other recovery actions. Perhaps this is the way to go...) I'm still thinking about eliminating the RCI failure point. I'm wondering whether Annex E has ever been used as a basis for a big commercial project... -- Adrian