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

extensions-negotiation definition #112

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GitGab19
Copy link
Collaborator

This PR defines extension n.1 which allows for any implementation to support future extensions in a clean and scalable way.
Close #111

@Fi3
Copy link
Contributor

Fi3 commented Dec 4, 2024

concept ack

@GitGab19 GitGab19 requested a review from TheBlueMatt December 10, 2024 05:17
@GitGab19
Copy link
Collaborator Author

@Fi3 @TheBlueMatt @jakubtrnka this PR is ready for review

@GitGab19
Copy link
Collaborator Author

@Fi3 just a reminder to approve this, as we agreed during yesterday's call

| Field Name | Data Type | Description |
|------------------------|--------------|-----------------------------------------------|
| request_id | U16 | Unique identifier for pairing the response. |
| unsupported_extensions | SEQ0_64K[U16]| List of unsupported extension identifiers. |
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add a field called requested_extension with extension that server require but are not in RequestExtensions from client.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Don't you think extensions should be requested only by the client? Do you some tangible examples for the opposite case?

Copy link
Contributor

Choose a reason for hiding this comment

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

a pool accept only client that have an extension for example I want the client to use a specific accounting or auditing system

| request_id | U16 | Unique identifier for pairing the response. |
| supported_extensions | SEQ0_64K[U16]| List of supported extension identifiers. |

### `RequestExtensions.Error` (Server -> Client)
Copy link

Choose a reason for hiding this comment

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

What happens if upstream returns RequestExtensionsError? are they expected to drop the connection?

Copy link
Contributor

Choose a reason for hiding this comment

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

we don't need to drop the connection here. Client based on the server response can decide if:

  1. continue with extension requested by up and/or continue without ext not supported by up
  2. drop connection (if for example up do not support an ext that is mandatory for cli)

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

Successfully merging this pull request may close these issues.

Support additional field in messages
4 participants