Hi,

Looking at the bridge API (v1.5.1) and implementation it looks like it is single-threaded (only one thread is supposed to access a Cloud instance). I.e. it is not intended to be thread-safe. In most cases each http session w/s/could refer to one Cloud instance so this would not be a problem. But when accessing a single Cloud instance from multiple threads then synchronization problems could arise? All static objects (e.g. Node-cache) seem to be thread-safe (synchronized access). Is this assumption right ? I could not find relevant documentation on the threading model used.

One approach I experiment is to share multiple Cloud instances (and Transactions) through ThreadLocal, i.e. "Cloud-pooling". Then only one thread is guaranteed to access a Cloud instance. Together with pooled Threads (tomcat) the number of Cloud instances would be significantly smaller than with "a Cloud-per-http-session" (when the number of http sessions is higher then the number of pooled threads). Is this sensible ?

thanks,

--Just (working on projects at http://www.waag.org)









Reply via email to