comp.lang.ada
 help / color / mirror / Atom feed
From: Michael Lamarre <usdmike@yahoo.com>
Subject: Re: Help with a Remote Type / Iterator
Date: Wed, 03 Dec 2003 04:46:06 GMT
Date: 2003-12-03T04:46:06+00:00	[thread overview]
Message-ID: <iUdzb.762$rE3.308@twister.socal.rr.com> (raw)
In-Reply-To: <K7CdnUSBpMQ-gFCi4p2dnA@comcast.com>

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.




  reply	other threads:[~2003-12-03  4:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-01  3:48 Help with a Remote Type / Iterator Michael Lamarre
2003-12-01  5:31 ` Robert I. Eachus
2003-12-01 13:37   ` Michael Lamarre
2003-12-02 23:17     ` Robert I. Eachus
2003-12-03  4:46       ` Michael Lamarre [this message]
2003-12-01 23:00 ` Nick Roberts
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox