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 session termination management #167

Closed
DmiSergeev opened this issue Sep 10, 2018 · 0 comments · Fixed by #188
Closed

Client session termination management #167

DmiSergeev opened this issue Sep 10, 2018 · 0 comments · Fixed by #188
Assignees

Comments

@DmiSergeev
Copy link
Contributor

DmiSergeev commented Sep 10, 2018

Motivation

Currently, there is no concept of the closed session: clients come and go, create sessions, send transactions, and forget about them. This concept is important, without it we cannot:

  • Understand that the session data can be cleaned up (State machine session data cleanup #168).
  • Provide the client an information that some session was aborted during the execution of some of its transactions.

Proposition

First, we need to introduce the session state: it might be active or terminated. Then, we define 3 termination ways:

  • Explicit termination by the client (normal case): the client needs to do it after it finishes sending transactions.
  • Aborted (or failed) termination: if an unrecoverable error happened during transaction processing.
  • Expiration: the session is terminated automatically after some 'period' (measured in time or number of transactions or blocks) without transactions from the client.

Whichever the session termination type was, if the client sends any transaction in the terminated session, it fails and the client is notified about it. It should also cause all in-flight requests to fail, so if the client is still waiting on the response (e. g. on promise or awaitable) or retrieves it later, it will receive an error.

This proposal implies some mechanism for closed session's data cleanup, it is to be implemented in #168.

@DmiSergeev DmiSergeev self-assigned this Sep 14, 2018
DmiSergeev added a commit that referenced this issue Sep 25, 2018
Session termination (#167): the client sessions are closed by 1 of 3 reasons: explicitly by the client, due to an error, being expired after inactivity.
Python cross-version client (2 & 3), refactoring, and documentation (#158).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant