Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Subscription Multithreading issue?
January 19, 2017
12:24, EET
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

Hello together,
at the moment we have following strange behaviour:
We have a subscription on a value: Normally this works perfect, and we get updates about the value.

Now we are calling a method on another connection (UaClient) and this method execution takes quite a while (ca. 20sec). While this method is blocking the main thread no new subscriptions values are received.

When we made the method call in a new thread, we got the subscription values.

Doesn’t the prosys stack add a new thread, when adding a subscription and running this independently from the main thread?

lg Manu

January 19, 2017
15:13, EET
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hello,

The SDK and Stack use a thread pool for different service calls, so the operation that you described should not happen. This means that the subscription in your application should be working normally regardless of another long running service call made simultaneously.

Just out of curiosity: what platform are you using?

January 19, 2017
15:43, EET
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

It’s just a normal laptop with Windows…

January 19, 2017
16:07, EET
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Thank you for the information.

We’re happy to take a look if you have some code example about how to reproduce this. If possible, prepare the code example with SampleConsoleClient/-Server applications in the Java SDK. Otherwise it’s hard to say what’s going wrong because I’m not able to reproduce the same issue myself and in principle this shouldn’t happen.

January 20, 2017
12:16, EET
Avatar
kapsl
Member
Members
Forum Posts: 57
Member Since:
December 20, 2016
sp_UserOfflineSmall Offline

Hi,
indeed it’s difficult to provide a code examples, because there is quite a lot of code behind. Using an extra thread solved the problem, also it is not the ideal solution. And for future use we anyway plan to call the method let it return quickly and then send an event if a longer running task is finished.

Just because I’m curious is there anything implemented for this “programs” (as longer tasks) in the prosys stack, yet? I have not found a single example or something….

Thanks,
lg Manu

January 26, 2017
16:49, EET
Avatar
Heikki Tahvanainen
Member
Members
Forum Posts: 402
Member Since:
April 17, 2013
sp_UserOfflineSmall Offline

Hi Manu,

Unfortunately, there’s no examples about the Programs specification in the Java SDK currently. That being said, there’s also no known issues prohibiting you from developing applications according to the Programs specification.

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
65 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 737

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6450

Newest Members:

fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1