12/13/2020
I like to confirm the architecture involving opcua and web sockets implementation:
At the edge side:
Opcua server#1-> web socket server#1 installed with libwebsockets library
At the cloud side:
Opcua server#2 -> web socket server #2 installed with libwebsockets library
web socket server#1 <-> web socket server#2 persistent connection over internet
please advise if my understanding above is correct.
12/13/2020
Oh maybe I amend the architecture as follows:
———
At the edge side:
Opcua server#1 and web socket proxy#1 installed with libwebsockets library :: listener
At the cloud side:
Opcua client#2 and web socket proxy #2 installed with libwebsockets library :: connecting to edge
once opcua client#2 completed the handshake with opcua server#1 via proxy#2 and proxy#1, a persistent connection will be established as follows:
Opcua server#1 <- web socket proxy#1 <- web socket proxy#2 <- opcua client#2
::persistent connection over internet A<-B ie B initiates connection request,
12/13/2020
I just tried libwebsockets library to build a proxy server, and tested with a generic web socket client successfully.
My plan is as follows:
1. extend to opcua server by fronting it with a web socket proxy server
2. Use the same web socket client to access opcua server via the proxy server
once this is successful, I will extend to 2 instances of proxy server to simulate WAN connection.
i am not using any cots https server eg ibm, Apache for now
12/13/2020
Hi Randy,
I forget to inform that I am using open62541.org open source version of OPCUA and warmcat libwebsockets library.
I can instantiate a websocket port listening on 7681 and am able to test it out using a simple off-the-shelf Websocket client.
Now, i want to check with you on the concepts of OPCUA-websockets. I read that once the websockets on the OPCServer is up and running, any websocket client connecting to it will just need to send 1 http request to OPCServer to get the value of a node variable (a monitored item).
If there are any subsequent changes (say every 9 seconds the node gets updated with a new value), the websocket client will get the latest value 'without' sending any new http request anymore. In essence, can i take it that websockets connection is persistent and the data from the OPCServer flows continuously (streaming) to the clients connecting to it and is subscribing to the said variable node?
Currently, i have implemented addDataSetWriter() and can publish dataSetFields to a mqtt broker. At the same time, i want to also avail the same data to clients connecting via websockets.
In order to achieve this behavior at the server end, do i just write the data packet to socket 7681?
1 Guest(s)