Mastonet
Mastonet copied to clipboard
Streaming robustness proposal
I gave some thought to streaming robustness, and here's an unsolicited/proposal for a change that might help to improve the robustness of streaming. You can provide optional timeout
and restart
parameters.
If timeout
is provided, the TimelineHttpStreaming
and TimelineWebSocketStreaming
will count time since the last successful message (or comment) is received through the stream, and time out if it has been longer than the timeout
provided.
If restart
is true
(default = true
), then on a timeout, it will attempt to reconnect and restart the stream. If not, it'll throw the TimeoutException
up the stack.
I've not given it a test yet - it's more of a proposal to talk through. What do you think?
Fixes: #89