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

improves Fragmentation examples #320

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

Conversation

OlegDokuka
Copy link
Member

Provide better examples for Fragmentation

Motivation:

At the moment, fragmentation examples do not explain in details how every frame (including flags) should look like

Modifications:

This PR adds flags to the example sequences as well as add cases when payload has next and complete flags and adds example for Request Channel which has complete flag

Result:

Improved examples

Signed-off-by: Oleh Dokuka odokuka@vmware.com

Signed-off-by: Oleh Dokuka <odokuka@vmware.com>
@OlegDokuka OlegDokuka added this to the 1.0 milestone Mar 31, 2021
@OlegDokuka OlegDokuka changed the title improves Fragmentation and Reassembly examples improves Fragmentation examples Mar 31, 2021
Protocol.md Show resolved Hide resolved
Copy link
Member

@dnadoba dnadoba left a comment

Choose a reason for hiding this comment

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

We should add a note that, in the examples, all other flags are assumed to be 0 i.e. not set. Alternatively we could write out every flag explicitly but this will be very verbose.

Co-authored-by: David Nadoba <dnadoba@gmail.com>
Frame length = 16MB
(M)etadata present = 1
(F)ollows = 1 (fragments coming)
(N)ext = 1

Choose a reason for hiding this comment

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

The REQUEST_CHANNEL doesn't have a (N)ext flag: https://rsocket.io/docs/protocol/#request_channel-frame-0x07

@@ -949,11 +949,14 @@ When a PAYLOAD is fragmented, the Metadata MUST be transmitted completely before

For example, a single PAYLOAD with 20MB of Metadata and 25MB of Data that is fragmented into 3 frames:

##### Payload with `next` flag set
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this needs to be a sub-section with a heading, especially coming after a ":". Rather it can be just the first example you see. So basically I suggest removing the sub-heading completely. Then after that, below for the second example, simply add a sentence before it. I'll add a concrete suggestion there.

Protocol.md Outdated Show resolved Hide resolved
Protocol.md Outdated Show resolved Hide resolved
@@ -987,6 +1032,8 @@ When fragmented, the Metadata MUST be transmitted completely before the Data.

For example, a single PAYLOAD with 20MB of Metadata and 25MB of Data that is fragmented into 3 frames:

##### Request Response
Copy link
Contributor

Choose a reason for hiding this comment

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

Similar suggestion here, to remove the sub-headings.


If the Requester wants to cancel sending a fragmented sequence, it MAY send a CANCEL frame without finishing delivery of the fragments.

##### Request Channel with `complete` flag
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
##### Request Channel with `complete` flag
Below is an example for Request Channel with the `complete` flag indicating the entire sequence is a `PAYLOAD` with `next` and `complete` both set.

Protocol.md Outdated Show resolved Hide resolved
Co-authored-by: Rossen Stoyanchev <rstoyanchev@users.noreply.github.com>
@@ -949,11 +949,14 @@ When a PAYLOAD is fragmented, the Metadata MUST be transmitted completely before

For example, a single PAYLOAD with 20MB of Metadata and 25MB of Data that is fragmented into 3 frames:

##### Payload with `next` flag set

```
Copy link
Member Author

Choose a reason for hiding this comment

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

move to a separate doc

OlegDokuka and others added 2 commits May 25, 2021 13:09
Co-authored-by: Rossen Stoyanchev <rstoyanchev@users.noreply.github.com>
Co-authored-by: Rossen Stoyanchev <rstoyanchev@users.noreply.github.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

4 participants