Re: Help with a Remote Type / Iterator
From: Robert I. Eachus (rieachus_at_comcast.net)
Date: 12/01/03
- Previous message: Michael Lamarre: "Help with a Remote Type / Iterator"
- In reply to: Michael Lamarre: "Help with a Remote Type / Iterator"
- Next in thread: Michael Lamarre: "Re: Help with a Remote Type / Iterator"
- Reply: Michael Lamarre: "Re: Help with a Remote Type / Iterator"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 01 Dec 2003 00:31:29 -0500
Michael Lamarre wrote:
> I have a record type I've defined in package A. In package A.CHILD, I
> want to define a type that is a collection of these records. For
> stylistic reasons, we'd rather declare all of the types in the spec and
> not have any incomplete type declarations in the spec. Both A and
> A.CHILD are REMOTE_TYPES (RT) packages.
>
> What we need is some kind of iterator for the collection type declared
> in A.CHILD. We've tried a passive iterator, but some of the stuff we
> need to do while iterating just won't work given that the passive
> iterator needs to take an access-to-subprogram parameter, which, in a RT
> package must be a remote subprogram. We need the flexibility of an
> active iterator.
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.
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.)
--
Robert I. Eachus
100% Ada, no bugs--the only way to create software.
- Previous message: Michael Lamarre: "Help with a Remote Type / Iterator"
- In reply to: Michael Lamarre: "Help with a Remote Type / Iterator"
- Next in thread: Michael Lamarre: "Re: Help with a Remote Type / Iterator"
- Reply: Michael Lamarre: "Re: Help with a Remote Type / Iterator"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|