Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
Implement support for passing implicit "request" attributes from the proxy to the .NET service.
Implementation notes.
- If no caller attributes are passed - there should be no performance overhead when executing service methods.
- Attributes allow only string and byte[] values and does not permit nulls in key/values.
- Currently, the context should be immutable, but in the future, it should be possible to change it through the interceptor.
- Context is bound to the NET proxy invocation handler (not to java invocation handler) and passed as an implicit parameter on every method call.
Public API changes:
API changes are very similar to java part.
New methods inĀ IServices to pass caller context to service proxy.
T GetServiceProxy<T>(string name, bool sticky, IServiceCallContext callCtx) where T : class; dynamic GetDynamicServiceProxy(string name, bool sticky, IServiceCallContext callCtx);
New method in IServiceContext for getting caller context inside the service method.
IServiceCallContext CurrentCallContext();
New interface IServiceCallContext.
public interface IServiceCallContext { string Attribute(string name); byte[] BinaryAttribute(string name) }
And the builder ServiceCallContextBuilder to create IServiceCallContext instance.
Attachments
Issue Links
- relates to
-
IGNITE-15829 Request attributes for a service in thin clients.
- Resolved
- requires
-
IGNITE-15794 Request attributes for a java service.
- Resolved
- links to