[jboss-dev-forums] [Design of JBossCache] - PojoCache physical POJO field mapping and region

ben.wang@jboss.com do-not-reply at jboss.com
Thu Oct 5 00:04:08 EDT 2006


Currently, PojoCache 2.0 uses a "flat-space" mapping approach where the user-specified id stores only a "PojoReference" where in turn it refers to the internal workspace under /__JBossInternal__. 

This will present some issues when marshalling and eviction are activated (individually) where both involved in a defition of a "Region". In this case, a logical region would comprise of the user-specified id and the internal workspace.

So I am proposing to use "flat-space" per region mapping. That is, when I detect a region is present, say, "/person", then if a user calls attach("/person/joe", pojo), the internal mapping will be like:


  | /person
  |    /joe
  |      (key, PojoReference)
  |    /__JBossInternal__
  |      /sdaj4343xxxx
  |        (key, pojo)
  | 

such that the JBossInternal will be located under "/person" region. In this way, the eviction, marshalling, and even partial state transfer will be transparent from PojoCache point of view.

Note:

1. If there is no region found, it will fall back to the global workspace.
2. POJO relationship is maintained only within the region. That is, if joe and mary has the same address. Both joe and mary needs to be located under the same region. I think this is a logical assumption though.

What do people think?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3976210#3976210

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3976210



More information about the jboss-dev-forums mailing list