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-7-bit X-Google-Thread: 103376,7df2baf73b28aa5d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-04 10:48:26 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: jpwoodruff@irisinternet.net (John Woodruff) Newsgroups: comp.lang.ada Subject: Re: socket, pipe Date: 4 Nov 2003 10:48:25 -0800 Organization: http://groups.google.com Message-ID: <34defe4d.0311041048.252b191@posting.google.com> References: <56a4b188.0311040645.64f825f7@posting.google.com> NNTP-Posting-Host: 66.248.85.185 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1067971706 2536 127.0.0.1 (4 Nov 2003 18:48:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 4 Nov 2003 18:48:26 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:2056 Date: 2003-11-04T10:48:25-08:00 List-Id: eieio@coastalnet.com (ghostie) wrote in message news:<56a4b188.0311040645.64f825f7@posting.google.com>... > I'm quite the Ada newbie. I'm really a C++ programmer. But I've been > tasked with making a change to an Ada application that we have, and > would appreciate some help getting started. Please be patient. > > We want our Ada application, while running, to share a lot of binary > information with a different application, this one written in Matlab. > Each applicaton will produce output data which will be used by the > other application. Both applications will run on Win2K PCs, and they > may or may not be on the same computer. The issue I would decide first is whether data transport through a file is adequate. If yes, life will be much easier, since each application stands alone and the intermediate file can be examined carefully to assure that the interface is met. However, this will be somewhat slower, so might not meet performance req's. If file transport is OK, then Ada IO using sequential_io should be fairly straightforward. However if the communication is bi-directional, or "real" time linkage is required, then you will have to communicate between the processes. What is the interface that the Matlab app defines? The incoming data structure defined by the Matlab program can be described in Ada using "representation clauses" to assure that the parameters sent by Ada to Matlab conform to the spec. One more prospect: could the Matlab app be encapsulated into a CORBA-compliant program? If so, then you could define the interface in CORBA IDL, and let the IDL-generated interface *in each language* solve the issue of parameter types. In my opinion, using the direct connection through pipes (for example) is the most demanding because of the difficulty of matching the calling conventions of the two language compilers *exactly*. (Failing to match exactly will cause obscure crashes in the invoked program; the practical fix for this is long hours at the debugger and painstaking care with representation clauses.) Best John