March 16, 2018 at 8:12 pm #813
I’m currently developing a “boat server” where I pick up NMEA data sent from iKommunicate for further analysis. I’m using nodejs as framework.
The problem is that after 10-15 minutes iKommunicate stops sending data over the established ws link. The only way to get data again is to close the ws connection and then reopen it.
Question: Does it exist any kind of ping/pong procedure in iKommunicate WS implementation?March 19, 2018 at 3:16 pm #828
We have no known issues with web socket stability. Have you tried running either of the hosted web apps that use web sockets (Instrument Panel, iKompass or the Websocket Logger) for long periods?
It would be good to prove if it is specific to your NodeJS implementation.
We do not use a Ping/Pong type procedure on iKommunicate, just another thing to create incompatibility. I have been told that some firewalls can cut idle WS connections, but never experienced it myself.
However when a web app opens a web socket with iKommunicate, it will send a hello message and then even if there is no NMEA0183 or NMEA2000 data being received and therefore no Signal K Delta messages, iKommunicate will send a Signal K “heartbeat” Delta message every second…
Hope this answers your question and please come back with anymore questions or feedback on your testing.
PAULMarch 20, 2018 at 8:05 pm #834
I have tested for a longer period using the hosted Websocket logger app. Unfortunately, the websocket data stream become silent after a while.
Also, I have rewritten my node app and have tested it with different node modules for websocket connection. The one which are the most stable is ws (look at npm ws).
After approximately 42500 +/- 2000 messages the link become silent. No messages from iKommunicate, but the link is up and stated as OK seen from the client. When it has been silent for approximately 1,5 minute, I send ws.close() and after received the acknowledge I establish a new connection and everything is OK for the next approximately 42500 websocket messages. I have run this test the past 24 hours, and the link become silent all the time after 42500 +/- 2000 messages.
So, I think the solution for my sailboat server is to have a routine that verify that there is data on the websocket link; If no data for a couple of minutes then disconnect the connection and establish a new websocket connection
The dreamer and sailor from NorwayMarch 20, 2018 at 8:12 pm #836
Few seconds ago, I checked the status of my NodeJS test app, and during the last round it received 98888 messages before the link became silent. I will let it continue the test during the night and check the log again tomorrow morning.March 29, 2018 at 6:17 pm #869
The past days I have performed several tests using different implementation of websocket. All the time I get 40-50k messages before the link become silent, but from time to time I receive close to 100k messages before the link become silent.
My workaround is to have a small “CheckIfDataStilOnLink” function and if result is false I disconnect and connect the websocket link and everything is fine for the next 40-50k messages.
SveinApril 3, 2018 at 12:30 pm #876
Glad you have found a work around, but I will discuss the results you have found with our developers and see if we can track down what is happening.
I’ll post some more feedback on here ASAP.
You must be logged in to reply to this topic.