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

Asynchronous version of Subscription.Create() #919

Closed
mibos-kremer opened this issue Mar 13, 2020 · 6 comments · Fixed by #1498
Closed

Asynchronous version of Subscription.Create() #919

mibos-kremer opened this issue Mar 13, 2020 · 6 comments · Fixed by #1498
Assignees
Labels
enhancement API or feature enhancement
Milestone

Comments

@mibos-kremer
Copy link
Contributor

Hello,

When registering subscriptions, I am noticing some hiccups when calling Subscription.Create() in the Client module (Usually around 200ms per call).

After some profiling, it seems that the m_session.CreateMonitoredItems() call (inside CreateItems()) is mainly responsible for this delay. There is an asynchronous version of CreateMonitoredItems, but it does not seem to be possible to use this along with the existing Subscription class.

Would it be possible to get an asynchronous version of Subscription.Create()? Or is there another way to speed up the creation of subscriptions?

Sincerly,
Michiel

mibos-kremer added a commit to mibos-kremer/UA-.NETStandard that referenced this issue Mar 16, 2020
mibos-kremer added a commit to mibos-kremer/UA-.NETStandard that referenced this issue Mar 16, 2020
@mregen mregen added the enhancement API or feature enhancement label Mar 20, 2020
@mregen
Copy link
Contributor

mregen commented Mar 20, 2020

Please stay tuned and thanks for #919, we need some time to discuss async API extensions. Thanks

@mregen
Copy link
Contributor

mregen commented Jun 6, 2020

If we want to be async we should add an API layer for APM/TPL for all public client API.
I started an API prototype based on your #919 here https://github.com/mregen/UA-.NetStandardLibrary/blob/asyncsubscription/SampleApplications/SDK/Opc.Ua.Client/SubscriptionAsync.cs to show how it could look like.
Once agreed we need to do it for all public API across the board. Need to get feedback if this is a feasible extension in the long run.

@mregen
Copy link
Contributor

mregen commented Jun 19, 2020

More tbd. Needs Modelcompiler updates https://github.com/mregen/UA-ModelCompiler/tree/no_servicemodel and here is a prototype: https://github.com/mregen/UA-.NetStandardLibrary/tree/servicemod_plc
This is quite a bigger workitem which we need to schedule once repo split is done.

@mregen
Copy link
Contributor

mregen commented Jan 28, 2021

waiting for #1255

@PierluigiCarusoOcima
Copy link

PierluigiCarusoOcima commented May 26, 2021

@mregen any news now that #1255 has beem closed?

@mregen
Copy link
Contributor

mregen commented Sep 6, 2021

Hi @mibos-kremer , sorry for the lengthy delay, finally I prepared a async subscription extension but I'm not planning on APM stubs because there are now the TPL async stubs in core. Do you think this will sufficient to address the problem you were seeing?
--> see #1498

@mregen mregen self-assigned this Sep 6, 2021
@mregen mregen added this to the 1.4.367 milestone Sep 6, 2021
mregen added a commit that referenced this issue Sep 7, 2021
fixes #919 and #921

- enable async client stubs in core
- add async versions for subscription management
- APM versions will not be included...

based on PR #919 from @mibos-kremer

Co-authored-by: Michiel <m.bos@kremer.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement API or feature enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants