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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ed1009970959aab0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-01 05:37:45 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!newsfeed.earthlink.net!cyclone.socal.rr.com!cyclone2.kc.rr.com!news2.kc.rr.com!twister.socal.rr.com.POSTED!53ab2750!not-for-mail From: Michael Lamarre User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Help with a Remote Type / Iterator References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Mon, 01 Dec 2003 13:37:44 GMT NNTP-Posting-Host: 66.91.228.213 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1070285864 66.91.228.213 (Mon, 01 Dec 2003 05:37:44 PST) NNTP-Posting-Date: Mon, 01 Dec 2003 05:37:44 PST Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:3050 Date: 2003-12-01T13:37:44+00:00 List-Id: Robert I. Eachus wrote: > This is not necessarily a solution, just trying to understand what you > are doing.... > > Do you really require that your iterator run on processor A, accessing > objects from processor B? If so it can be done. But as you sort of > point out, the problem is that you are trying to cram everything into > one package. I'm not sure that it is *required*, but that is the approach my mentor has been pushing, and it seemed to make some sense, so I was going along. I only started learning Ada about 4 or 5 months ago. Classwide types is one of the areas that I'm still not solid on. > > If you really need the data transfered from processor to processor, you > will need to provide 'Read and 'Write. These can be defined in terms of > the subcomponents for the actual type, see the Rationale, I think for > details. > > But I really suspect that you are confusing (in the other meaning of > confusing--mixing them together) two different things, a type which is a > remote type, and a local iterator over collections of objects of the > type. If the collections are distributed, you have a big design job > just defining what iteration means. (Do you want to iterate over a > snapshot of the container state, iterate over all the objects in a > particular partition, then do the next partition, iterate over all > partitions in parallel, or is there other implicit order of iteration, > etc.) > Basically, this program is a client/server program. One server, many clients. The server will piece together these COLLECTION_TYPEs, stick them in a protected structure, and then the clients will come by and process them. But each COLLECTION_TYPE must have its constituent elements processed in order. The collection will NOT be modified by the server once it is placed into the protected structure for the clients to retrieve it from. It almost sounds like you think that we're doing REMOTE_TYPES for the wrong reasons. That is something I started to wonder the other day. If it is such a pain in the butt to iterate over a distributed object, perhaps that's for a reason? (i.e., you shouldn't) Like I said, I'm still not entirely comfortable with classwide types, so I'm not really sure how to tell what types you would want to make REMOTE_TYPES and which to leave normal and just write 'Read and 'Write for. Are there any rules of thumb as to when it is appropriate to make a type a remote type? Thanks for your help. -- Mike L.