feat(gpRc): update FDL lexer/parser to support service and rpc definitions#3308
Open
ayush00git wants to merge 13 commits intoapache:mainfrom
Open
feat(gpRc): update FDL lexer/parser to support service and rpc definitions#3308ayush00git wants to merge 13 commits intoapache:mainfrom
ayush00git wants to merge 13 commits intoapache:mainfrom
Conversation
Contributor
Author
|
Hey @chaokunyang |
Collaborator
|
You also need to update protobuf and flatbuffers idl parser and add tests |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why?
Using fory with gRPCs forced using the protobuffs for the services and methods of a class. Users needed to define separate files for generating stubs. Which turns their focus on using protobuff completely, ignoring the fory's performance.
What does this PR do?
Adds the parser for rpc methods and services to allow users use FDL with gRPC.
Added Keywords
servicerpcreturnsstreamChanges Made
1. compiler/fory_compiler/ir/ast.py
Added
RpcMethodandServiceData classes.2. compiler/fory_compiler/frontend/fdl/lexer.py
SERVICERPCRETURNSSTREAMto theTokenTypeenumLexer.Keywords3. compiler/fory_compiler/frontend/fdl/parser.py
parse_serviceandparse_rpc_methodmethod.Related issues
Does this PR introduce any user-facing change?
This PR extends the FDL language with support for service definitions using
servicerpcreturnsandstreamkeywords. This allows users to define gRPC services directly in their FDL schemas.Benchmark
N/A