awwx / meteor-offline-data

Meteor offline data project.
MIT License
111 stars 9 forks source link

Reliable dead window detection #3

Open awwx opened 11 years ago

awwx commented 11 years ago

The current code checks for dead windows by broadcasting a "ping" message, and then seeing which windows reply with a "pong" message within a timeout.

However, if the user's computer is overloaded, a window might not reply in time even if it is still alive. (Increasing the timeout would make this happen less often, but doesn't guarantee successful detection... and the longer the timeout, the longer it takes to detect that the agent window has crashed and to promote a new agent).

A more reliable method of dead window detection would be nice, though I'm not aware of one currently available in HTML5 technologies. (Which is too bad, since of course the browser knows which windows it's killed).