-
Notifications
You must be signed in to change notification settings - Fork 956
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
Added a new setting MessageTransportMode which enables the user to decide if DataEfficiency or TimeCriticality is important #2882
base: master
Are you sure you want to change the base?
Conversation
/azp run |
Pull request contains merge conflicts. |
e3597ee
to
f597c7d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2882 +/- ##
==========================================
+ Coverage 55.37% 55.45% +0.07%
==========================================
Files 352 352
Lines 67602 67614 +12
Branches 13849 13851 +2
==========================================
+ Hits 37437 37497 +60
+ Misses 26059 26015 -44
+ Partials 4106 4102 -4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 17 changed files in this pull request and generated no comments.
Files not reviewed (11)
- Stack/Opc.Ua.Core/Schema/ApplicationConfiguration.xsd: Language not supported
- Libraries/Opc.Ua.Client/Session/Session.cs: Evaluated as low risk
- Libraries/Opc.Ua.Configuration/ApplicationConfigurationBuilder.cs: Evaluated as low risk
- Libraries/Opc.Ua.Configuration/IApplicationConfigurationBuilder.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Schema/ApplicationConfiguration.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Client/RegistrationClient.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Client/SessionChannel.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Client/UaChannelBase.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Tcp/TcpMessageSocket.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Tcp/TcpServerChannel.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Tcp/TcpTransportListener.cs: Evaluated as low risk
Comments suppressed due to low confidence (2)
Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryClientChannel.cs:75
- [nitpick] The variable name m_transportMode should be reviewed for consistency with the naming conventions used in the rest of the codebase.
m_transportMode = transportMode;
Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryClientChannel.cs:42
- Ensure that there are test cases covering the new behavior introduced by MessageTransportMode.
MessageTransportMode transportMode = MessageTransportMode.DataEfficient)
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 6 out of 17 changed files in this pull request and generated no comments.
Files not reviewed (11)
- Stack/Opc.Ua.Core/Schema/ApplicationConfiguration.xsd: Language not supported
- Stack/Opc.Ua.Core/Stack/Client/SessionChannel.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryTransportChannel.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Tcp/UaSCBinaryClientChannel.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Tcp/TcpMessageSocket.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Client/UaChannelBase.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Tcp/TcpTransportListener.cs: Evaluated as low risk
- Libraries/Opc.Ua.Client/Session/Session.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Tcp/TcpServerChannel.cs: Evaluated as low risk
- Stack/Opc.Ua.Core/Stack/Transport/IMessageSocket.cs: Evaluated as low risk
- Libraries/Opc.Ua.Configuration/IApplicationConfigurationBuilder.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)
Stack/Opc.Ua.Core/Stack/Transport/TransportChannelSettings.cs:131
- Ensure that the new behavior introduced by the MessageTransportMode setting is adequately covered by tests.
public MessageTransportMode TransportMode
I'm kindly requesting a feedback for this PR, since we need it in Production. |
First off, why not always set NoDelay? Also, why are you always connecting for every method call? Can you not keep the session around to save yourself the connect cost? |
Thank you for your response. Firstly, regarding the use of Secondly, I honestly have no clue where you came up with the information that we supposedly do not keep the session open. If it is for the latency - our PLC has a cycle time of 5ms and it is introducing this latency. The session is open and kept alive at all times. |
…cide if DataEfficiency or TimeCriticality is the important factor in their use-case.
f597c7d
to
55e1baa
Compare
Proposed changes
I and my colleagues encountered a perfomance issue lately using the default OPC UA Stack.
We were issuing a method call and waited in parallel for a node value to change. Which signalled the end of the running method.
Calling the method alone took us 17ms in median, but when waiting for the node value changes to occurr we suddenly were waiting for up to 200ms. However, we were rather expecting about 45ms.
Debugging into the OPC UA stack I realized, when I set the
NoDelay
property of the Socket totrue
that these 200ms shrunk down to 47ms in median, totally meeting our expectations.In this PR I propose a new setting in the application configuration. I call it
MessageTransportMode
and the user can select between two modesDataEfficient
(NoDelay = false
) andTimeCritical
(NoDelay = true
). These settings are added into theClientConfiguration
andServerConfiguration
sections of theApplicationConfiguration
and passed throgh the whole stack.Related Issues
Types of changes
What types of changes does your code introduce?
Put an
x
in the boxes that apply. You can also fill these out after creating the PR.Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.Further comments
None