[
https://issues.apache.org/jira/browse/IGNITE-15795?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17445853#comment-17445853
]
Pavel Pereslegin commented on IGNITE-15795:
-------------------------------------------
[~ptupitsyn],
could you take a look at the proposed changes, please?
> .NET: Request attributes for a .Net service.
> --------------------------------------------
>
> Key: IGNITE-15795
> URL: https://issues.apache.org/jira/browse/IGNITE-15795
> Project: Ignite
> Issue Type: Sub-task
> Components: managed services
> Reporter: Pavel Pereslegin
> Assignee: Pavel Pereslegin
> Priority: Major
> Labels: .NET, iep-79, ise
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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.
> {code:c#}
> T GetServiceProxy<T>(string name, bool sticky, IServiceCallContext callCtx)
> where T : class;
> dynamic GetDynamicServiceProxy(string name, bool sticky, IServiceCallContext
> callCtx);
> {code}
> New method in {{IServiceContext}} for getting caller context inside the
> service method.
> {code:c#}
> IServiceCallContext CurrentCallContext();
> {code}
> New interface {{IServiceCallContext}}.
> {code:c#}
> public interface IServiceCallContext
> {
> string Attribute(string name);
> byte[] BinaryAttribute(string name)
> }
> {code}
> And the builder {{ServiceCallContextBuilder}} to create
> {{IServiceCallContext}} instance.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)