-
Notifications
You must be signed in to change notification settings - Fork 2
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
[FEATURE] Expose get services registration Admin API #521
Comments
Hi @petyos, thanks for opening this issue! I have a couple of comments. As I mentioned in #325, I believe the only change necessary from the current service registration system we have is the need to add a path to the version endpoint. I do not believe it is necessary to store the "health_status" of each service, as this would require an admin to manually update this status anyway. I believe simply including the "version" path would allow the admin client to make a request to this version API on each service to determine both the current version and status of the service in that environment (ie. if the request fails the status is "down" and if it succeeds it is "working"). I also do not believe it makes sense to try to keep the structure from the Admin BB listed above. If we want to retrieve the information for the services in a different environment, we should make a request to the Core BB in that environment since the environments should have no knowledge of each other. With this in mind, I would suggest that we use the existing structure for the Let me know if you have any questions or feedback on these suggestions. Thanks! |
Hi @shurwit , As I remember the Admin BB populate the health status for every BB and environment automatically but not making the admin to set it manually. BTW, this is what the admin would like to find out instead of setting it. Your suggestion is removing the knowledge from the back-end about the BBs health status and putting it to the admin app(which is not an issue) but if we want to populate the entry screen(where we show all BBs with health status for every env) in the admin app then the client will need to make 17 services x 3 environments = 51 requests when displaying the screen. On other side we unload the back-end from logic which is good. Also having in mind that the admin app will not be used by thousands users we could accept having the status health of the services to happen in the admin app not loading the back-end with many requests as this screen would be shown rarely. I am ok with your suggestion but we will also need to update the admin app to do the work for this screen. I would suggest not removing GET /system/service-regs endpoint. It makes sense this API to exist and to give all service regs. Let me know your thoughts. Thanks cc @stefanvit |
Hi @petyos, thanks for following up!
Thanks for pointing this out. I did not realize that the Admin BB was making these requests. It looks to me like the Admin BB is making these requests every time the building blocks are retrieved (https://github.com/rokwire/admin-building-block/blob/7c44b41cec35e14d7ab5fd3da18a42efde5b6f57/core/services.go#L60). This is going to be the exact same number of requests with the same amount of overhead, however it is also adding the burden of making these requests to our back-end resources. While there may be ways to cache this information to improve performance if we do keep it on the back end, I believe the version requests are simple and small enough that it is better to just let the client make them itself to ensure the information is as up-to-date as possible.
Yes, we will need to make some additional changes in the admin app if we take this approach, but I believe some changes will be necessary either way.
I agree that it probably makes sense to keep the GET /system/service-regs as you suggested. Now that I understand how the admin app is currently working a bit better, I have a couple more issues to bring up.
Let me know if you have any thoughts or questions about any of the points above. Thanks again! |
Hi @shurwit , If @pmarkhennessy is ok to populate the Health Status Version table with the statuses only for the current environment(but not for all environments) then I would suggest to protect the
I mean this is what you describe in point two but to be sure we are on the same page. |
Hi @petyos, I spoke to @pmarkhennessy and @johnmpaul and they said we should keep all of the environments together since they typically use that to compare the versions across environment. I think with this in mind we will need to make this service registration endpoint public as discussed above. Thank you for the description of the organization services. I think the approach you suggest sounds good. |
After further discussion, our conclusion for now is that we should just have public admin APIs that expose the list of all service registrations. We should also add the |
Is your feature request related to a problem? Please describe.
We would like to move features from Admin BB to Core BB. One of these is the get building-blocks API in the Admin BB which is called by the admin app. In Core BB the corresponding entity is ServiceReg. We would like to deprecate the API in the Admin BB and start using the one in the Core BB.
Describe the solution you'd like
Admin BB building-blocks gives the following structure:
We would like to expose GET admin/organization/service-regs API which gives the services for the current organization. The missing fields have to be added so that the admin app to call the new created API from the Core BB.
The text was updated successfully, but these errors were encountered: