-
1. Re: how to replicate the memory in heap between the instances of an application in cluster
pferraro Aug 10, 2011 6:55 PM (in response to minhld)If this heap block can be stored in a java byte[], then you can store the array in a clustered cache, whether it's Infinispan or JBoss Cache.
That way byte[] can then be accessed from any node in the cluster.
-
2. Re: how to replicate the memory in heap between the instances of an application in cluster
minhld Aug 10, 2011 10:42 PM (in response to pferraro)Hi Paul,
Thank you for your answer, but in this case I cannot store data in java binary array due to matter of speed. I will describe in more detail:
We are creating a web service application for iris recognition. When the application starts, it loads a library (c++ dll) into the memory, and an initialization function from the library will create a block of memory in heap. After that, each function call from java layer will call to a corresponding function in the c++ library and use that block (retrieving/add/update/delete data on it). That block of memory is shared between all sessions and managed by c++ layer because every update on that block from c++ is much faster than from java side.
We are now trying to deploy our application to a cluster to utilize load balancing, and the problem is the shared memory... We don't know how to make a virtual shared memory block in between the nodes in cluster, so update from a node will affect to other nodes.
Do you have any idea for this?
minh