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=0.7 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!mcgill-vision!bloom-beacon!snorkelwacker!usc!ucsd!ucsdhub!hp-sdd!ncr-sd!ncrcae!hubcap!billwolf%hazel.cs.clemson.edu From: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu (William Thomas Wolfe, 2847 ) Newsgroups: comp.lang.ada Subject: How do you do this in Ada? Message-ID: <8364@hubcap.clemson.edu> Date: 13 Mar 90 17:57:33 GMT References: <1990Mar13.162411.15058@planck.uucp> Sender: news@hubcap.clemson.edu Reply-To: billwolf%hazel.cs.clemson.edu@hubcap.clemson.edu List-Id: (Another article from comp.software-eng which should have gone to comp.lang.ada originally...) >From westley@corsair.uucp (Terry J. Westley): We are building a real-time radar simulation on a distributed network of ~35 Sun workstations and ~35 68030 CPU boards (Motorola MVME147 specifically). Parts of the network will be Ethernet; the backbone will be FDDI. Now, for my question: I have approximately 200 unique messages that are transmitted over the net among all the various nodes. How do I send a particular Ada object of some arbitrary record type to another node while: 1) preserving strong typing -- I don't want to have to convert everything to some common structure such as an array of bytes 2) reducing messages to the smallest possible size -- I need to reduce the net traffic as much as possible -- as you know, there are numerous challenges relating to using variant record structures while trying to achieve this goal 3) avoiding giving global visibility to all message types to all program units I started out by writing a LAN interface package as a generic patterned after sequential_io. You instantiate it with the particular variant record structure that applies to the sender and receiver of that particular data. I also imported a function to determine the size of a particular record so that I wouldn't always be sending the maximum size of the record. The major problem with this is that I have many different combinations of messages to be sent to each destination. Here is a much simplified example of this problem. Suppose I have three elements that need to communicate: Element # Runs on Processor Needs message types --------- ---------------- ------------------- 1 A a, b, c 2 B b, c 3 C a, c I could build a variant record structure of message types a, b, and c. However, then Element 2 and 3 have visibility to message types they have no business seeing. I can't build three variant records (a-b-c, b-c, and a-c) because the record types will now be incompatible. Any ideas? Terry J. Westley Arvin/Calspan Advanced Technology Center P.O. Box 400, Buffalo, NY 14225 acsu.buffalo.edu!planck!westley@hercules