Active object design pattern ----- somewhat over hyped?
From: Generic Usenet Account (usenet_at_sta.samsung.com)
Date: 12/22/03
- Next message: Dave Harris: "Re: Terminology"
- Previous message: EventHelix.com: "Re: How to start with OOP?"
- Next in thread: thoff: "Re: Active object design pattern ----- somewhat over hyped?"
- Reply: thoff: "Re: Active object design pattern ----- somewhat over hyped?"
- Reply: Cristiano Sadun: "Re: Active object design pattern ----- somewhat over hyped?"
- Reply: Daniel T.: "Re: Active object design pattern ----- somewhat over hyped?"
- Reply: H. S. Lahman: "Re: Active object design pattern ----- somewhat over hyped?"
- Reply: Uncle Bob (Robert C. Martin): "Re: Active object design pattern ----- somewhat over hyped?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Dec 2003 14:34:01 -0800
For all these years I have, somewhat religiously, accepted the fact
that by providing a neat abstraction for threads in a multi-threaded
environment, the active object design pattern allows the threading
architecture of a process to be changed with minimal impact. I was
recently explaining this design pattern to a relatively inexperienced
team member in our group, who, unlike me, tends not to believe things
at face value. My colleague accepted my statement somewhat
skeptically, but he returned the next day and pointed out to a hole in
my understanding. He has now convinced me that the whole notion that
collaborators of active objects don't need to be aware of whether the
method they are invoking on the active object is getting invoked in
the collaborator's thread or the active object's intrinsic thread is
** over simplistic **.
While this claim is true for "asynchronous" method calls, it is not
true for blocking calls. When a collaborator makes a blocking method
call on an object, the focus of control passes (so as to speak) from
the collaborator to the object. The focus of control does not return
to the collaborator until the method has completed execution. Now, if
the object is suddenly made an active object, the method execution and
method invocation are decoupled. When the collaborator invokes the
method, the request is stored in an "activation list" and the focus of
control returns to the collaborator right away i.e. before the active
object actually processes the request in its intrinsic thread. There
may be situations where this distinction is not important, but to
emphatically claim that the thread in which the method is invoked is
transparent to the collaborator is a stretch.
Any thoughts?
Regards,
KP Bhat
- Next message: Dave Harris: "Re: Terminology"
- Previous message: EventHelix.com: "Re: How to start with OOP?"
- Next in thread: thoff: "Re: Active object design pattern ----- somewhat over hyped?"
- Reply: thoff: "Re: Active object design pattern ----- somewhat over hyped?"
- Reply: Cristiano Sadun: "Re: Active object design pattern ----- somewhat over hyped?"
- Reply: Daniel T.: "Re: Active object design pattern ----- somewhat over hyped?"
- Reply: H. S. Lahman: "Re: Active object design pattern ----- somewhat over hyped?"
- Reply: Uncle Bob (Robert C. Martin): "Re: Active object design pattern ----- somewhat over hyped?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|