Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ks 296 dispatcher context and threading #13551

Merged
merged 1 commit into from
Jun 15, 2024

Conversation

ettec
Copy link
Collaborator

@ettec ettec commented Jun 14, 2024

The threading model chosen is one thread per capability, reasoning for this is as follows:

  1. Prevents a 'dodgy' capability impacting others within the node by blocking the receive thread

  2. Makes it easy to monitor per capability performance by monitoring the receive queue size

  3. This third benefit is debatable, small and something we may want to revisit once we understand with experience how load should be balanced across capabilities.....having said that....initally at least it is advantageous to have the Receive method of the capabilities single threaded as it keeps things relatively simple and easier to reason about should we encounter any issues.

jira issue: https://smartcontract-it.atlassian.net/browse/KS-296

#13524. depends on this PR.

Copy link
Contributor

@bolekk bolekk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the approach, thanks!

core/capabilities/remote/target/endtoend_test.go Outdated Show resolved Hide resolved
core/capabilities/remote/dispatcher.go Show resolved Hide resolved
core/capabilities/remote/dispatcher.go Outdated Show resolved Hide resolved
core/capabilities/remote/dispatcher.go Outdated Show resolved Hide resolved
core/capabilities/remote/dispatcher.go Outdated Show resolved Hide resolved
core/capabilities/remote/target/client.go Outdated Show resolved Hide resolved
@ettec ettec force-pushed the ks-296-dispatcher-context-and-threading branch from f9919ee to db1e3e2 Compare June 14, 2024 15:23
@ettec ettec force-pushed the ks-296-dispatcher-context-and-threading branch from db1e3e2 to 77606da Compare June 14, 2024 15:27
@ettec ettec marked this pull request as ready for review June 14, 2024 15:27
@ettec ettec requested a review from a team as a code owner June 14, 2024 15:27
@ettec ettec force-pushed the ks-296-dispatcher-context-and-threading branch from 77606da to 40ee34a Compare June 14, 2024 21:04
@ettec ettec force-pushed the ks-296-dispatcher-context-and-threading branch from 0c0b151 to f3f2225 Compare June 14, 2024 21:11
@ettec ettec enabled auto-merge June 14, 2024 21:55
@ettec ettec added this pull request to the merge queue Jun 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 14, 2024
@bolekk bolekk added this pull request to the merge queue Jun 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 14, 2024
@bolekk bolekk added this pull request to the merge queue Jun 15, 2024
Merged via the queue into develop with commit f7e0362 Jun 15, 2024
108 checks passed
@bolekk bolekk deleted the ks-296-dispatcher-context-and-threading branch June 15, 2024 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants