[jboss-jira] [JBoss JIRA] Resolved: (JBCACHE-744) Expand CacheLoader API to support streaming state transfer

Vladimir Blagojevic (JIRA) jira-events at jboss.com
Fri Sep 29 12:32:41 EDT 2006


     [ http://jira.jboss.com/jira/browse/JBCACHE-744?page=all ]

Vladimir Blagojevic resolved JBCACHE-744.
-----------------------------------------

    Resolution: Done

Resolved by introducing described methods in CacheLoader API. Default implementations of these methods have been moved to AbstractCacheLoader thus liberating concrete Cacheloader implementations from the details of partial and complete state transfer between cacheloaders. By resolving this issue cacheloader compatibility is also achieved. For example, cache node A can have FileCacheLoader and node B can have JDBCCacheLoader which are able to transfer state between them. Both streaming and byte based transfer are supported transparently from cacheloaders.



> Expand CacheLoader API to support streaming state transfer
> ----------------------------------------------------------
>
>                 Key: JBCACHE-744
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-744
>             Project: JBoss Cache
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: Cache loaders
>    Affects Versions: 1.4.0, 1.3.0, 1.2
>            Reporter: Vladimir Blagojevic
>         Assigned To: Vladimir Blagojevic
>             Fix For: 2.0.0
>
>
> CacheLoader API prior to 2.0 does not support streaming state transfer feature implemented in Jgroups 2.4. In order to transfer application state to a receiving cache node we currently have to load entire state into memory and send it to a receiving cache node. Major limitation of this approach is that the state transfer that is very large (>total memory allocated by JVM) would result in OutOfMemoryException. 
> For example, if a cacheloader is pointing to a huge DOM tree, whose aggregate size is 2GB (and which has partly been passivated to disk), then the state provider cacheloader node can simply iterate over the DOM tree (activating the parts which have been passivated out to disk), and write it to the OutputStream as it traverses the tree. The receiving cacheloader will simply read from the InputStream and reconstruct the tree on its side, possibly again passivating parts to disk. Rather than having to provide a 2GB byte[] buffer (besides the state, so the needed memory is ca 4GB temporarily), streaming state transfer transfers the state in chunks of N bytes (user configurable).
> In order to accomodate this feature CacheLoader API will be expanded to include the following methods:
> void storeEntireState(InputStream s);
> void storeState(Fqn subtree,InputStream s); 
> void loadEntireState(OutputStream s);
> void loadState(Fqn subtree,OutputStream s);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list