Post

2 followers Follow
0
Avatar

Creating entries in region in one cache or (server group) directly from another cache (or server group).

Hi,

I'm attempting to place an entry in a region which is not part of my local server group (or is part of another cache entirely) and is running in a different process. Is there a way to do this as long as all caches/server groups have the same locator, or do I need to create a client for my second process (we have a client/server setup) and make the entry using it?

The reason I'm asking is because we would like to have some event processing performed using an AsyncEventQueue, but we don't want to burden our "data" servers with processing. So our idea is to have a second server process which will contain a region into which we will place events for processing. Since we would use a common locator I was wondering if I would need to create another client process or if I there is some shortcut I can leverage.

Thanks in advance,
Dan

Daniel Hatch

Please sign in to leave a comment.

3 comments

0
Avatar

You can use a Function for this. Invoke it using onMember(group) which will route it to one member in the group defining the AsyncEventQueue. The Function will then get the region and do the put on it to get it into the AsyncEventQueue. How will you invoke this Function? From a CacheListener, CacheWriter, something else? How will you define the AsyncEventQueue (serial, parallel)? It might involve extra network hops (which would be synchronous to the original operation). You could also define a proxy region in the first group that forwards events to the replicated or partitioned region in the second group defining the AsyncEventQueue. This might avoid extra network hops.

Barry Oglesby 0 votes
0
Avatar

Barry,

Thanks for the great idea. I would be invoking the function from a CacheListener, and be using a parallel AEQ.

Daniel Hatch 0 votes
0
Avatar

Ok. Be careful with distributed deadlock (which could happen if you invoke something in that Function back in this member or the original region). Also, keep in mind that the Function put may go to a different member than the local one.

Barry Oglesby 0 votes