On Wed, Jun 27, 2001 at 12:50:48PM -0400, [EMAIL PROTECTED] wrote:
> 
> On 27-Jun-2001 Rocco Caputo wrote:
> > Of course it adds overhead.  The alternative is a monolithic system
> > without clearly defined and separated subsystems.  That would suck.
> > There would be only one kind of Kernel, and only one sort of Session,
> > and only one object layer.  They would all be inextricably intertwined
> > and a huge mess to maintain.
> 
> I've just taken a longish walk and thought a bit.  What I realised is
> that "Yes, People think Sessions are Objects".  Sessions can do
> inheritance (via object_states and package_states).  Each session can have
> instance variables (via $heap).  At the very least, POE::Components look
> very much like Objects.
> 
> Let's try to break this association.
> 
> My view of the object layer is that each Object would have a Session
> associated with it that would handle poe-related stuff.  I think you see
> it as one Session dealing with all the Objects.  Objects have to interact
> with the POE kernel (aka call back to POE kernel).  
> 
> Let me twiddle some code here.
> 
> > Your corollary is false.  Poe events are a low level transport for
> > high level object messages.
> 
> I disagree.  When you start using POE events to transport messages, you
> run into all the problems we've been talking about and the need for
> monitoring, which you take exception to.


I see Sessions as sessions.  That's why I originally named them that.
One session can invoke several objects, and an object environment can
have several sessions at once.

  1 kernel
     -> many environments
        -> many sessions per environment
           -> many objects per session

Objects don't interact directly with the Kernel.  They talk amongst
themselves with functions provided by the object layer.  The object
layer talks to the Kernel transparently on behalf of objects, as
necessary.  This is part of making objects more fun than sessions.

Since all object/kernel interaction goes through the object layer, it
can monitor everything that happens.

-- Rocco Caputo / [EMAIL PROTECTED] / poe.perl.org / poe.sourceforge.net

Reply via email to