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

ADR-038 go-plugin system #13472

Closed
wants to merge 18 commits into from
Closed

Conversation

egaxhaj
Copy link
Contributor

@egaxhaj egaxhaj commented Oct 6, 2022

For #10096

replaces #11691

This is an extension and refactor of the existing ADR-038 streaming service work to introduce a plugin system over gRPC to the SDK and load streaming services using the hashicorp/go-plugin system rather the approach taken in #11691 (which uses Go's built in Plugins API).

The plugin system introduced here is meant to be extensible, so that if other components/features of the SDK wish to be included as plugins in the future they can write plugins with minimal effort by defining an interface and a gRPC message protocol and leveraging the built in plugin system.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@yihuang
Copy link
Collaborator

yihuang commented Oct 7, 2022

The in-process streaming service is still supported by calling SetStreamingService directly, right?

@egaxhaj
Copy link
Contributor Author

egaxhaj commented Oct 7, 2022

The in-process streaming service is still supported by calling SetStreamingService directly, right?

Yes.

bApp.SetStreamingService(StreamingService{
Listeners: listeners,
ABCIListener: abciListener,
StopNodeOnErr: stopNodeOnErr,
})

@alexanderbez
Copy link
Contributor

Awesome! Looking forward to reviewing this!

@alexanderbez
Copy link
Contributor

I'd like to have this blocked until #13473 gets sufficiently reviewed and approved 👍

@egaxhaj
Copy link
Contributor Author

egaxhaj commented Oct 7, 2022

I'd like to have this blocked until #13473 gets sufficiently reviewed and approved 👍

@egaxhaj egaxhaj closed this Oct 7, 2022
@egaxhaj egaxhaj reopened this Oct 7, 2022
@egaxhaj
Copy link
Contributor Author

egaxhaj commented Oct 7, 2022

My apologies. I accidentally closed this while trying to comment.

@tac0turtle
Copy link
Member

Overall love the improvements. Thinking out loud: should we remove the file service already present in the repo? Can be in a subsequent pr.

@amaury1093 amaury1093 marked this pull request as draft October 19, 2022 14:39
@kocubinski kocubinski self-assigned this Oct 20, 2022
app.cms.AddListeners(key, lis)
}
// register the StreamingService within the BaseApp
// BaseApp will pass BeginBlock, DeliverTx, and EndBlock requests and responses to the streaming services to update their ABCI context
app.abciListeners = append(app.abciListeners, s)
app.abciListener = s.ABCIListener
app.stopNodeOnStreamingErr = s.StopNodeOnErr
Copy link
Collaborator

@yihuang yihuang Oct 24, 2022

Choose a reason for hiding this comment

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

It don't support registering multiple StreamingServices with this implementation?

@kocubinski kocubinski removed their assignment Nov 14, 2022
@egaxhaj
Copy link
Contributor Author

egaxhaj commented Dec 7, 2022

I am closing this as the work in this PR is stale. Work has moved to #14207.

@egaxhaj egaxhaj closed this Dec 7, 2022
@egaxhaj egaxhaj deleted the egaxhaj/adr-038-grpc branch December 13, 2022 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants