You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by Mangesh Deshmukh <md...@quotient.com> on 2017/10/06 16:17:34 UTC

Executing function on partitioned region

Hi,

If we enable REST APIs, will it be calling a function on partitioned region on all servers that host this region? Is there a way to optimize this to go only to the server that hosts the entry?

Would calling the function using REST be less performant than by calling it using API?

Thanks,
Mangesh



Re: Executing function on partitioned region

Posted by Mangesh Deshmukh <md...@quotient.com>.
Thanks Jens. Pretty much what I thought but wanted to be clear on it.

From: Jens Deppe <je...@apache.org>
Reply-To: "user@geode.apache.org" <us...@geode.apache.org>
Date: Friday, October 6, 2017 at 11:19 AM
To: "user@geode.apache.org" <us...@geode.apache.org>
Subject: Re: Executing function on partitioned region

Hi Mangesh,

If you have the key for your entry then it will be more performant, calling the function, using the API. You achieve this by using the 'withFilter(key)' predicate.

(Java) Clients maintain metadata about where the data is stored for a given key and so they're able to leverage that in this situation. For the REST API, we unfortunately don't have a way to achieve this mapping at the moment, so your REST call will most likely be forwarded to the actual server that holds the data, thus incurring an additional hop penalty.

--Jens


On Fri, Oct 6, 2017 at 9:17 AM, Mangesh Deshmukh <md...@quotient.com>> wrote:
Hi,

If we enable REST APIs, will it be calling a function on partitioned region on all servers that host this region? Is there a way to optimize this to go only to the server that hosts the entry?

Would calling the function using REST be less performant than by calling it using API?

Thanks,
Mangesh




Re: Executing function on partitioned region

Posted by Mangesh Deshmukh <md...@quotient.com>.
Thanks John/Mike!

Sent from my iPhone

On Oct 6, 2017, at 5:08 PM, Michael Stolz <ms...@pivotal.io>> wrote:


Probably

--
Mike Stolz
Principal Engineer - Gemfire Product Manager
Mobile: 631-835-4771

On Oct 6, 2017 6:45 PM, "Mangesh Deshmukh" <md...@quotient.com>> wrote:
Hi Mike,

Even with “filter” supported in REST, it would still make an extra hop, correct?

Thanks,
Mangesh


From: Michael Stolz <ms...@pivotal.io>>
Reply-To: "user@geode.apache.org<ma...@geode.apache.org>" <us...@geode.apache.org>>
Date: Friday, October 6, 2017 at 3:01 PM
To: "user@geode.apache.org<ma...@geode.apache.org>" <us...@geode.apache.org>>
Subject: Re: Executing function on partitioned region

"with filter" was added to the REST api in 8.x I believe.

--
Mike Stolz
Principal Engineer, GemFire Product Lead
Mobile: +1-631-835-4771<tel:(631)%20835-4771>

On Fri, Oct 6, 2017 at 2:19 PM, Jens Deppe <je...@apache.org>> wrote:
Hi Mangesh,

If you have the key for your entry then it will be more performant, calling the function, using the API. You achieve this by using the 'withFilter(key)' predicate.

(Java) Clients maintain metadata about where the data is stored for a given key and so they're able to leverage that in this situation. For the REST API, we unfortunately don't have a way to achieve this mapping at the moment, so your REST call will most likely be forwarded to the actual server that holds the data, thus incurring an additional hop penalty.

--Jens


On Fri, Oct 6, 2017 at 9:17 AM, Mangesh Deshmukh <md...@quotient.com>> wrote:
Hi,

If we enable REST APIs, will it be calling a function on partitioned region on all servers that host this region? Is there a way to optimize this to go only to the server that hosts the entry?

Would calling the function using REST be less performant than by calling it using API?

Thanks,
Mangesh





Re: Executing function on partitioned region

Posted by Michael Stolz <ms...@pivotal.io>.
Probably

--
Mike Stolz
Principal Engineer - Gemfire Product Manager
Mobile: 631-835-4771

On Oct 6, 2017 6:45 PM, "Mangesh Deshmukh" <md...@quotient.com> wrote:

