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

Fix communication over websocket so it will become truly asynchronous #1763

Open
AlexeyGirin opened this issue Aug 2, 2024 · 0 comments
Open
Assignees
Milestone

Comments

@AlexeyGirin
Copy link
Contributor

AlexeyGirin commented Aug 2, 2024

As a plugin developer,
I want to get backend processing tasks asynchronously,
So the plugin wouldn't need to adjust timeouts based on the time backend needs to complete background tasks.

The plugin uses ping-pong mechanism to understand whether the server is still online while processing background tasks. The problem is that answer to a specific message is sent only after answers to all previous messages has been sent. So at this moment message flow over websocket (simplified) looks like this:

-> schedule_css_locators_generation
-> ping
-> ping
<- schedule_css_locators_generation result
<- pong
<- pong

The correct flow would be

-> schedule_css_locators_generation
-> ping
<- pong
-> ping
<- pong
<- schedule_css_locators_generation result
@AlexeyGirin AlexeyGirin converted this from a draft issue Aug 2, 2024
@AlexeyGirin AlexeyGirin added this to the Release 3.17 milestone Aug 2, 2024
@AlexeyGirin AlexeyGirin changed the title увеличен ping timeout сервера до 30 секунд (pingTimeout), чтобы нивелировать ошибки от долгого ожидания ответа от be; Увеличен ping timeout сервера до 30 секунд (pingTimeout), чтобы нивелировать ошибки от долгого ожидания ответа от be; Aug 2, 2024
@AlexeyGirin AlexeyGirin moved this from BackLog to To do in JDN.AI Board Aug 5, 2024
@ivnglkv ivnglkv changed the title Увеличен ping timeout сервера до 30 секунд (pingTimeout), чтобы нивелировать ошибки от долгого ожидания ответа от be; Fix communication over websocket so it will become truly asynchronous Aug 6, 2024
@ivnglkv ivnglkv assigned Bojana33 and unassigned ivnglkv Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: QA
Development

No branches or pull requests

3 participants