From d791254b3d81bfaa040550c9dce81830d1c7c545 Mon Sep 17 00:00:00 2001 From: Oleh Dokuka Date: Tue, 25 Aug 2020 21:12:00 +0300 Subject: [PATCH] fixes for the spec and observed typos --- Extensions/Leasing/ConcurrencyLimitLeasing.md | 7 ++++--- Extensions/Leasing/FramesCountLeasing.md | 4 ++-- Extensions/Leasing/Leasing.md | 12 ++++++------ Protocol.md | 4 ++-- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Extensions/Leasing/ConcurrencyLimitLeasing.md b/Extensions/Leasing/ConcurrencyLimitLeasing.md index 5a60669..11a21cb 100644 --- a/Extensions/Leasing/ConcurrencyLimitLeasing.md +++ b/Extensions/Leasing/ConcurrencyLimitLeasing.md @@ -15,9 +15,9 @@ TODO +-----------+-+-+---------------+-------------------------------+ |Frame Type |0|M| Flags | +-----------+-+-+---------------+-------------------------------+ + |0| Time-To-Live | + +---------------------------------------------------------------+ |0| Concurrency Limit | - + + - | | +---------------------------------------------------------------+ Metadata ``` @@ -25,7 +25,8 @@ TODO * __Frame Type__: (6 bits) 0x02 * __Flags__: (10 bits) * (__M__)etadata: Metadata present -* __Concurrency Limit__: (63 bits = max value 2^63-1 = 9,223,372,036,854,775,807) Unsigned 63-bit long of Number of Max Concurrent Requests at a time. Value MUST be >= 0. +* __Time-To-Live (TTL)__: (31 bits = max value 2^31-1 = 2,147,483,647) Unsigned 31-bit integer of Time (in milliseconds) for validity of LEASE from time of reception. Value MUST be > 0. +* __Concurrency Limit__: (63 bits = max value 2^31-1 = 2,147,483,647) Unsigned 31-bit long of Number of Max Concurrent Requests at a time. Value MUST be >= 0. A Responder implementation MAY stop all further requests by sending a LEASE with a value of 0 for __Concurrency Limit__. diff --git a/Extensions/Leasing/FramesCountLeasing.md b/Extensions/Leasing/FramesCountLeasing.md index 584bece..fbd6fd9 100644 --- a/Extensions/Leasing/FramesCountLeasing.md +++ b/Extensions/Leasing/FramesCountLeasing.md @@ -26,10 +26,10 @@ TODO * __Frame Type__: (6 bits) 0x02 * __Flags__: (10 bits) * (__M__)etadata: Metadata present -* __Time-To-Live (TTL)__: (31 bits = max value 2^31-1 = 2,147,483,647) Unsigned 31-bit integer of Time (in milliseconds) for validity of LEASE from time of reception. Value MUST be >= 0. +* __Time-To-Live (TTL)__: (31 bits = max value 2^31-1 = 2,147,483,647) Unsigned 31-bit integer of Time (in milliseconds) for validity of LEASE from time of reception. Value MUST be > 0. * __Number of Frames__: (31 bits = max value 2^31-1 = 2,147,483,647) Unsigned 31-bit integer of Number of Frames that may be sent until next LEASE. Value MUST be >= 0. -A Responder implementation MAY stop all further frames by sending a LEASE with a value of 0 for __Number of Frames__ or __Time-To-Live__. +A Responder implementation MAY stop all further frames by sending a LEASE with a value of 0 for __Number of Frames__. When a LEASE expires due to time, the value of the __Number of Frames__ that a Requester may make is implicitly 0. diff --git a/Extensions/Leasing/Leasing.md b/Extensions/Leasing/Leasing.md index d23258e..c1e92f7 100644 --- a/Extensions/Leasing/Leasing.md +++ b/Extensions/Leasing/Leasing.md @@ -3,10 +3,10 @@ _This extension specification is currently incubating. While incubating the version is 0._ ## Introduction -When two system are communicating via RSocket, it is crucial to provide a way of preserving systems stability. Even though the Leasing specification brings such an oportunity, it is not always possible to use the same strategy for leasing in order to make communication stable. This extension specification provides a way to specify by a `Client` using [`CompositeMedata`][cm] a set of Leasing strategies so the `Server` can choose one of them depends on the requirements and respond. +When two systems are communicating via RSocket, it is crucial to provide a way of preserving systems stability. Even though the Leasing specification brings such an opportunity, it is not always possible to use the same strategy for leasing in order to make communication stable. This extension specification provides a way to specify by a `Client` using [`CompositeMedata`][cm] a set of Leasing strategies so the `Server` can choose one of them depends on the requirements and then respond as defined in the [negotiation](#negotiation) section. ## Metadata Payload -This metadata type is intended to be used per connection, and not per stream nor individual payloads and as such it **MUST** only be used in the [`SETUP`][sf] frame type. The Metadata MIME Type is `message/x.rsocket.supported-lease-strategies.v0`. +This metadata type is intended to be used per connection, and not per stream, nor individual payloads, and as such it **MUST** only be used in the [`SETUP`][sf] frame type. The Metadata MIME Type is `message/x.rsocket.supported-lease-strategies.v0`. [sf]: ../../Protocol.md#frame-setup @@ -29,9 +29,9 @@ This metadata type is intended to be used per connection, and not per stream nor [wk]: WellKnownLeaseStrategies.md -## Negotitation +## Negotiation -Once a `Client` specified [supported lease strategies](#metadata-payload), the `Server` MUST select one of the provided supported lease strategies or reject if none of the provided are supported. In turn, to encode the selected lease strategy, `Server` MUST use the medata field of the `LEASE`: +Once a `Client` specified [supported lease strategies](#metadata-payload), the `Server` MUST select one of the provided supported lease strategies or reject if none of the provided are supported. In turn, to encode the selected lease strategy, `Server` MUST use the metadata field of the `LEASE`: ### Metadata Contents ``` @@ -42,13 +42,13 @@ Once a `Client` specified [supported lease strategies](#metadata-payload), the ` +---------------+---------------+---------------+---------------+ ``` -* (**L**)Lease Strategy: Lease strategyype is a well known value represented by a unique integer. If L flag is set (a value of `1`), indicates a [Well-known Strategy Type ID][wk]. If L flag is not set (a value of `0`), indicates the Lease Strategy Length in bytes. +* (**L**)Lease Strategy: Lease strategy is a well known value represented by a unique integer. If L flag is set (a value of `1`), indicates a [Well-known Strategy Type ID][wk]. If L flag is not set (a value of `0`), indicates the Lease Strategy Length in bytes. * **Lease Strategy ID/Length**: (7 bits = max value 2^7 = 128) Unsigned 7-bit integer. If L flag is set (a value of `1`), indicates a [Well-known Strategy Type ID][wk]. If A flag is not set (a value of `0`), indicates the Lease Strategy Length in bytes. * **Lease Strategy**: the strategy for leasing. This SHOULD be a US-ASCII string. The string MUST NOT be null terminated. (Not present if L flag is set) [wk]: WellKnownLeaseStrategies.md -Note, if the selected lease strategy has a different frame layout than the deafult one, the first [`LEASE`][lf] frame MUST follow the default [`LEASE`][lf] frame layout, in order to let the `Client` read metadata field content +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 [lf]: ../../Protocol.md#frame-lease \ No newline at end of file diff --git a/Protocol.md b/Protocol.md index a1b4f1a..b94de8e 100644 --- a/Protocol.md +++ b/Protocol.md @@ -434,10 +434,10 @@ Frame Contents * __Frame Type__: (6 bits) 0x02 * __Flags__: (10 bits) * (__M__)etadata: Metadata present -* __Time-To-Live (TTL)__: (31 bits = max value 2^31-1 = 2,147,483,647) Unsigned 31-bit integer of Time (in milliseconds) for validity of LEASE from time of reception. Value MUST be >= 0. +* __Time-To-Live (TTL)__: (31 bits = max value 2^31-1 = 2,147,483,647) Unsigned 31-bit integer of Time (in milliseconds) for validity of LEASE from time of reception. Value MUST be > 0. * __Number of Requests__: (31 bits = max value 2^31-1 = 2,147,483,647) Unsigned 31-bit integer of Number of Requests that may be sent until next LEASE. Value MUST be >= 0. -A Responder implementation MAY stop all further requests by sending a LEASE with a value of 0 for __Number of Requests__ or __Time-To-Live__. +A Responder implementation MAY stop all further requests by sending a LEASE with a value of 0 for __Number of Requests__. When a LEASE expires due to time, the value of the __Number of Requests__ that a Requester may make is implicitly 0.