Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-15572 Ability to set custom execution context for Ignite service.
  3. IGNITE-16233

Improve public API for setting caller context to service proxy.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • 2.13
    • managed services
    • 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:

      1. 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.

      2. 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.

      3. 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

          Activity

            People

              Unassigned Unassigned
              xtern Pavel Pereslegin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: