-
Notifications
You must be signed in to change notification settings - Fork 285
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
feat(cmd-api-server): add gRPC plugin auto-registration support #3173
Merged
petermetz
merged 1 commit into
hyperledger-cacti:main
from
petermetz:feat-cmd-api-server-grpc-plugin-auto-registration
Apr 4, 2024
Merged
feat(cmd-api-server): add gRPC plugin auto-registration support #3173
petermetz
merged 1 commit into
hyperledger-cacti:main
from
petermetz:feat-cmd-api-server-grpc-plugin-auto-registration
Apr 4, 2024
Conversation
This file contains 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
petermetz
requested review from
takeutak,
izuru0,
jagpreetsinghsasan,
VRamakrishna,
sandeepnRES and
outSH
as code owners
April 4, 2024 05:33
5 tasks
outSH
approved these changes
Apr 4, 2024
RafaelAPB
approved these changes
Apr 4, 2024
1. The API server supports gRPC endpoints, but plugins are not yet able to register their own gRPC services to be exposed the same way that was already possible for HTTP endpoints to be registered dynamically. This was due to an oversight when the original contribution was made by Peter (who was the person making the oversight - good job Peter) 2. The functionality works largely the same as it does for the HTTP endpoints but it does so for gRPC services (which is the equivalent of endpoints in gRPC terminology, so service === endpoint in this context.) 3. There are new methods added to the public API surface of the API server package which can be used to construct gRPC credential and server objects using the instance of the library that is used by the API server. This is necessary because the validation logic built into grpc-js fails for these mentioned objects if the creds or the server was constructed with a different instance of the library than the one used by the API server. 4. Different instance in this context means just that the exact same version of the library was imported from a different path for example there could be the node_modules directory of the besu connector and also the node_modules directory of the API server. 5. Because of the problem outlined above, the only way we can have functioning test cases is if the API server exposes its own instance of grpc-js. Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
force-pushed
the
feat-cmd-api-server-grpc-plugin-auto-registration
branch
from
April 4, 2024 15:05
17fd7b4
to
37e7720
Compare
petermetz
added a commit
to petermetz/cacti
that referenced
this pull request
Apr 4, 2024
1. The Besu connector now can be reached via the gRPC interface. 2. The same operations are exposed as via HTTP+SocketIO 3. gRPC supports bi-directional streaming so the block watching is also supported and test coverage verifies that it works. 4. To see an example of how to use the gRPC client of the Besu connector read the source code of the test case that provides the verification that the functionality works: ``` packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/ integration/grpc-services/connector-besu-grpc-services.test.ts ``` Depends on hyperledger-cacti#3173 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this pull request
May 24, 2024
1. The Besu connector now can be reached via the gRPC interface. 2. The same operations are exposed as via HTTP+SocketIO 3. gRPC supports bi-directional streaming so the block watching is also supported and test coverage verifies that it works. 4. To see an example of how to use the gRPC client of the Besu connector read the source code of the test case that provides the verification that the functionality works: ``` packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/ integration/grpc-services/connector-besu-grpc-services.test.ts ``` Depends on hyperledger-cacti#3173 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this pull request
May 29, 2024
1. The Besu connector now can be reached via the gRPC interface. 2. The same operations are exposed as via HTTP+SocketIO 3. gRPC supports bi-directional streaming so the block watching is also supported and test coverage verifies that it works. 4. To see an example of how to use the gRPC client of the Besu connector read the source code of the test case that provides the verification that the functionality works: ``` packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/ integration/grpc-services/connector-besu-grpc-services.test.ts ``` Depends on hyperledger-cacti#3173 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
that referenced
this pull request
May 29, 2024
1. The Besu connector now can be reached via the gRPC interface. 2. The same operations are exposed as via HTTP+SocketIO 3. gRPC supports bi-directional streaming so the block watching is also supported and test coverage verifies that it works. 4. To see an example of how to use the gRPC client of the Besu connector read the source code of the test case that provides the verification that the functionality works: ``` packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/ integration/grpc-services/connector-besu-grpc-services.test.ts ``` Depends on #3173 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
5 tasks
fazzatti
pushed a commit
to fazzatti/cacti
that referenced
this pull request
Jun 24, 2024
1. The Besu connector now can be reached via the gRPC interface. 2. The same operations are exposed as via HTTP+SocketIO 3. gRPC supports bi-directional streaming so the block watching is also supported and test coverage verifies that it works. 4. To see an example of how to use the gRPC client of the Besu connector read the source code of the test case that provides the verification that the functionality works: ``` packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/ integration/grpc-services/connector-besu-grpc-services.test.ts ``` Depends on hyperledger-cacti#3173 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
sandeepnRES
pushed a commit
to sandeepnRES/cacti
that referenced
this pull request
Jul 30, 2024
1. The Besu connector now can be reached via the gRPC interface. 2. The same operations are exposed as via HTTP+SocketIO 3. gRPC supports bi-directional streaming so the block watching is also supported and test coverage verifies that it works. 4. To see an example of how to use the gRPC client of the Besu connector read the source code of the test case that provides the verification that the functionality works: ``` packages/cactus-test-plugin-ledger-connector-besu/src/test/typescript/ integration/grpc-services/connector-besu-grpc-services.test.ts ``` Depends on hyperledger-cacti#3173 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
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.
to register their own gRPC services to be exposed the same way that was
already possible for HTTP endpoints to be registered dynamically. This
was due to an oversight when the original contribution was made by Peter
(who was the person making the oversight - good job Peter)
endpoints but it does so for gRPC services (which is the equivalent of
endpoints in gRPC terminology, so service === endpoint in this context.)
package which can be used to construct gRPC credential and server objects
using the instance of the library that is used by the API server.
This is necessary because the validation logic built into grpc-js fails
for these mentioned objects if the creds or the server was constructed
with a different instance of the library than the one used by the API
server.
version of the library was imported from a different path for example
there could be the node_modules directory of the besu connector and also
the node_modules directory of the API server.
test cases is if the API server exposes its own instance of grpc-js.
Signed-off-by: Peter Somogyvari peter.somogyvari@accenture.com
Pull Request Requirements
upstream/main
branch and squashed into single commit to help maintainers review it more efficient and to avoid spaghetti git commit graphs that obfuscate which commit did exactly what change, when and, why.-s
flag when usinggit commit
command. You may refer to this link for more information.Character Limit
A Must Read for Beginners
For rebasing and squashing, here's a must read guide for beginners.