[ 
https://issues.apache.org/jira/browse/IGNITE-16233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pavel Pereslegin resolved IGNITE-16233.
---------------------------------------
    Resolution: Won't Fix

> Improve public API for setting caller context to service proxy.
> ---------------------------------------------------------------
>
>                 Key: IGNITE-16233
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16233
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: managed services
>            Reporter: Pavel Pereslegin
>            Priority: Major
>             Fix For: 2.13
>
>
> *Motivation.*
> When retrieving a proxy service, the user can specify optional parameters: 
> {{timeout}} and {{sticky}}.
> When adding a new optional parameter (in discussed case - "context"), for the 
> convenience of the user, several methods are added at once (with a different 
> set of optional parameters).
> Thus, the number of methods can grow geometrically with the addition of each 
> new parameter.
> *Suggested options:*
> # Add a new {{ServiceProxyConfiguration}} class which will combine all proxy 
> settings.
> {code:java}
> ignite.services().serviceProxy(new ServiceProxyConfiguration(name, 
> cls).setContext(callCtx));
> {code}  
>    {color:#DE350B}Adds yet another "config" object, complicates the use of 
> the API.{color}
> # Add a new method "withContext(callCtx)" ({{returns IgniteServices}}) to the 
> {{IgniteServices}} interface.
> {code:java}
> Ignite.services().withContext(callCtx).serviceProxy(name,...)
> {code}
> {color:#DE350B}Most of the {{IgniteServices}} methods are not related to the 
> service call context (deploy, cancel of the service, etc. which may be 
> confusing for the user). It's not clear what to do with the "timeout" and 
> "sticky" parameters.{color}
> # Add a new "withContext(callCtx)" method which returns a new interface 
> {{IgniteServiceProxies}} (name can be changed).
> {code:java}
> Ignite.services().withContext(callCtx).serviceProxy(name,...)
> {code}
> {color:#DE350B}The new interface has a not very clear purpose and naming 
> (looks like "service proxy builder"). May be confusing for the user. It's not 
> clear what to do with the "timeout" and "sticky" parameters.{color}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to