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-02 20:46:10 PST Path: archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!crtntx1-snh1.gtei.net!news.gtei.net!newsfeed1.easynews.com!easynews.com!easynews!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: Wed, 03 Dec 2003 04:46:06 GMT NNTP-Posting-Host: 66.91.228.213 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1070426766 66.91.228.213 (Tue, 02 Dec 2003 20:46:06 PST) NNTP-Posting-Date: Tue, 02 Dec 2003 20:46:06 PST Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:3084 Date: 2003-12-03T04:46:06+00:00 List-Id: Robert I. Eachus wrote: > > I think I see what you are saying here, but I don't like the way you are > saying it. ;-) You have a server which will create collections and pass > them to clients to process. Why the change? With your conditions, > there is no explicit need for a protected collection type. The server > puts together collections and based on some trigger, it passes > collections to clients to process. This is easy to model in Ada with > one server task and many clients. DO THAT. D'oh! You misunderstood. In the server, we are building COLLECTION_TYPEs. (And as you allude to later, we are building them as lists, but we convert them to array-based structures, but that's beside the point.) We then stick the collections into an abstract state machine that is an RCI package. There is a protected object in the body of this RCI package. The clients "pick up" the collections from the RCI package after the server puts them in there. The RCI package is the mechanism by which the clients and server synchronize their actions. > > A bunch of other stuff I couldn't possibly address one point at a time... > Sorry to be so unclear about all of this stuff. It is hard to describe a problem without talking about the details. Even if I wanted to go into details, it would be difficult. So far, this project has taken about 1500 SLOC, and that is WITH the advantage of being able to leverage a bunch of pre-existing infrastructure. However, I must say, thank you all for your help. I was able to implement an ugly looking active iterator. I won't even describe it as it is so ugly and embarassing. It isn't much to look at, but it does the trick. In the meantime, my mentor took a look at my code to see how I had been trying to use the passive iterator we'd implemented earlier. He suggested implementing an iterator via type extension. There is an example of this in the Rationale, though I found it in an online copy of the Style Guide at www.adaic.com first. I had seen it before, but didn't really understand it until I looked at it again this morning. For now, since my software is working, we're putting off changing from my ugly active iterator to the type extension iterator for a while. I like the type extension iterator though. It offers the safety of a passive iterator, but without most of the limitations. Anyway, we've got it figured out. Thanks to all for your suggestions! Hopefully, as I become more skilled in sofware engineering with Ada, I can become a helful member of this group. Thanks again. --Mike L.