Skip to content

Commit 660570c

Browse files
committed
Documentation : Rest and Transport Action Threading Model
1 parent 1a45418 commit 660570c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/internal/GeneralArchitectureGuide.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,20 +103,20 @@ are coordinated.
103103
> the `Transport*Action` class that handles it.
104104
>
105105
> A netty [EventLoop] thread handles the initial steps of a `Rest*Action` request lifecycle such as decoding, validation and routing.
106-
> Upon entry into the "transport layer", [NodeClient] delegates the decision of execution to individual [TransportAction]. Each action
106+
> Upon entry into the "transport layer", [NodeClient] delegates the decision of execution to individual `TransportAction`. Each action
107107
> determines whether to execute synchronously on invoking thread-an approach reserved for lightweight processing-or to dispatch execution to an appropriate
108108
> thread pool, which is recommended practice for heavy workloads. Comprehensive mechanisms are available for propagating [ThreadContext] when tasks
109109
> are dispatched to alternate thread pools.
110110
>
111-
> [TransportAction] can also be initiated through peer-to-peer communication between nodes. In such cases, the [InboundHandler]
112-
> locates the appropriate [TransportAction] by consulting the [NamedRegistry], then invokes the [TransportAction]'s handleExecution() method. When a [TransportAction]
111+
> `TransportAction` can also be initiated through peer-to-peer communication between nodes. In such cases, the [InboundHandler]
112+
> locates the appropriate `TransportAction` by consulting the [NamedRegistry], then invokes the `TransportAction`'s handleExecution() method. When a `TransportAction`
113113
> is registered, it can specify an executor to control how the action is run. One option is the `DIRECT_EXECUTOR_SERVICE`, which executes the
114114
> action on the calling thread. However, this should be used with caution—it's only appropriate when the action is lightweight.
115115
> Otherwise, it risks blocking the peer-to-peer I/O thread, potentially degrading responsiveness and causing the node to become unresponsive.
116-
> If [TransportAction] elects a separate executor, [InboundHandler] performs message deserialization before delegating execution to the executor,
116+
> If `TransportAction` elects a separate executor, `InboundHandler` performs message deserialization before delegating execution to the executor,
117117
> refer to [TransportResponseHandler] method executor() for more details.
118118
>
119-
> [TransportAction] requests received from remote nodes are always deserialized on the Netty [EventLoop]. In contrast, [TransportAction] responses are
119+
> `TransportAction` requests received from remote nodes are always deserialized on the Netty `EventLoop`. In contrast, `TransportAction` responses are
120120
> deserialized only after being dispatched to the designated executor. Outbound messages, including both requests and responses, are serialized
121121
> synchronously on the calling thread.
122122

0 commit comments

Comments
 (0)