Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
None
-
None
Description
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.
ignite.services().serviceProxy(new ServiceProxyConfiguration(name, cls).setContext(callCtx));
Adds yet another "config" object, complicates the use of the API.
- Add a new method "withContext(callCtx)" (returns IgniteServices) to the IgniteServices interface.
Ignite.services().withContext(callCtx).serviceProxy(name,...)
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.
- Add a new "withContext(callCtx)" method which returns a new interface IgniteServiceProxies (name can be changed).
Ignite.services().withContext(callCtx).serviceProxy(name,...)
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.
Attachments
Issue Links
- links to