You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Vladimir Steshin <vl...@gmail.com> on 2022/01/20 12:28:44 UTC

[VOTE] Service proxy for local service by 'IgniteServices#serviceProxy()'

     Hi, Igniters.


     Should we return a proxy even for local services by 
'IgniteServices#serviceProxy()'?

*I vote +1*, let's return proxy.


     This question has recently raised again. Before the service 
metrics, we returned direct instance for local services. With service 
metrics enabled, we return proxy. With the metrics disabled, we return 
direct reference.

Pros:
     1) Would match the method name - 'proxy'. Looks reasonable.
     2) Giving proxy every time, we won't change behavior depending on 
user setting like 'ServiceConfiguration#setStatisticsEnabled()'
     3) There is a dedicated method for direct reference of local 
service: 'IgniteServices#service()'

Cons:
     4) Will break declarations like `MyServiceImpl svc = 
serviceProxy(«myservice», IMyService.class);` without any change.

Re: [VOTE] Service proxy for local service by 'IgniteServices#serviceProxy()'

Posted by Valentin Kulichenko <va...@gmail.com>.
Changing my vote to +1, as long as we address the issue of the broken
service metrics as a whole (it requires several code changes as well as
documentation updates).

Details in the discussion thread:
https://lists.apache.org/thread/plbdrq800jts0m8kfjomc7hdsj9rtkzs

-Val

On Thu, Jan 20, 2022 at 11:53 AM Valentin Kulichenko <
valentin.kulichenko@gmail.com> wrote:

> -1 until we finish the discussion in another thread.
>
> The original problem we're trying to solve here is related to metrics,
> which will still be broken because of the service() method. Therefore, in
> the way the change is proposed, it doesn't fix the issue, but removes an
> existing performance optimization.
>
> I will be happy to change my vote once we figure this out.
>
> -Val
>
> On Thu, Jan 20, 2022 at 4:28 AM Vladimir Steshin <vl...@gmail.com>
> wrote:
>
>>      Hi, Igniters.
>>
>>
>>      Should we return a proxy even for local services by
>> 'IgniteServices#serviceProxy()'?
>>
>> *I vote +1*, let's return proxy.
>>
>>
>>      This question has recently raised again. Before the service
>> metrics, we returned direct instance for local services. With service
>> metrics enabled, we return proxy. With the metrics disabled, we return
>> direct reference.
>>
>> Pros:
>>      1) Would match the method name - 'proxy'. Looks reasonable.
>>      2) Giving proxy every time, we won't change behavior depending on
>> user setting like 'ServiceConfiguration#setStatisticsEnabled()'
>>      3) There is a dedicated method for direct reference of local
>> service: 'IgniteServices#service()'
>>
>> Cons:
>>      4) Will break declarations like `MyServiceImpl svc =
>> serviceProxy(«myservice», IMyService.class);` without any change.
>
>

Re: [VOTE] Service proxy for local service by 'IgniteServices#serviceProxy()'

Posted by Valentin Kulichenko <va...@gmail.com>.
-1 until we finish the discussion in another thread.

The original problem we're trying to solve here is related to metrics,
which will still be broken because of the service() method. Therefore, in
the way the change is proposed, it doesn't fix the issue, but removes an
existing performance optimization.

I will be happy to change my vote once we figure this out.

-Val

On Thu, Jan 20, 2022 at 4:28 AM Vladimir Steshin <vl...@gmail.com> wrote:

>      Hi, Igniters.
>
>
>      Should we return a proxy even for local services by
> 'IgniteServices#serviceProxy()'?
>
> *I vote +1*, let's return proxy.
>
>
>      This question has recently raised again. Before the service
> metrics, we returned direct instance for local services. With service
> metrics enabled, we return proxy. With the metrics disabled, we return
> direct reference.
>
> Pros:
>      1) Would match the method name - 'proxy'. Looks reasonable.
>      2) Giving proxy every time, we won't change behavior depending on
> user setting like 'ServiceConfiguration#setStatisticsEnabled()'
>      3) There is a dedicated method for direct reference of local
> service: 'IgniteServices#service()'
>
> Cons:
>      4) Will break declarations like `MyServiceImpl svc =
> serviceProxy(«myservice», IMyService.class);` without any change.