/ blog / java / hivemind-service-models.html

Root Beer Logo Root Beer

Chris Nokleberg's Fizzy Weblog

August 2003
Su M Tu W Th F Sa
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 28 29 30
Previous  |  Next  |  More...
#  HiveMind Service Models

I've been reading Howard's blog but there isn't any way to comment and I haven't blogged in a month and a half anyway...

Not sure if Howard ever reads my blog, or if great minds just think alike [Emoticon], but the threaded, proxied service model described in these two blogs is obviously similar to my Not-A-Container idea.

I need to think about it more, but it seems to me that there might be an opportunity for a kind of "commons-singleton" package. Some thin layer like the NotAContainer class through which everyone would get singletons. You could easily swap out different underlying containers and policies (even at run time) without the client code having to change. Even swapping out HiveMind for something else entirely would be simple.

The only disadvantage I can see is that in order to be general and thin this layer would itself have to use ThreadLocals because the underlying services might be using a threaded model, even if for a particular application they aren't. I suppose it depends on the granularity of your service methods, but I think it would be worth the performance hit.

[Powered By FreeMarker]  [Valid Atom 1.0]  [Weblog Commenting by]