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

Fix communication between API ↔ providers #51

Open
applejag opened this issue May 25, 2021 · 1 comment
Open

Fix communication between API ↔ providers #51

applejag opened this issue May 25, 2021 · 1 comment
Assignees
Labels
admin Chore not related to the code in this repository. prio/3 High priority. "Must have"

Comments

@applejag
Copy link
Contributor

Currently providers can talk to the API, but not the other way around. We want to change that.

Most providers support checks/statuses that can reject PRs and such (see iver-wharf/wharf-provider-azuredevops#5)

The previous attempt was to solve this with a message queue (see https://github.com/iver-wharf/messagebus-go) just to get around the circular-dependency issue. This has since been concluded as overkill.

What we instead can do is use dependency-inversion, where we create a standardized API for the providers that they have to fulfill, and then the main API can talk to them through this standardized interface. By doing this, we can also let the main API do all the redirection of endpoints so the end user does not talk to the provider/import APIs directly, and by doing that we can populate the data that the providers get as well, such as the project name when the user only provided the project ID.

This needs an RFC. Especially regarding how this standardized API should look. If we stick to REST or transition over to an asyncronous protocol like gRPC or websockets is up for discussion. Personally (from @jilleJr's perspective) I find gRPC the most enticing.

@applejag applejag added the admin Chore not related to the code in this repository. label May 25, 2021
@applejag applejag self-assigned this Sep 1, 2021
@applejag
Copy link
Contributor Author

applejag commented Sep 1, 2021

I've started drafting the architecture for this over at https://iver-wharf.github.io/wharf-notes/hide-providers-behind-api

Once it's finished, I will publish an RFC for it. The notes are just to write down my thoughts.

@applejag applejag changed the title Create unidirectional communication between API ↔ providers Create bidirectional communication between API ↔ providers Sep 1, 2021
@applejag applejag changed the title Create bidirectional communication between API ↔ providers Fix communication between API ↔ providers Sep 1, 2021
@applejag applejag added the prio/3 High priority. "Must have" label Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin Chore not related to the code in this repository. prio/3 High priority. "Must have"
Projects
None yet
Development

No branches or pull requests

1 participant