xtern commented on code in PR #10162:
URL: https://github.com/apache/ignite/pull/10162#discussion_r925519665


##########
docs/_docs/services/services.adoc:
##########
@@ -291,6 +294,78 @@ instead (`IgniteServices.serviceProxy(...)`).
 an issue for real jobs like working with a DB or a cache.
 ====
 
+== Service Middleware
+
+WARNING: This feature is experimental and may change in future releases.
+
+[CAUTION]
+====
+This feature may affect performance of service execution.
+====
+
+Apache Ignite allows the user to implement custom middleware logic for his 
services and provides the following features:
+
+1. Ability to implicitly pass custom immutable parameters from proxy to 
service (similar to request headers).
+2. Ability to define custom interceptor for service method calls.
+
+=== Service Call Context
+This feature allows the user to implicilty pass parameters to any service 
method without service re-deployment.
+
+The user can create context (map with custom parameters) and bind it to the 
service proxy. After that, each call to the proxy method will also implicitly 
pass context parameters to the service.
+
+[tabs]
+--
+tab:Java[]
+[source, java]
+----
+include::{javaFile}[tags=service-call-context-create, indent=0]
+----
+tab:C#/.NET[]
+--
+
+The user can read the `call context` using the `currentCallContext` method of 
`ServiceContext`.
+
+NOTE: Service call context is only accessible from the current thread during 
the execution of a service method.
+
+[tabs]
+--
+tab:Java[]
+[source, java]
+----
+include::{javaEchoServiceFile}[tags=service-call-context-read, indent=0]
+----
+tab:C#/.NET[]
+--
+
+=== Service Interceptor
+This feature allows the user to intercept the call to any service method except

Review Comment:
   Done, thanks



##########
docs/_docs/services/services.adoc:
##########
@@ -291,6 +294,78 @@ instead (`IgniteServices.serviceProxy(...)`).
 an issue for real jobs like working with a DB or a cache.
 ====
 
+== Service Middleware
+
+WARNING: This feature is experimental and may change in future releases.
+
+[CAUTION]
+====
+This feature may affect performance of service execution.
+====
+
+Apache Ignite allows the user to implement custom middleware logic for his 
services and provides the following features:
+
+1. Ability to implicitly pass custom immutable parameters from proxy to 
service (similar to request headers).
+2. Ability to define custom interceptor for service method calls.
+
+=== Service Call Context
+This feature allows the user to implicilty pass parameters to any service 
method without service re-deployment.
+
+The user can create context (map with custom parameters) and bind it to the 
service proxy. After that, each call to the proxy method will also implicitly 
pass context parameters to the service.
+
+[tabs]
+--
+tab:Java[]
+[source, java]
+----
+include::{javaFile}[tags=service-call-context-create, indent=0]
+----
+tab:C#/.NET[]
+--
+
+The user can read the `call context` using the `currentCallContext` method of 
`ServiceContext`.
+
+NOTE: Service call context is only accessible from the current thread during 
the execution of a service method.
+
+[tabs]
+--
+tab:Java[]
+[source, java]
+----
+include::{javaEchoServiceFile}[tags=service-call-context-read, indent=0]
+----
+tab:C#/.NET[]
+--
+
+=== Service Interceptor
+This feature allows the user to intercept the call to any service method except
+lifecycle methods (`init()`, `execute()` and `cancel()`).
+
+The user can specify one or more interceptors in the `ServiceConfiguration`. 
They are deployed with the service using the same class loader.
+
+Each interceptor invokes the next interceptor in the chain using a delegated 
call, the last interceptor will call the service method.

Review Comment:
   Done, thanks



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to