-
Notifications
You must be signed in to change notification settings - Fork 20
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-92 & AP-19: BFF proposal #99
Conversation
Question for @tombentley and @emmanuelbernard , I got again confused regarding AP vs. ADR 😢
I ended up framing it as an ADR, let me know if this works for you. |
If you feel BFF should not be used for other services like RHOC or whatever is coming up, then it is the right choice. I had a different impression in our conversation last Wed. |
I haven't analyzed the current situation in RHOC to be able to answer your question 😢 , let me gather @lburgazzoli feedback to address this. |
Not bundle, since AP have a different intent and template, it's a partial rework. |
_adr/92/index.adoc
Outdated
|
||
The integration of the Enterprise/Hybrid option of RHOSAK in UI, SDKs and CLI has shown that there is a margin for improvement in how we expose and consume our services APIs. | ||
|
||
* the current services are offering the bare functionality leaving room for integration code to live in the services' consumer codebases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand this 100%. Can you explain a bit more what you mean and maybe we can reword a bit to be more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tentatively:
the services are exposing APIs for the offered specific functionality, but we lack an integration layer
what we are trying to say is that there is no integration logic exposed by the current services.
The services are offering APIs modeled after their specific functionality and are very vertical, but any operation that involves more than one service becomes difficult and involves writing the integration logic on the client side.
Feel free to propose a better working 🙏 !
_adr/92/index.adoc
Outdated
* the current services are offering the bare functionality leaving room for integration code to live in the services' consumer codebases | ||
* the data aggregation logic is duplicated, scattered, and eventually diverging in various codebases (especially UI and CLI) | ||
* there is no "single source of truth" for data aggregated from various services | ||
* the current REST API layer exposes the user to the entire complexity of the underlying infrastructure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it the complexity of the infrastructure that's exposed or is it the complexity of the main service PLUS the supporting services (e.g. AMS)? Infrastructure makes me think we're exposing network routing and whatnot. That may be true for RHOSAK Enterprise maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming infrastructure
-> architecture
.
We do not expose (much)"infrastructure" detail, but the user really needs to know the architecture of the system to navigate it.
Added some comments but looks good overall. Something that's missing perhaps is a comment about potential lack of control (not now I guess but maybe in the future) over APIs being aggregated. Another benefit of the BFF approach is when we are running a service using e.g. an Apache project, we might not be able to modify the API to make it more suitable for use by the UI/CLI (something you could argue we can mostly do today). |
Thanks, @EricWittmann for the review! |
For RHOC things are exacerbates by the fact that we must interact with multiple services, i.e. Kafka & Service Registry so we would benefit from a BFF that knows how to interact with such services (i.e. to set-up/check permissions, gather additional information, etc). |
Added the AP proposal, marking as Ready For Review now |
Could we also try to solve the |
I'd suggest just a BFF isn't enough. I think offloading client-specific concerns such as handling update subscriptions and caching is great and we should adopt a BFF for those reasons to support each client-side experience. But I'd also suggest we probably need a separate business integration service that handles the orchestration of the service APIs and it needs to be adaptable to changing business concerns, kind of the two things we currently try and spread between our UI and API a bit. |
@gashcrumb this proposal is exclusively targeting the BFF as an architectural component to respond to the current concerns in development.
That said I'm supportive of reconsidering your proposal after the first version of the BFF is in place 👍 |
@tombentley I moved this PR from |
Co-authored-by: Aurélien Pupier <apupier@redhat.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
We have gone through discussions and agreements on all of the open points. |
A polite ping to @danielezonca @maleck13 @tombentley @lburgazzoli for the review! Thanks in advance 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A concern I have here is called out as a challenge, it does not work for private data planes, which could restrict the potential customer / user base and whether that is something that is an acceptable tradeoff.
@maleck13 thanks a lot for the review! I do believe that we have full freedom to move this component to the data plane when/if necessary. |
Yes the answers helped thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor comment but LGTM 👍
[NOTE] | ||
*Assumption* as a first iteration we are assuming that the CLI needs can be covered by a strict subset of the functionalities needed for the UI. | ||
|
||
We propose to integrate *one* server side component commonly known as https://samnewman.io/patterns/architectural/bff/[BFF] (Backend For Frontend). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to make sure I understand the proposal: this proposal covers the use case where BFF is part of a "single service" in terms of ownership/SLO (like KAS) so this is an additional endpoint is going to be part of the API delivered by that specific service.
So if a feature can be reused (i.e. some common pattern to create SA and grant access to topic) or involves multiple services (with different CP) the endpoint is going to be "assigned" to one service (or duplicated?) that is going to own this new component.
If "cross service BFF" is not covered, I would probably add this to the "Non-goals" section.
Wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this is an additional endpoint is going to be part of the API delivered by that specific service.
this is not correct, here we are proposing BFF as a separate service with a new spec that is going to aggregate multiple different services.
We are somehow covering only what you call "cross service BFF", as having one BFF associated with one service almost defeats the purpose of BFF (at least in this context).
Also, we are here proposing a single BFF service for the entire platform.
If this is not clear, please, point out the confusing sections and I will try to re-phrase 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification, fine for me to keep current phrasing 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here proposing a single BFF service for the entire platform.
Define entire platform.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Entire platform means RHOSAK RHODS RHOC as I understand it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we have enough context to include RHODS in the scope of this decision, I would "limit" the scope this ADR to RHOSAK+RHOC+RHOSR and postpone to a revision RHODS but also RHOAM and other services
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I foresee, we won't have a choice if we want a good UX. So let's go with this bold intent and cast exclusions as we go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this as a very bold intent given that RHODS for example has the on-prem as a very important setup and also private cloud data plane configurations are not fully explored. :)
Btw I was mainly referring to the ADR that is "Kafka ecosystem" specific while the AP is probably generic enough and I agree that we aim to have a coherent UX across the whole portfolio so the problem statement and approach for the solution can be valid for every service
Co-authored-by: Daniele Zonca <dzonca@redhat.com>
@tombentley can you please, review or delegate the review of this PR? Thanks in advance 🙏 |
This change has two objectives: 1. Make the AP more concrete and clearer to teams that will read it in the future and the constraints it puts on them. In particular, limits and choices are detailed 2. Clarify that GraphQL was not chosen but keep the door open to a future use.
Hey @andreaTP @riccardo-forina and all, In order to help move forward, I've sent a PR to your PR (not sure how well it will work). I've closed some conversations in the ADR that were pending here. |
I tried to add commits to Andrea's own branch but without success, hence the PR |
@andreaTP this was top of my todo list today, but do you want me to review this now, or once you've merged Emmanuel's PR into the branch for this PR? |
Co-authored-by: Daniele Zonca <dzonca@redhat.com>
Bff proposal additional improvements
thanks @emmanuelbernard for the PR, merged 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your efforts on this @andreaTP and @riccardo-forina
Co-authored-by: Tom Bentley <tombentley@users.noreply.github.com>
Co-authored-by: Tom Bentley <tombentley@users.noreply.github.com>
Ready to merge AFAIU 🙏 thanks everyone for the input! |
🎉 🎉 🎉 |
Opening this PR as Draft to foster collaboration on the Proposal itself and for early comments.
cc. @EricWittmann @riccardo-forina @MikeEdgar @dimakis @lburgazzoli