Laran Coates wrote:
>
> I've just started digging into Avalon and Cocoon. I've read all the docs
> and looked over a lot of the source code. I'm curious to know more about
> how you think the Monitor framework would emulate, if not override Cocoon.
> Could you either explain a bit or point me to packages that perform the role
> of monitoring now?
Currently, Cocoon asks a File or class if it has been modified since time X
for each request. This is a little bit of overhead, and adds a little bit of
stress to the filesystem in that it must be queried for the current timestamp.
If the test returns true, then Cocoon must do whatever is required to update
that information.
The Monitor Framework is an active entity that handles the tests separate from
the request framework. In other words, the request only needs to get the contents
of the resource, and the filesystem is spared the extra overhead. The logic
to handle a changed resource does not change, but it is initiated by the Monitor,
not the request system.
To bring it in the real world, a production web server can see upwards of 1000
requests per second--each with a test for the timestamp of the file resource.
This overhead is not necessary, and possibly even harmful. Most modern operating
systems cache such information so that you are really getting the information
from the cache anyway. However, the lower the number of system calls from the
JVM, the better.
With the afforementioned example, the ActiveMonitor can poll all its resources
once every minute. If the resource has changed durring that time, we can easily
handle that. This limits the number of filesystem calls to 1 per minute (60000
times less than before).
In fact, the ActiveMonitor approach can handle changes to resources as often
or as little as you like.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]