> Hi Mike,
>
>
>
> Even with “filter” supported in REST, it would still make an extra hop,
> correct?
>
>
>
> Thanks,
>
> Mangesh
>
>
>
>
>
> *From: *Michael Stolz <ms...@pivotal.io>
> *Reply-To: *"user@geode.apache.org" <us...@geode.apache.org>
> *Date: *Friday, October 6, 2017 at 3:01 PM
> *To: *"user@geode.apache.org" <us...@geode.apache.org>
> *Subject: *Re: Executing function on partitioned region
>
>
>
> "with filter" was added to the REST api in 8.x I believe.
>
>
> --
>
> Mike Stolz
>
> Principal Engineer, GemFire Product Lead
>
> Mobile: +1-631-835-4771 <(631)%20835-4771>
>
>
>
> On Fri, Oct 6, 2017 at 2:19 PM, Jens Deppe <je...@apache.org> wrote:
>
> Hi Mangesh,
>
>
>
> If you have the key for your entry then it will be more performant,
> calling the function, using the API. You achieve this by using the
> 'withFilter(key)' predicate.
>
>
>
> (Java) Clients maintain metadata about where the data is stored for a
> given key and so they're able to leverage that in this situation. For the
> REST API, we unfortunately don't have a way to achieve this mapping at the
> moment, so your REST call will most likely be forwarded to the actual
> server that holds the data, thus incurring an additional hop penalty.
>
>
>
> --Jens
>
>
>
>
>
> On Fri, Oct 6, 2017 at 9:17 AM, Mangesh Deshmukh <md...@quotient.com>
> wrote:
>
> Hi,
>
>
>
> If we enable REST APIs, will it be calling a function on partitioned
> region on all servers that host this region? Is there a way to optimize
> this to go only to the server that hosts the entry?
>
>
>
> Would calling the function using REST be less performant than by calling
> it using API?
>
>
>
> Thanks,
>
> Mangesh
>
>
>
>
>
>
>
>
>

Re: Executing function on partitioned region

Posted by John Blum <jb...@pivotal.io>.
Well, it depends on whether the data of interests is on the node where the
Developer REST API is running in the first place, since the Dev REST API
can only run on a Geode Server.  If the data of interests is on the server
where the REST API is running, then no extra hop would be needed in that
case.

Most likely, there will be an extra hop since...

