Skip to content

A7: Backward Compatibility Management Proposal#20

Closed
muxi wants to merge 7 commits into
grpc:masterfrom
muxi:backward-compatibility-proposal
Closed

A7: Backward Compatibility Management Proposal#20
muxi wants to merge 7 commits into
grpc:masterfrom
muxi:backward-compatibility-proposal

Conversation

@muxi
Copy link
Copy Markdown
Contributor

@muxi muxi commented Mar 31, 2017

No description provided.

@muxi muxi force-pushed the backward-compatibility-proposal branch from c852da0 to 9c8ee09 Compare March 31, 2017 02:15
@ctiller ctiller changed the title Backward Compatibility Management Proposal A7: Backward Compatibility Management Proposal Mar 31, 2017
@muxi
Copy link
Copy Markdown
Contributor Author

muxi commented Apr 4, 2017

@a11r ping for review.

Comment thread A7-backward-compatibility-management.md Outdated
gRPC server will maintain a list of server workarounds for backward compatibility issues. These workarounds are disabled by default for performance consideration. If a user cares about a backward compatibility issue, they should be able to enable the workaround. In this case gRPC server will identify the version of each client and determine whether the workaround should be applied.

#### Workaround list
The workaround list on gRPC server is a map from an integer `workaround id` to a `version comparing function`:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Avoid talking implementation details here... we almost certainly won't implement it like this (since this API implies that we'd parse user agent strings N times - and that all workarounds would be triggered by user agent - maybe sometimes we'd want to do something else)

Comment thread A7-backward-compatibility-management.md Outdated

#### APIs
```
GRPCAPI void enable_workaround(uint32_t id);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Skip discussing the core API's here: instead talk about what abstract API's an implementation must export.

Example:

When building a server, an implementation should support enabling/disabling workarounds by ID. Those ID's should be listed in an enumeration.

Comment thread A7-backward-compatibility-management.md Outdated
Instead of determining client's compatibility by a minimum version number, we decided to make it more general with `version comparing function`. This allows more flexibility in determining client's compatibility, such as including client's language into consideration.

### Performance
Current API requires a client's `user-agent` string to be checked against the version comparing functions of all items in the workaround list, involving a lot of (likely duplicated) string processing. Depends on how much performance we need, an alternative is to extract key information from `user-agent` (e.g. gRPC version, language, transport, etc.) and use them as parameter of `version comparing functions`. It is a tradeoff of flexibility to performance that we may want to consider.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The proposed implementation is an absolute no in terms of performance.

That said, I don't think this RFC needs to consider the actual implementation, and instead concentrate on how this is exposed and how workarounds are to be curated.

@muxi muxi force-pushed the backward-compatibility-proposal branch from 4db8c30 to 08a4a09 Compare April 13, 2017 18:34
@hsaliak
Copy link
Copy Markdown
Contributor

hsaliak commented Feb 2, 2018

@muxi what's the status of this proposal? Can this be closed?

@ctiller ctiller closed this Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants