On Thu, 2002-10-03 at 14:28, [EMAIL PROTECTED] wrote:
> !     /**
> !      * Initializes the NodeManager: determines the MMObjectBuilder if it was not 
>already known,
> !      * and fills the fields list.
> !      */
> !     synchronized protected void initManager() {
Should the bridge be aware of threads? There are 2 option:

-> Yes: This means that the cloud with an getCloud is almost everytime
the same cloud, the same applies for NodeManager and Nodes from the
bridge.
-> No: This means that the cloud is an new instance, meanining that the
cloud is mostly an wrapper around the core(which is thread aware).

I think that -not- making it thread aware is a good desision(thus
returning with every getCloud() a new Cloud instance and not an
-optionally- threated one).
Would you like to use the bridge over more than 1 thread you _should_
really be aware of what you are doing(and if you are doing this, there
are most likely also other variable's that need synchronization), and
you should ask yourselve the question if you really want to do this(and
we should test that it really is tread safe,....).
Futhermore doesnt need to contain the bridge.Node and bridge.NodeManager
to contain a lot of data, since all this information is already stored
inside the MMObjectNode and MMObjectBuilder it wraps.
Also the fact that synchronized can have a performance drawback, so i
dont know if using cache for a bridge.Cloud would make it faster(maybe
even slower).
So i say, let's make the bridge as lite as possible, and put the thread
stuff in the core. 

-- 
Eduard Witteveen Systeem Ontwikkelaar
Publieke Omroep,  Gateway C Kamer 101
+31(0)356772910 http://www.omroep.nl/
Sed quis custodiet ipsos custodes? : The sixth Satire from Juvenal

Reply via email to