-
Notifications
You must be signed in to change notification settings - Fork 143
docs: ADR for publishing a RabbitMQ settings update message #4654
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
base: master
Are you sure you want to change the base?
Conversation
2898820 to
b519590
Compare
| This approach has several issues: | ||
|
|
||
| - **Synchronous blocking**: HTTP calls block the settings update operation | ||
| - **Version conflict complexity**: The code checks remote versions before updates, creating complex conflict resolution logic |
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.
This was done by purpose. Because we need to have a source of truth.
I'm not sure we're dealing with that correctly from the common-settings app side right now.
If we have 2 app sending a message to update CS, we'll have an issue on CS side. And this cozy-stack today is the entry point of CS, the check was done there.
So if we remove this check, we need to be sure that CS can handle this stuff. cc @rezk2ll
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.
Yes, the version control is done in CS for incoming requests.
but IMO, the CS app can retire and the stack will handle it. so in reality, we will have only one app sending the message updates.
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.
What is CS app?
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.
linagora/twake-workplace-common-settings
| - **Version conflict complexity**: The code checks remote versions before updates, creating complex conflict resolution logic | ||
| - **Tight coupling**: Direct HTTP dependency on the common settings app | ||
| - **Failure propagation**: HTTP failures can affect the main settings update flow | ||
| - **No longer needed**: The common settings app is no longer actively updating settings, making version conflict checking obsolete |
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 understand this point, can you elaborate?
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.
The common settings app is being deprecated, so the stack no longer needs to support conflict resolution
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.
What are you calling "common settings app"?
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.
linagora/twake-workplace-common-settings
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.
Oh I didn't even know that there was a front app for this API. This front app is not used anywhere.
The version's check on stack was not done because of that, it was done to be sure that we're sending the up to date data. And be sure that the user updated the latest version.
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 I still don't understand. We will alwaus need this backend app right?
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.
if the stack handles the message sending part, we no longer need this app.
The CS app was created because that stack could not send RabbitMQ messages and also connect to different RabbitMQ servers on a different infra.
Both of those issues are solved .
The other argument to keep the CS app was the on-prem installations. But I believe now it's mandatory to ship the stack on-prem if you want common settings. so really, no need to keep the app
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.
But we still need CS app to consume the message, no?
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.
no, the other apps will consume the message directly no need for CS to relay the message.
CS app was exposing an API to the stack -> the stack sends the settings -> the app stores the settings and checks the version etc -> then sends a rabbitmq message to everyone.
The stack is already a copy of the source of the truth and is now capable of sending the RabbitMQ messages. so we just need to add the version control check and replace the API call with a RabbitMQ message.
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.
But today we have a DB for CS, no? I liked the idea of having an external DB for that. Don't we have a "script" reading this DB to send event in order to fully align all the listeners (in case of something not working? Like what we had few weeks ago?) If we don't have this external DB anymore, and we only store in CouchDB, it'll be a mess to do.
If we want to do that, then the cozy-stack still need to checks the version and else, so I don't understand how we can simplify or remove this check?
|
@Crash-- so, do you have any comments, or should I mark it as decided, merge, and plan for implementation? |
No description provided.