[infinispan-dev] Async cache interface

Manik Surtani manik at jboss.org
Tue May 5 09:23:27 EDT 2009


Picking up on

	https://jira.jboss.org/jira/browse/ISPN-72

I was thinking about from what point the call is placed on a separate  
thread.  The obvious bit is the network stack so that the caller gets  
a Future before the call goes out on the network, but maybe there is  
sense to do this even earlier?  Perhaps as soon as the invocation is  
made?  Things to consider though are transaction context - which exist  
on the caller's thread - and potential context class loaders on the  
thread.  Stuff that can be dealt with easily enough - e.g., if we have  
an AsyncInterceptor that handles the thread pooling and management of  
the Future, and this sits *after* the TxInterceptor so transaction  
participation is already determined and transaction context attached  
to the call.  Context classloaders and the like could be attached to  
the worker thread that then carries the call down the chain and to the  
wire.

Thoughts?
--
Manik Surtani
manik at jboss.org
Lead, Infinispan
Lead, JBoss Cache
http://www.infinispan.org
http://www.jbosscache.org







More information about the infinispan-dev mailing list