-
Notifications
You must be signed in to change notification settings - Fork 427
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
WebSocket client initiated heartbeating #238
Comments
Currently autobahn-java only support CBOR as serializer, implementing JSON serializer would be pretty simple but that's something we haven't looked into just yet. Does the same issue happen with wamp.2.cbor ? |
Without sending anything, TCP cannot distinguish between an infinitesimal slow connection and a broken connection (at least not when on different L2 network segments - try the same on a LAN). This is TCP (when used over WAN). There are 2 things here to fix this:
We don't have 2. yet - but we should. |
Again, this is very important for production use, but also in container based scenario where the order of container startup might not be fixed, and an ABJ component might be up earlier than the router, or when the router is restarted. |
@oberstet Can you link an example on how other WAMP implementations are doing this ? Should it be a WebSocket ping frame ? what should be the timeout for it and how often shall we send the ping (how shall we expose that functionality if we want the frequency to be configurable). Also I presume Crossbar itself does have ping-pong i.e. server initiated, is that on by default ? |
Also, is the heartbeat interval relevant to the success of prior request ? example: If I my heartbeat is configured to run every 10 seconds shall those 10 seconds begin after the PONG for previous PING returns or right from the time when PING was sent ? |
First implementation attempt is available: #238 |
@oberstet this is done, closing. |
By any chance is it possible to use WebSocketOptions with this to adjust the setReconnectInterval |
Test on desktop Java 8 with Netty the code from demo (modify it a little, and use wamp.2.json instead of wamp.2.cbor):
`
mSession = new Session(mExecutor);
`
When I switch off network cable there is no any reaction during infinite time. After network cable switched back - no reaction and no further work.
Thus it is not simple to know about connection problem for reconnection call.
The text was updated successfully, but these errors were encountered: