-
Notifications
You must be signed in to change notification settings - Fork 14
feat: ofep for flagd grpc sync #45
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
Merged
beeme1mr
merged 14 commits into
open-feature:main
from
Kavindu-Dodan:ofep/flagd-grpc-sync
Feb 3, 2023
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
d5425d7
ofep for flagd grpc sync
Kavindu-Dodan 4ae0f90
Update OFEP-flagd-grpc-sync.md
Kavindu-Dodan 12cf22c
Update OFEP-flagd-grpc-sync.md
Kavindu-Dodan edd6680
Update OFEP-flagd-grpc-sync.md
Kavindu-Dodan 95cca6d
Update OFEP-flagd-grpc-sync.md
Kavindu-Dodan 1fa8685
Update OFEP-flagd-grpc-sync.md
Kavindu-Dodan 749b4d4
Update OFEP-flagd-grpc-sync.md
Kavindu-Dodan 78ecfd7
Update OFEP-flagd-grpc-sync.md
Kavindu-Dodan 58131d7
review changes
Kavindu-Dodan 97219d2
update diagram
Kavindu-Dodan 3fb93c5
Change OFEP state
Kavindu-Dodan 5989cba
Update OFEP-flagd-grpc-sync.md
Kavindu-Dodan d6ef755
Update OFEP-flagd-grpc-sync.md
Kavindu-Dodan 851bcd5
clarify event types
Kavindu-Dodan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| ## OFEP: Add gRPC sync support to flagd | ||
|
|
||
| ## State: APPROVED | ||
|
|
||
| This OFEP proposes to introduce gRPC syncs to flagd. gRPC sync will act similar to existing remote HTTP URL syncs. But | ||
| going beyond periodic pulls, flagd can utilize gRPC server streaming to receive near real-time updates, pushed from a | ||
| flag management system. | ||
|
|
||
| ## Background | ||
|
|
||
| gRPC server streaming allows clients to listen and react to server-pushed data. For flagd, this perfectly matches the | ||
| ISync interface and current sync mechanism implementations. | ||
|
|
||
| The gRPC schema will be defined by flagd and supporting flag management system(s) will then implement the contract. | ||
|
|
||
| <img src="images/ofep-fd-grpc-1.png" width="300"> | ||
|
|
||
| Further, grpc server push can be expanded to have `event types` such as flag additions, updates and deletions, giving more | ||
| performant connectivity between flagd and flag management system. Performance improvements come from reduced payload | ||
| size(single flag change vs all flags) and not having connection establishment overhead thanks to streaming. | ||
|
|
||
| Note that the implementation complexity of `event types` lives at grpc server implementation. The implementation may use | ||
| a state management system to derive the matching event type for a specific flag configuration change. In any case, | ||
| flagd must not maintain any state (i.e- flagd must be stateless) and only react on the sync type to update flag | ||
| configurations. | ||
|
|
||
| <img src="images/ofep-fd-grpc-2.png" width="300"> | ||
|
|
||
| ### Tasks | ||
|
|
||
| Following are the main tasks I am proposing for the implementation. | ||
|
|
||
| - [x] POC implementation - https://github.com/open-feature/flagd/pull/297 | ||
| - [ ] OFEP approval | ||
| - [ ] Introduce basic grpc sync, with minimal configuration options | ||
| - [ ] Introduce additional options, such as TLS certificates, token authentication on top of existing solution | ||
|
|
||
| #### SSL certificates and token authentication | ||
|
|
||
| Consider the GRPC authentication example provided through official Go guide - [Link](https://github.com/grpc/grpc-go/tree/master/examples/features/authentication) | ||
|
|
||
| With a similar approach, it is possible to establish TLS connections and enable token based authentication/authorization | ||
| between flagd and flag management system. | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.