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

Connection improvements #53

Open
wowawiwa opened this issue May 28, 2020 · 1 comment
Open

Connection improvements #53

wowawiwa opened this issue May 28, 2020 · 1 comment

Comments

@wowawiwa
Copy link
Collaborator

wowawiwa commented May 28, 2020

Reformulated:

When the SSE connection is interrupted (e.g. because the user switched tab, or networking issues).
Then the BE ends up dropping the session after a while. If the FE doesn't notice it, it could show the user wrong information.
For example, the FE shows the Room, but updates aren't received.

As long as the SSE connection is not doing errors, the session cannot have been lost.
But on error: It could be because of networking error. In this case, the session has not been lost: Only the SSE must be reopen.
Or it could be that the session has been Lost.
But the SSE api doesn't seem to allow knowing that. Thus, we must find a way for the FE to ask the BE if the session is still there.

Original:

  • EventSource connection has TTL 3 minutes. If the client goes in a tunnel for more than that, the client will fail reconnecting, he should hello again. This isn't handled. (How to catch this in the EventSource thing?).
  • Allow UI to send "close session" (case where the user closes the session on purpose).
@wowawiwa
Copy link
Collaborator Author

@abustany please confirm if it fits to what we discussed.

FE generates a new SessionID on App loading. It represents a distinct journey of the user on the App.

It sends it as parameter in the initial and subsequent hello (sessionId, together with clientId, secret).

hello responds with the eventsUrl and newSession: boolean which states if it has a session corresponding to the SessionID or not. If it doesn't have any, it creates one. Otherwise, it "touches" the existing session.

The intent is for the FE to be able to confirm if it is still in sync with the BE after a connection interruption.

@wowawiwa wowawiwa changed the title Connection improvements (TBD) Connection improvements Jun 27, 2020
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

1 participant