[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Distributed ehCache working as producer/consumer  XML
Forum Index -> Ehcache
Author Message
Dckc

master

Joined: 09/08/2010 09:00:39
Messages: 59
Offline

Hi all,

I have a doubt whether I am using distributed ehCache correctly or not in the way that data is cached.

I have a terracotta environment with distributed ehcache.

There are 5 independent clients that write data on the distributed ehcache (they dont need to share data) and 1 server that constantly read from that distributed cache and process the data.

So I am actually using the distributed ehcache as a producer/consumer queue.

The problem isthat the data is replicated within all 5 computer, I just want to replicate the ehcache on the server, would be that possible?. In a few words a client write into cache and the server read it.

Thank you very much.

Regards,

Daniel.
sanoujam

journeyman

Joined: 09/09/2008 10:30:25
Messages: 43
Offline

Your app server can become the 6th client for the cache. It should be able to see the changes by the other nodes and retrieve from the cache.

-- Abhishek Sanoujam
[Yahoo!]
Dckc

master

Joined: 09/08/2010 09:00:39
Messages: 59
Offline

Hi Sanoujam,

Thank for your reply.

As you said my application server can become the 6th client and see all the changes.

However my question is how can I stop all the nodes from seeing the content of the cache?, I just want the server to be able to see the changes.

In other words I dont want that the information is replicated amongst the 5 nodes.

Regards,

Daniel
sanoujam

journeyman

Joined: 09/09/2008 10:30:25
Messages: 43
Offline

I don't think what you want is possible, provided I understand your requirement. There is no way to "hide" content of the cache in some nodes and let it be available on other nodes in a single cache.

Otherwise you can use 5 separate caches for each of the 5 clients, and the server can still read from all of them.

Btw just curious why you don't want changes from other clients being visible to the other nodes. Are the clients going to have colliding key-space? Just trying to understand your use case.

-- Abhishek Sanoujam
[Yahoo!]
rajoshi

seraphim

Joined: 07/04/2011 04:36:10
Messages: 1465
Offline

Issue seems to be resolved.Please let us know if more information is required.

Rakesh Joshi
Terracotta.
 
Forum Index -> Ehcache
Go to:   
Powered by JForum 2.1.7 © JForum Team