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

provides lease extension spec #311

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

OlegDokuka
Copy link
Member

This PR provides a Lease frame extension so now one can override a default Lease strategy and provide one of the supported or event implement a custom one using CompositeMetadata extensions during the setup phase.

Note, this does not break existing Lease spec and is just an addition which is enabled only when the Metadata Payload content is present in the setup metadata

@OlegDokuka OlegDokuka force-pushed the enchancement/leasing-extension branch from 0c3d3a3 to 7fb802c Compare August 23, 2020 10:16
@OlegDokuka OlegDokuka changed the title provides leasing extensions spec provides lease extension spec Aug 23, 2020
Extensions/Leasing/Leasing.md Outdated Show resolved Hide resolved
Extensions/Leasing/Leasing.md Outdated Show resolved Hide resolved
Protocol.md Outdated Show resolved Hide resolved
Extensions/Leasing/ConcurrencyLimitLeasing.md Outdated Show resolved Hide resolved
@OlegDokuka OlegDokuka force-pushed the enchancement/leasing-extension branch from dc64b5f to 3a6f1e2 Compare August 25, 2020 18:21
[wk]: WellKnownLeaseStrategies.md

Note, if the selected lease strategy has a different frame layout than the default one, the first [`LEASE`][lf] frame MUST follow the default [`LEASE`][lf] frame layout, in order to let the `Client` read metadata field content

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also deal with the possibility that a server does not specify any strategy in the LEASE frame such as when the server is unaware of and does not support the extension. I suppose in that case "Request Count" is chosen by default although the client may not have included that in its list of choices. Should "Request Count" be required then as a fallback?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, we should mention that the first lease frame may have zero ttl and zero permits in order to specify lease preferences

@OlegDokuka OlegDokuka modified the milestones: 1.0, 2.0 Sep 23, 2020

### Handling Unexpected

If `Server` does not specify lease strategy defined in the [negotiation](#negotiation) section, the `Client` MUST close the connection with the __CONNECTION_ERROR__ [Error Code][ec] and reestablishe connection without specifying lease strategies or without leasing at all.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo reestablishe -> reestablish

Copy link
Member

@whyoleg whyoleg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Protocol lease semantics section also need to be adapted with support for new lease strategies.

But I'm really curious, is it really ok, to change layout of frame, by extension? Isn't it better (if possible) to change layout of lease frame to have some Lease payload that will be decoded differently, depending on specified strategy. Almost nothing will be changed, except, that current default lease strategy description will be moved from core protocol, and so it will be easily understandable, that lease frame payload can be different (something similar to authentication spec). Such change is more related to how, it will be written in spec, and should not affect implementation details, described in proposal

Extensions/Leasing/ConcurrencyLimitLeasing.md Outdated Show resolved Hide resolved
Co-authored-by: Oleg Yukhnevich <whyoleg@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants