[jboss-dev-forums] [Design of JBossCache] - Re: memcached client/server
bela@jboss.com
do-not-reply at jboss.com
Wed Sep 17 01:45:00 EDT 2008
Not sure I'd use a cache loader for a memcached implementation in JBossCache. I would do it as follows:
- Goal (like in JGroups' impl) is to have Java clients sit in the address space of the server, so no memcached protocol is required
- The memcached protocol is implemented (for remote clients, or clients written in different languages) in a JBC-memcached server. Here, we can copy JGroups' implementation, or any server side impl (there aren't many though)
- The server implementation consists of a configuration which replaces the ReplicationInterceptor with a different interceptor (maybe a subclass ?). That interceptor forwards calls to certain FQN to different servers, using consisten hashing over the FQN to always map the same FQN to the same JBC-memcached instance
- L1 cache: the results could be stored in the JBC instance, so it would act as an L1 cache
Hmm, maybe your CacheLoader thought is not such a bad idea ! The CacheLoader acts as L2 cache and uses consistent hashing to fetch items from given hosts, and JBC itself (in conjunction with evciction) acts as L1 cache...
Whichever implementation we pick, it should fit into the architecture of Data Partitioning
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176995#4176995
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176995
More information about the jboss-dev-forums
mailing list