I guess I should have said up front that I'm using the java memcached client from danga - version 2.0.1. I can't find anywhere in the documentation where it says that an instance of com/danga/MemCached/ MemCachedClient is multi-threaded. Anyone know?
Thanks! On Mar 5, 9:56 am, Dustin <[email protected]> wrote: > On Mar 5, 8:12 am, theRat <[email protected]> wrote: > > > I'm not using it as a messaging scheme - my application will reside in > > a cluster and I'd like them to share data. I'm also not using > > Hibernate for this project. I'll take a look at the stuff you pointed > > to - but I'm also still looking for some best practice information. > > Anybody got some for a multi-threaded application using a memcached > > client? > > MT was a core design concern for my memcache client. It > specifically doesn't have any "synchronized" code in it, but it's > engineered for concurrency. > > You create one instance for your app. Use guice or something to put > it where you need it, and do all the gets and sets you want. > > The design is fairly simple and the tests are quite good, although > the project has grown quite a bit handling multiple protocols and some > higher level abstractions. The thread communication remains pretty > simple (if it were to get complicated at all, it would become > impossible to understand, at which point you could just consider it > wrong).