1. Typically the REST API is only run a few nodes in the cluster (far fewer
than potentially the number of nodes in the cluster), and...
2. A REST client (unlike Java//Native clients) does not talk indirectly to
the cluster through a Locator, which technically makes single-hop
possible.  The URL used by a client is to a server running the REST API, so
if that node does not have the data targeted by the Function, then yes, an
extra hop is going to be required.

To get similar behavior as in the Java/Native client drivers, a language
specific (e.g. Python, Ruby, JavaScript, etc) binding (adapter) would be
needed, client-side.

-j


On Fri, Oct 6, 2017 at 3:45 PM, Mangesh Deshmukh <md...@quotient.com>
wrote:

> Hi Mike,
>
>
>
> Even with “filter” supported in REST, it would still make an extra hop,
> correct?
>
>
>
> Thanks,
>
> Mangesh
>
>
>
>
>
> *From: *Michael Stolz <ms...@pivotal.io>
> *Reply-To: *"user@geode.apache.org" <us...@geode.apache.org>
> *Date: *Friday, October 6, 2017 at 3:01 PM
> *To: *"user@geode.apache.org" <us...@geode.apache.org>
> *Subject: *Re: Executing function on partitioned region
>
>
>
> "with filter" was added to the REST api in 8.x I believe.
>
>
> --
>
> Mike Stolz
>
> Principal Engineer, GemFire Product Lead
>
> Mobile: +1-631-835-4771 <(631)%20835-4771>
>
>
>
> On Fri, Oct 6, 2017 at 2:19 PM, Jens Deppe <je...@apache.org> wrote:
>
> Hi Mangesh,
>
>
>
> If you have the key for your entry then it will be more performant,
> calling the function, using the API. You achieve this by using the
> 'withFilter(key)' predicate.
>
>
>
> (Java) Clients maintain metadata about where the data is stored for a
> given key and so they're able to leverage that in this situation. For the
> REST API, we unfortunately don't have a way to achieve this mapping at the
> moment, so your REST call will most likely be forwarded to the actual
> server that holds the data, thus incurring an additional hop penalty.
>
>
>
> --Jens
>
>
>
>
>
> On Fri, Oct 6, 2017 at 9:17 AM, Mangesh Deshmukh <md...@quotient.com>
> wrote:
>
> Hi,
>
>
>
> If we enable REST APIs, will it be calling a function on partitioned
> region on all servers that host this region? Is there a way to optimize
> this to go only to the server that hosts the entry?
>
>
>
> Would calling the function using REST be less performant than by calling
> it using API?
>
>
>
> Thanks,
>
> Mangesh
>
>
>
>
>
>
>
>
>



-- 
-John
john.blum10101 (skype)

Re: Executing function on partitioned region

Posted by Mangesh Deshmukh <md...@quotient.com>.
Hi Mike,

Even with “filter” supported in REST, it would still make an extra hop, correct?

Thanks,
Mangesh


From: Michael Stolz <ms...@pivotal.io>
Reply-To: "user@geode.apache.org" <us...@geode.apache.org>
Date: Friday, October 6, 2017 at 3:01 PM
To: "user@geode.apache.org" <us...@geode.apache.org>
Subject: Re: Executing function on partitioned region

"with filter" was added to the REST api in 8.x I believe.

--
Mike Stolz
Principal Engineer, GemFire Product Lead
Mobile: +1-631-835-4771

On Fri, Oct 6, 2017 at 2:19 PM, Jens Deppe <je...@apache.org>> wrote:
Hi Mangesh,

If you have the key for your entry then it will be more performant, calling the function, using the API. You achieve this by using the 'withFilter(key)' predicate.

(Java) Clients maintain metadata about where the data is stored for a given key and so they're able to leverage that in this situation. For the REST API, we unfortunately don't have a way to achieve this mapping at the moment, so your REST call will most likely be forwarded to the actual server that holds the data, thus incurring an additional hop penalty.

--Jens


On Fri, Oct 6, 2017 at 9:17 AM, Mangesh Deshmukh <md...@quotient.com>> wrote:
Hi,

If we enable REST APIs, will it be calling a function on partitioned region on all servers that host this region? Is there a way to optimize this to go only to the server that hosts the entry?

Would calling the function using REST be less performant than by calling it using API?

Thanks,
Mangesh





Re: Executing function on partitioned region

Posted by Michael Stolz <ms...@pivotal.io>.
"with filter" was added to the REST api in 8.x I believe.

--
Mike Stolz
Principal Engineer, GemFire Product Lead
Mobile: +1-631-835-4771

On Fri, Oct 6, 2017 at 2:19 PM, Jens Deppe <je...@apache.org> wrote:

> Hi Mangesh,
>
> If you have the key for your entry then it will be more performant,
> calling the function, using the API. You achieve this by using the
> 'withFilter(key)' predicate.
>
> (Java) Clients maintain metadata about where the data is stored for a
> given key and so they're able to leverage that in this situation. For the
> REST API, we unfortunately don't have a way to achieve this mapping at the
> moment, so your REST call will most likely be forwarded to the actual
> server that holds the data, thus incurring an additional hop penalty.
>
> --Jens
>
>
> On Fri, Oct 6, 2017 at 9:17 AM, Mangesh Deshmukh <md...@quotient.com>
> wrote:
>
>> Hi,
>>
>>
>>
>> If we enable REST APIs, will it be calling a function on partitioned
>> region on all servers that host this region? Is there a way to optimize
>> this to go only to the server that hosts the entry?
>>
>>
>>
>> Would calling the function using REST be less performant than by calling
>> it using API?
>>
>>
>>
>> Thanks,
>>
>> Mangesh
>>
>>
>>
>>
>>
>
>

Re: Executing function on partitioned region

Posted by Jens Deppe <je...@apache.org>.
Hi Mangesh,

If you have the key for your entry then it will be more performant, calling
the function, using the API. You achieve this by using the
'withFilter(key)' predicate.

(Java) Clients maintain metadata about where the data is stored for a given
key and so they're able to leverage that in this situation. For the REST
API, we unfortunately don't have a way to achieve this mapping at the
moment, so your REST call will most likely be forwarded to the actual
server that holds the data, thus incurring an additional hop penalty.

--Jens


On Fri, Oct 6, 2017 at 9:17 AM, Mangesh Deshmukh <md...@quotient.com>
wrote:

> Hi,
>
>
>
> If we enable REST APIs, will it be calling a function on partitioned
> region on all servers that host this region? Is there a way to optimize
> this to go only to the server that hosts the entry?
>
>
>
> Would calling the function using REST be less performant than by calling
> it using API?
>
>
>
> Thanks,
>
> Mangesh
>
>
>
>
>