You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by Paul Perez <pa...@pymma.com> on 2020/08/18 15:20:49 UTC

Access to many region from one client cache

Hello All, 

 

In one of our development, the cache contains several regions and
subregions-One of our services accesses to the regions and the subregions
through a classical ClientCache.getRegion( Path). Once we get the region
with the key, we get the value. 

 

The service parameters contain the region path and the key of the value we
want to retrieve. So, for each service invocation, we plan access to the
region through the method ClientCache.getRegion( Path) then get the value
with the key Region.get (Key).

 

Our question: 

Is the method ClientCache.getRegion( Path) efficient enough to advise me to
invoke ClientCache.getRegion( Path)  for each invocation? 

If not, is it is better to store the regions, in a lazy way, in a Map(<
path>, < region>), and avoid a new connection to a region for each
invocation. 

I have no idea how the process to get the region works in the deep. 

 

Thank you for your help

 

Best regards

 

Paul Perez Chief Architect

Pymma Consulting

--------------------------

Tel: +44 79 44 36 04 65 

Skype ID : polperez

 


RE: Access to many region from one client cache

Posted by Paul Perez <pa...@pymma.com>.
Hello Bruce 

 

OK, thank you for this information. So I will directly access to the region through the mapping in the client cache.

I forget the map idea.

Thank you all (and Antony too) 

 

Best regards

 

Paul Perez Chief Architect

Pymma Consulting

--------------------------

Tel: +44 79 44 36 04 65 

Skype ID : polperez

 

From: Bruce Schuchardt <br...@vmware.com> 
Sent: 18 August 2020 19:19
To: user@geode.apache.org; paul.perez@pymma.com
Subject: Re: Access to many region from one client cache

 

Hi Paul,

 

The client cache maintains a mapping from Region path to a Region implementation.  The getRegion(String) method goes through a few checks, so it’s not free, but it doesn’t involve any interaction with other processes.

 

From: Paul Perez <paul.perez@pymma.com <ma...@pymma.com> >
Organization: pymma
Reply-To: "user@geode.apache.org <ma...@geode.apache.org> " <user@geode.apache.org <ma...@geode.apache.org> >, "paul.perez@pymma.com <ma...@pymma.com> " <paul.perez@pymma.com <ma...@pymma.com> >
Date: Tuesday, August 18, 2020 at 8:21 AM
To: "user@geode.apache.org <ma...@geode.apache.org> " <user@geode.apache.org <ma...@geode.apache.org> >
Subject: Access to many region from one client cache

 

Hello All, 

 

In one of our development, the cache contains several regions and subregions—One of our services accesses to the regions and the subregions through a classical ClientCache.getRegion( Path). Once we get the region with the key, we get the value. 

 

The service parameters contain the region path and the key of the value we want to retrieve. So, for each service invocation, we plan access to the region through the method ClientCache.getRegion( Path) then get the value with the key Region.get (Key).

 

Our question: 

Is the method ClientCache.getRegion( Path) efficient enough to advise me to invoke ClientCache.getRegion( Path)  for each invocation? 

If not, is it is better to store the regions, in a lazy way, in a Map(< path>, < region>), and avoid a new connection to a region for each invocation. 

I have no idea how the process to get the region works in the deep. 

 

Thank you for your help

 

Best regards

 

Paul Perez Chief Architect

Pymma Consulting

--------------------------

Tel: +44 79 44 36 04 65 

Skype ID : polperez

 


Re: Access to many region from one client cache

Posted by Anthony Baker <ba...@vmware.com>.
It’s hard to make blanket recommendations without understanding your workload.  Depending on your latency budget you may care more about simplicity vs speed tradeoffs.  The most important thing is to measure and then focus your optimizations on code areas that have a demonstrated impact on your SLA.

My $0.02,
Anthony


On Aug 18, 2020, at 11:18 AM, Bruce Schuchardt <br...@vmware.com>> wrote:

Hi Paul,

The client cache maintains a mapping from Region path to a Region implementation.  The getRegion(String) method goes through a few checks, so it’s not free, but it doesn’t involve any interaction with other processes.

From: Paul Perez <pa...@pymma.com>>
Organization: pymma
Reply-To: "user@geode.apache.org<ma...@geode.apache.org>" <us...@geode.apache.org>>, "paul.perez@pymma.com<ma...@pymma.com>" <pa...@pymma.com>>
Date: Tuesday, August 18, 2020 at 8:21 AM
To: "user@geode.apache.org<ma...@geode.apache.org>" <us...@geode.apache.org>>
Subject: Access to many region from one client cache

Hello All,

In one of our development, the cache contains several regions and subregions—One of our services accesses to the regions and the subregions through a classical ClientCache.getRegion( Path). Once we get the region with the key, we get the value.

The service parameters contain the region path and the key of the value we want to retrieve. So, for each service invocation, we plan access to the region through the method ClientCache.getRegion( Path) then get the value with the key Region.get (Key).

Our question:
Is the method ClientCache.getRegion( Path) efficient enough to advise me to invoke ClientCache.getRegion( Path)  for each invocation?
If not, is it is better to store the regions, in a lazy way, in a Map(< path>, < region>), and avoid a new connection to a region for each invocation.
I have no idea how the process to get the region works in the deep.

Thank you for your help

Best regards

Paul Perez Chief Architect
Pymma Consulting
--------------------------
Tel: +44 79 44 36 04 65
Skype ID : polperez


Re: Access to many region from one client cache

Posted by Bruce Schuchardt <br...@vmware.com>.
Hi Paul,

The client cache maintains a mapping from Region path to a Region implementation.  The getRegion(String) method goes through a few checks, so it’s not free, but it doesn’t involve any interaction with other processes.

From: Paul Perez <pa...@pymma.com>
Organization: pymma
Reply-To: "user@geode.apache.org" <us...@geode.apache.org>, "paul.perez@pymma.com" <pa...@pymma.com>
Date: Tuesday, August 18, 2020 at 8:21 AM
To: "user@geode.apache.org" <us...@geode.apache.org>
Subject: Access to many region from one client cache

Hello All,

In one of our development, the cache contains several regions and subregions—One of our services accesses to the regions and the subregions through a classical ClientCache.getRegion( Path). Once we get the region with the key, we get the value.

The service parameters contain the region path and the key of the value we want to retrieve. So, for each service invocation, we plan access to the region through the method ClientCache.getRegion( Path) then get the value with the key Region.get (Key).

Our question:
Is the method ClientCache.getRegion( Path) efficient enough to advise me to invoke ClientCache.getRegion( Path)  for each invocation?
If not, is it is better to store the regions, in a lazy way, in a Map(< path>, < region>), and avoid a new connection to a region for each invocation.
I have no idea how the process to get the region works in the deep.

Thank you for your help

Best regards

Paul Perez Chief Architect
Pymma Consulting
--------------------------
Tel: +44 79 44 36 04 65
Skype ID : polperez