thanks.
sometimes, it may be hard to make a service reentrant, e.g. some
state info, if there is, need to protected by exclusive locks.
isn't it going to cause performance bottleneck in high volumn system? i.e.
the service is being requested heavily in the system.
doesn't it improve the performance by having some service instance pool
instead of singleton ?
my 2 cents.
-sky
>From: Jon Stevens <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: Turbine-user <[EMAIL PROTECTED]>
>Subject: Re: service and MT safe
>Date: Tue, 29 May 2001 16:40:00 -0700
>
>on 5/29/01 9:59 AM, "Sky Torch" <[EMAIL PROTECTED]> wrote:
>
> > Hello,
> >
> > in turbine, service is implemented as singleton. is it necessarily to be
> > multi-thread safe? i checked cache service, it seems it's private
>Hashtable
> > data member is not protected.
> >
> > are services in turbine MT safe ?
> > if not, is there anyway in the framework
> > to turn it on ?
>
>Definition:
> A service is an object that is made into a singleton by placing it
>into
> a cache.
>
>Therefore, a Service (ie: an Object) may be accessed from that cache in
>either a MT or non MT environement.
>
>The implementation of that Service should be made MT aware so that any
>function that it performs can be done in a MT fashion without worry.
>
>The private Hashtable within the GlobalCache service is already
>synchronized
>within the Hashtable object. If you put an object into that hashtable
>cache,
>that object itself must also be MT aware.
>
>Most stuff within Turbine must be MT aware.
>
>-jon
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]