17:48, EEST
July 2, 2020
Hi All,
I’m working with the Prosys SDK version 3.1.2 (perhaps too old, but the question is not here). In our process, we made asynchronous write to the server and add a listener to the serviceResponse to check if the write is ok or not as following :
AsyncResult response = client.writeAsync(valueToWrite);
response.setListener(new WriteResultListener(this, items));
where items is an internal class to store business information.
Sometimes, the opcua server seems to wait for remote servers answer (the opcua server is our point of connection, but is only a gateway to share information with other servers) and if we try to recall the previous code, the write of the command seems to wait the previous answer before sending the command to the server
Am i right ?
14:09, EEST
April 3, 2012
Hi,
In the world OPC UA and our SDK, that is old. But functionality-wise should not matter in this case.
Is the server also made with our SDK or with something else?
The only thing the XXXAsync methods do is that instead on blocking the calling thread until the server returned a response is that they instead call the callback (on internal worker thread pool) once the server responds. If the server does not respond, we also cannot call the callback. That is to say, if the server choses to process them sequentially with the first one blocking, then it would not start on the second one before the first one completed.
Assuming you could use NONE or just SIGN messagesecuritymode, you can verify this via https://www.prosysopc.com/blog/opc-ua-wireshark/ to see when the actual network traffic happens. You should see both WriteRequests be sent to the server (i.e. one whenever you did call the writeAsync). After server responds with WriteResponse you should see your callback being called.
Some extra notes based on some investigations. Note that the actual internal low-level message sending logic is very old and sort of “battle-tested” in the stack layer. Anyway, it seems due to it the writeAsync could also block if any other message is being sent (just the sending part), i.e. if you would call the method twice, they might both return only after both messages were pushed to the tcp stream. But I would not complete rule out possible bugs there, just that we most likely would have heard them by now if they would be “that major”.
Most Users Ever Online: 1919
Currently Online:
69 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: 739
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1524
Posts: 6453
Newest Members:
shaylamaggard4, rickyjuarez140, jonathonmcintyre, fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmonsModerators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1027, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1