On Wed, 15 Aug 2001, Berin Loritsch wrote:

> I added a new package in Excalibur that will be used for
> monitoring resources.  There will be two monitors: passive
> and active.  The passive monitor will rely on the Resources
> themselves to keep up to synch.  This is not that exciting,
> but easy to write.  The second is an Active Monitor.  The
> Active Monitor will issue one or more threads to examine
> the group of resources based on the policies used.  When
> a Resource has changed, it will propogate that change to
> all PropertyChangeListeners examining the resource.

This would be great (the active one); I think James would surely need,
especially James which is setup to use database repositories. Currently,
I'm having problems with run-out database connections. I'd like to be able
to monitor the number of the database connections used and also the
delivery threads that utilize those connections. The monitor thread(s)
could see whether the connections used have reached a certain threshold,
and would kill some of the delivery threads until the connections used are
below the safe number. (It would be nice to be able to kill "low-priority" 
threads first; ie: the ones which handles email with certain sender
addresses, but this is James implementation problem, I think.)

BTW, it would be great also if the Monitor runs relatively decoupled with
the (blocks) it monitors. It should be the case, I think. Say, in case of
James, the Monitor could suspend James for a while when the database
server is not available. I believe there would be little changes in James
to utilize such monitor, all it needs is just to register to the Monitor
with resources to be monitored, and also some listeners that should be put
into place.
 
> This opens up a whole new realm to the Caching implementation,
> which can confidently serve old content until it is told there
> is new information.  In fact, it can continue to serve the older
> content until the new information is loaded into the cache.

Having a global cache (which is an Avalon block) would be neat, I believe.
I'd like to have global caches that are easily to set up; ie: via the
config.xml, something like:
<config>
  <my-global-caches>
    <cache name="mycache1">
      <!-- some parameters you can think of here -->
    </cache>
    <cache name="mycache2">
      <!-- these too -->
    </cache>
  </my-global-caches>
</config>

Each cache shoud be a singleton, I think; otherwise, it wouldn't be global
one, right? And due to how easy it is to create a thread in Java, the
caches should be threadsafe. Then from the components that use any of the
caches, all what's needed is just to use the component selector to get the
right cache by the name. 
 
> All this comming soon.

Could no longer wait.

Oki



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to