Skip to content
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

Transparently handle session terminations during long-polling between Proxy and Broker #70

Open
TKussel opened this issue Nov 2, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@TKussel
Copy link
Member

TKussel commented Nov 2, 2022

If the long-polling of tasks or results is disrupted by session terminations (e.g. caused by latency spikes), the proxy client is not informed of that connection loss. An alternative, transparent long-polling mechanism could look like the following:

The long polling wait_time is set as a maximum wait time. If no wait_time is given, a sensible default cap is chosen (e.g. 1 minute). The proxy chooses a lower wait time for repeated long-polls to the broker, up to the chosen maximum time. The timeout for that connection is chosen using a learning mechanism analyzing previous requests (and optionally an echo endpoint in the broker) and converging to an optimal time.

In case of a fast, unimpeded connection, the result is returned – as expected by the application – as fast as it is available in the broker or at least partially after wait_count. In case of a broken session, the connection is transparently reinitialized by the proxy.

@TKussel TKussel added the enhancement New feature or request label Nov 2, 2022
@lablans
Copy link
Member

lablans commented Mar 13, 2023

Check if this is still required with the SSE interface #105

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants