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

Server - client communication, strategies for delayed or missing responses to requests #29

Open
Trilarion opened this issue Jul 30, 2017 · 2 comments

Comments

@Trilarion
Copy link
Owner

Something like at least once every 5s and disconnect if fail for third time. Maybe send special kind of message including a random number which just needs to be echoed in order to pass.

@krs013
Copy link
Contributor

krs013 commented Jul 30, 2017

Does the server initiate transactions regularly? If not, it may be more appropriate for the client to periodically send an I'm alive packet of some sort to the server, and if the server doesn't receive one after some timeout (say, 60 seconds), it can just drop the connection. I'm no expert, but I think that form is more normal for this use case.

@Trilarion
Copy link
Owner Author

Trilarion commented Jul 31, 2017

Now that I thought more about this, I even wonder why I wanted to have this feature. The network connection kind of keeps itself alive by itself (the socket gets closed if either client or server somehow disappears). For all other requests you would have to set sensible timeouts anyway.

Example:

Client sends request X to server, what if server doesn't answer by amount of time Y?
Case 1: Client doesn't need response to X anymore, just gives up.
Case 2: Client tries again.
Case 3: Client is in a "bad" state, informs user and/or closes connection to server.

The same holds true for the server. The potential strategies may vary for each request.

Currently there is no support for this, we currently expect to always receive a response (within a reasonable time). This is probably not enough.

@Trilarion Trilarion removed the task label Jul 31, 2017
@Trilarion Trilarion changed the title Ping connected clients regularly and throw them out if not responding Server - client communication, strategies for delayed or missing responses to requests Jul 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants