tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Interceptors
Date Thu, 25 Jan 2001 23:44:31 GMT
At 01:09  22/1/01 +0000, PSA wrote:
>> Under windows it gets it's events from a multitude of different sources
>> (some are grabbed from eventqueue, others from win32 hooks and others are
>> application created) then routes them through a central message queue and
>> central dispatching model. In many ways the way it works is similar to
>> hardwired valve style implementation. It is only at the upper layers where
>> it is transformed into the
>> preReleaseMouseButtonEventHookLudicrouselySizedMethod() and equivelent
>> postRelease*().
>Asynchronous messaging seems to be a very different animal to me than
>the very synchronous execution model of the valve system as implemented
>in catalina.  Messaging guarantees event delivery and order of
>delivery.  It disconnects the cause and effect processes -- sometimes at
>the expense of speed.

But in most windows systems except for a few the appearance of
"Asynchronous messaging" is just a simplification to help the developer
because it is really just synchronous. X, Win32, old MAC all go from
syn->async apearance

>> The advantage of hooks is also the speed of development - ie it takes about
>> 1/5 of the time to develope a hook based solution rather than a general
>> solution. The general solution first has to be general and then it has to
>> layer specificity on top of that (see below) which is even more work.
>This seems backward to me.  Abstraction shouldn't be carried farther
>than it needs to go. The system is built in modular form, but that form
>still has a very specific task.  There are levels of modularity in OOD. 
>What is too specific to be allowed outside the application is necessary
>internally.  And what is too specific application wide is necessary
>inside a module.  Specificity of function is as much a part of OOD as

I am not sure what you mean. It is standard that the more you invest in
something the more it pays of in long run. Certain OO practices decrease
initial build time but SOC and IOC are not such practices ;) Thou both pay
off in long run.

>> >The advantage of Hooks is that the programmer is only exposed to the
>> >very narrow complexity of a very specific event. The framework takes
>> >care of the rest.
>> Right but generally the good frameworks go
>> specificity -> general -> specificty
>This seems to describe TC3-HEAD, with the general interface for modules
>being plugged (as interceptors) into specific parts of the
>request/response processing.

Right. But unfortunately due to limitations of java (ie check for NULL ptr
before calling method) is not possible. Which is why that high levels of
differentiation is beneficial to speed in java.



| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message