Re: moniker design problem



Dietmar Maurer <dietmar ximian com> writes:

> Maciej Stachowiak wrote:
> 
> > Dietmar Maurer <dietmar ximian com> writes:
> >
> > > Hi everyone,
> > >
> > > I just detected a small design problem concerning the moniker interface.
> > > The problem is that shlib monikers are loaded into the address space of
> > > its parent moniker, and not into the address space of the calling
> > > process. This is especially a problem with monikers trying to implement
> > > something like a cache (leading to an out of process cache).
> > >
> > > Consider the following moniker:
> > >
> > > "file:/tmp/test.xmldb#cache#xmldb#config:/gnomeric/autoconf"
> > >
> > > where the "file:" and "xmldb:" moniker are "exe" type, and "config:" and
> > > "cache:" are "shlib" monikers.
> > >
> > > Resolving the above moniker in P0 leads to (where P0 is the current
> > > process, P? is another process):
> > >
> >
> > > P1                   P1    P2    P2
> > > file:/tmp/test.xmldb#cache#xmldb#config:/gnomeric/autoconf
> >
> > >
> > > Both shlib monikers are in the wrong process.
> > >
> >
> > Hi Dietmar,
> >
> > My knowledge here is hazy, but aren't monikers actually resolved left
> > to right, which means the actual results would be:
> >
> >
> > > P2                   P1    P1    P0
> > > file:/tmp/test.xmldb#cache#xmldb#config:/gnomeric/autoconf
> >
> >
> > And isn't this what you should actually want?
> 
> Yes, this is what we want.
> 
> > > A better solution would be to use a method which guarantees the right
> > > loading order. One way is to parse the moniker name from right to left,
> > > instead of left to right.
> >
> > Again I am confused, but I thought monikers were already parsed right
> > to left, but resolved left to right.
> 
> No, monikers are parsed left to right, and resolved right to left.
> 

Oh, right, that's what I meant, and I think that's what my diagram
shows (I confused right and left - now I remember the left hand is the
one with the watch).

Regards,

Maciej





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]