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

Client to queue request messages to server and resend them when needed #20507

Open
mshabarov opened this issue Nov 19, 2024 · 0 comments · May be fixed by #20749
Open

Client to queue request messages to server and resend them when needed #20507

mshabarov opened this issue Nov 19, 2024 · 0 comments · May be fixed by #20749

Comments

@mshabarov
Copy link
Contributor

Client should queue all send requests and only send the next after previous has received a response.
Server always responds to the client message.

  • Create a queue for send(payload) requests that is then cleared by sendInvocationsToServer
  • First input to the queue is sent immediately, but only removed when the response is received
  • Add a timeout for resending the message if no response is gotten for an x amount of time.

We already have the ServerRpcQueue that queues invocations to be sent and are sent in order when MessageHandler has handled json and runs processMessage or in handleJSON when old package is received

Looking at components at least SpreadSheet uses send directly:

        if (payload != null) {
            getLogger().info("Re-sending last message to the server...");
            getConnection().getMessageSender().send(payload);
        } else {
@mshabarov mshabarov converted this from a draft issue Nov 19, 2024
@mshabarov mshabarov moved this from 📥Inbox - needs triage to 🪵Product backlog in Vaadin Flow ongoing work (Vaadin 10+) Nov 19, 2024
@mshabarov mshabarov moved this from 🪵Product backlog to 🟢Ready to Go in Vaadin Flow ongoing work (Vaadin 10+) Nov 27, 2024
@mshabarov mshabarov moved this from 🟢Ready to Go to 🪵Product backlog in Vaadin Flow ongoing work (Vaadin 10+) Nov 27, 2024
@mshabarov mshabarov moved this from 🪵Product backlog to 🟢Ready to Go in Vaadin Flow ongoing work (Vaadin 10+) Dec 4, 2024
@mshabarov mshabarov moved this from 🟢Ready to Go to 🪵Product backlog in Vaadin Flow ongoing work (Vaadin 10+) Dec 4, 2024
@mshabarov mshabarov moved this from 🪵Product backlog to 🟢Ready to Go in Vaadin Flow ongoing work (Vaadin 10+) Dec 11, 2024
@mshabarov mshabarov self-assigned this Dec 13, 2024
@mshabarov mshabarov moved this from 🟢Ready to Go to ⚒️ In progress in Vaadin Flow ongoing work (Vaadin 10+) Dec 13, 2024
@mshabarov mshabarov removed their assignment Dec 13, 2024
@mshabarov mshabarov moved this from ⚒️ In progress to 🟢Ready to Go in Vaadin Flow ongoing work (Vaadin 10+) Dec 13, 2024
@caalador caalador self-assigned this Dec 16, 2024
@caalador caalador moved this from 🟢Ready to Go to ⚒️ In progress in Vaadin Flow ongoing work (Vaadin 10+) Dec 16, 2024
caalador added a commit that referenced this issue Dec 19, 2024
Add sent payloads to message
queue and resend if no response
to message inside MaxMessageSuspendTimeout

fixes #20507
@caalador caalador linked a pull request Dec 19, 2024 that will close this issue
caalador added a commit that referenced this issue Dec 19, 2024
Add sent payloads to message
queue and resend if no response
to message inside MaxMessageSuspendTimeout

fixes #20507
caalador added a commit that referenced this issue Dec 20, 2024
Add sent payloads to message
queue and resend if no response
to message inside MaxMessageSuspendTimeout

fixes #20507
caalador added a commit that referenced this issue Dec 20, 2024
Add sent payloads to message
queue and resend if no response
to message inside MaxMessageSuspendTimeout

fixes #20507
caalador added a commit that referenced this issue Dec 20, 2024
Add sent payloads to message
queue and resend if no response
to message inside MaxMessageSuspendTimeout

fixes #20507
caalador added a commit that referenced this issue Dec 20, 2024
Add sent payloads to message
queue and resend if no response
to message inside MaxMessageSuspendTimeout

fixes #20507
caalador added a commit that referenced this issue Dec 20, 2024
Add sent payloads to message
queue and resend if no response
to message inside MaxMessageSuspendTimeout

fixes #20507
caalador added a commit that referenced this issue Dec 23, 2024
Add sent payloads to message
queue and resend if no response
to message inside MaxMessageSuspendTimeout

fixes #20507
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: ⚒️ In progress
Development

Successfully merging a pull request may close this issue.

2 participants