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

Duration behavior during session extension #288

Open
daniel-dierich opened this issue Apr 30, 2024 · 2 comments
Open

Duration behavior during session extension #288

daniel-dierich opened this issue Apr 30, 2024 · 2 comments
Labels
v0.11.0 Within scope for v0.11.0

Comments

@daniel-dierich
Copy link

daniel-dierich commented Apr 30, 2024

Problem description
Currently, when extending a session, the additional duration is added on top of the original duration from the session creation. For example when creating a session with a duration of 60s, then waiting for 10s, and extending it for 20s, the new duration is 80s.

Also when currently performing GET /sessions/{sessionId} it is not clear if the duration in the response should be the remaining session duration or the duration the session was created with.

Suggested behavior
The session extension should be added to the remaining time. So creating a session with a duration of 60s, waiting for 10s and extending it for 20s should lead to a new duration of 70s.

In order to provide the values of the original, remaining and extended duration, the duration field at GET /sessions/{sessionId} could be turned into a duration object including the different duration values:

duration: { "original": "60", "extended": "70", "remaining": "50" }

@maxl2287
Copy link
Collaborator

maxl2287 commented May 2, 2024

I aggree on that point from a developer PoV.
It's unclear for us, if we should update the original "duration" - value (e.g. in this case it's "60") or just the remaining time during extending a session.

Having here an object may also be more clear for the consumer to see, what was the original duration and what is the extended duration.
And of course how many seconds are left. This value changes on every GET /sessions/{sessionId} - request.

@jlurien
Copy link
Collaborator

jlurien commented May 3, 2024

This is also related to the discussion in #280. We have to make clear in the API spec the date-time when the QoS session effectively "startedAt" and when the session is about to expire ("expiresAt"), taking into account the extensions. Then, "session duration" should be the interval between both, and the remaining time is the interval between "now" and "expiresAt". We may discuss if we need to add a new property to save the "requestedDuration" (before any extension).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v0.11.0 Within scope for v0.11.0
Projects
None yet
Development

No branches or pull requests

4 participants