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-Language: ENGLISH,ASCII
X-Google-Thread: 103376,fd0ee7c9be011576
X-Google-Attributes: gid103376,public
X-Google-ArrivalTime: 2001-03-02 01:46:06 PST
Path:
supernews.google.com!sn-xit-03!supernews.com!freenix!jussieu.fr!opentransit.net!news.tele.dk!134.222.94.5!npeer.kpnqwest.net!news.edf.fr!not-for-mail
From: Pascal Obry
Newsgroups: comp.lang.ada
Subject: Re: Ada Annex E (Just curious :-)
Date: 02 Mar 2001 10:38:39 +0100
Organization: Electricite De France - http://www.edf.fr
Sender: obry@CLN46GB
Message-ID:
References:
NNTP-Posting-Host: cln46gb.der.edf.fr
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: clnews.edf.fr 983526134 26408 130.98.42.146 (2 Mar 2001 09:42:14 GMT)
X-Complaints-To: newsadm@news.edf.fr
NNTP-Posting-Date: 2 Mar 2001 09:42:14 GMT
User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7
Xref: supernews.google.com comp.lang.ada:5371
Date: 2001-03-02T09:42:14+00:00
List-Id:
"Frank" writes:
> Hi!
>
> I have read a bit in the Annex E.
> Could someone refer me to a example source code? Most preferably not an
> example larger than
> "send an integer from one partition to another that prints it on screen" or
> something like that :-)
Ok, what about an Hello World example ?
Client partition:
with Message;
with Ada.Text_IO;
procedure Hello is
begin
Ada.Text_IO.Put_Line (Message.Hello_World);
end Hello;
Server partition:
package Message is
pragma Remote_Call_Interface;
function Hello_World return String;
end Message;
package body Message is
function Hello_World return String is
begin
return "Hello World !";
end Hello_World;
end Message;
Configuration script:
configuration Dist is
pragma Starter (None);
pragma Boot_Location ("tcp", "mycomputer:5557");
Client : Partition;
procedure Hello is in Client;
Serveur : Partition := (Message);
end Dist;
As you see the only "Annex E" specific feature here is the pragma
Remote_Call_Interface. The very same program can be built as a non distributed
application with:
$ gnatmake hello
Of course this is only the visible part of the iceberg !!! The Annex E is
really powerfull. The mode above is a "distributed" one. But you can also
build client/server applications. The server is alive and does not stop after
the communicating with the client.
I've built some medium client/server applications with GLADE and must say that
I'm always amased by this technology. I'm not a netw otherwise the issue will boil out in business complexity of some kind:-))
I understand but as I said the Annex E is really big. For example I have done
a simple Chat program, it is a small program and very easy to understand.
> And also a link or example on how partitions are set up?
See above.
>
> Would like to try it in Linux RedHat6.2 with gnat 3.13 (if feasible :-)
Of cource !
> As I already am writing a question here:-)
> I have also read abot ADEPT, but the info seems old, and only for Sun.
> Does any similar interface solution exist for Linux for Ada to Java?
Yes ADEPT is old. The right choice is GLADE.
Now I'm still wondering why no other Ada vendors have implemented this Annex ?
This is a real plus for Ada... Of course they will say that there is no market
for that... But sometime verdors should "push" the market, at least that easy
to say :)
Pascal.
--
--|------------------------------------------------------------
--| Pascal Obry Team-Ada Member |
--| |
--| EDF-DER-IPN-SID- T T I |
--| Intranet: http://cln46gb |
--| Bureau N-023 e-mail: p.obry@der.edf.fr |
--| 1 Av G�n�ral de Gaulle voice : +33-1-47.65.50.91 |
--| 92141 Clamart CEDEX fax : +33-1-47.65.50.07 |
--| FRANCE |
--|------------------------------------------------------------
--|
--| http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"