Implementation of a fixed size pool of Objects in a distributed application
must consider problems caused by the unpredictable nature of remote
connections. An implementation is presented here for Java's Remote Method
Invocation, which takes advantage of the Distributed Garbage Collector to
solve those problems.
You're probably familiar with the mechanism of a fixed size pool of Objects,
in the context of a memory management system, that keeps memory in a fixed
size buffer pool. The idea is to manage the use of a scarce resource by
requiring Objects to be checked out of and into a pool. When all Objects are
checked out, the pool is empty; clients cannot check out any more, until a
claimed one is checked back in. When a client is done with an Object, it is
expected to check the Object back into the pool so that other clients may
claim it.
Aside from memory manageme... (more)
The Observer Design Pattern is among the most useful for object-oriented
software design. The JDK itself makes heavy use of a variant of this pattern
in the 1.1 AWT event delegation model. The JDK also provides a reusable
embodiment of the pattern in the form of the java.util.Observer interface and
the java.util.Observable class. If you've done much serious Java programming
you've more than likely had occasion to use these classes.
The idea of the pattern is to model a one-to-many dependency without tightly
coupling the observed object with its many observers. When the observed
... (more)