-
Notifications
You must be signed in to change notification settings - Fork 2
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 messages are being dropped #131
Labels
Comments
We decided that the best + easiest workaround is to actually close the websocket connection from the server side after a short delay. That should give the browser enough time to actually read + process all datapoints before the connection close causes it to lose the final points. |
Filed juttle/juttle-service#9 to track fixing this in juttle-engine. |
mstemm
pushed a commit
that referenced
this issue
Feb 4, 2016
This is a fix for #131, taking parts of the fix from juttle-engine for juttle/juttle-engine#9. I didn't bother with a fully configurable timeout. I did copy over a unit test to ensure that there is a delay between the job_end message and the websocket being closed.
Un-assigning this from myself as it's for the old product. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There have been some reports of outrigger not showing all the points coming out of a juttle program.
A program to reproduce this:
The json file (needs to be renamed to .json): dense.txt
If you run this program, you will get a timechart with the following time range:
According to the data, the time should actually go up to
00:59:59
.In debugging this, i tried adding the following right after this line:
What I saw was a bit puzzling:
In the screenshot, there are 8 messages with
type: "points"
but in the console,"points"
is only printed 6 times. Additionally, the"sink_end"
and"job_end"
messages are never printed. So the browser is certainly receiving them according to chrome dev tools, but somehow our WebSocketonmessage
event listener isn't seeing them before it gets theonclose
event.Wondering if waiting longer in outrigger to close the websocket would make the problem go away, I tried adding a 1 second setTimeout on this line before actually closing the websocket. Sure enough, I started seeing all the messages:
And as expected the timechart shows the full range:
So...a bit uncertain as to what is going on. Is outrigger closing the websocket too soon? Should we be sending back acknowledgements from the browser? The browser certainly seems to be receiving the messages, just not our WebSocket onmessage handler.
@mnibecker @mstemm, you guys have dealt with some race conditions related to websockets in outrigger/juttle-client-library...any thoughts on what could be going on here?
The text was updated successfully, but these errors were encountered: