egovconcepts / jacp

Automatically exported from code.google.com/p/jacp
0 stars 0 forks source link

Enhance ObserverThreads #16

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Problem:
at the moment we have a 1 to 1 hierarchy between perspective and observer and a 
1 to n relation between observer an components; all messages are added to 
blocking queue of observers so all components in one perspective can handle 
their messages sequential! The good thing is that perspective methods do not 
have to be synchronized because only one observer thread per perspective is 
accessing the methods. To avoid sequential handling of messages every component 
need his own observer thread (1 to 1) so perspective has to handle as much 
observers as active components! To achieve this goal we have to do following 
things:

1. create an observer pool which creates an observer per component
2. when new component is registered all observers have to be notified
3. when component is unregisterd all observers have to be notified and 
associated observer thread have to be stopped!
4. Perspective methods are now NOT thread save
4.1 synchronize it ?!?
4.2 create for each task (methods like delegate, replace, add) one deamon 
thread with a pool so every observer is placing his tasks in an special pool

Original issue reported on code.google.com by amo.a...@gmail.com on 3 Aug 2010 at 6:42

GoogleCodeExporter commented 9 years ago

Original comment by amo.a...@gmail.com on 18 Sep 2010 at 8:43

GoogleCodeExporter commented 9 years ago

Original comment by amo.a...@gmail.com on 12 Mar 2012 at 2:26