action #25766
closed[tools][sprint 201712.1][bonus] Displaying all Worker status by calling Websocket DBus service in the WebUI list is overkill
0%
Description
When browsing the WebUI, clicking on "Workers" to get the list triggers an extensive loop call over websocket dbus service, that is performed over all the workers just to check if they are connected and display the result to the user.
This operation is potentially overkill when dealing with large number of workers, since each view of that page, triggers a dbus call for each worker, that yields generally to a O(N*M) complexity where M are the users hitting the page in the same moment and N are the registered workers, without taking in consideration the dbus call dispatch timings.
I think instead we should retrieve the same information in the DB, since it is already holding the necessary information to determine if a worker is up or down.
For reference, the method that is being called is 'connected' in the Worker schema [1] called by 'info' [2] that gets propagated from [3][4]
- https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Schema/Result/Workers.pm#L157
- https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Schema/Result/Workers.pm#L190
- https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI/Controller/Admin/Workers.pm#L25
- https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI/Controller/Admin/Workers.pm#L38
Updated by EDiGiacinto about 7 years ago
- Subject changed from [tools] Displaying all Worker status in the WebUI list is overkill to [tools] Displaying all Worker status by calling Websocket DBus service in the WebUI list is overkill
Updated by EDiGiacinto about 7 years ago
- Related to coordination #27832: [epic][tools][sprint 201712.2][bonus] Revamping of /admin/workers added
Updated by EDiGiacinto about 7 years ago
- Related to action #19996: [tools][sprint 201712.2] Show only online workers by default on the workers page `/admin/workers` added
Updated by EDiGiacinto about 7 years ago
- Status changed from New to Resolved
Updated by EDiGiacinto almost 7 years ago
- Subject changed from [tools] Displaying all Worker status by calling Websocket DBus service in the WebUI list is overkill to [tools][sprint 201712.2][bonus] Displaying all Worker status by calling Websocket DBus service in the WebUI list is overkill
- Target version changed from future to Current Sprint
Updated by szarate almost 7 years ago
- Subject changed from [tools][sprint 201712.2][bonus] Displaying all Worker status by calling Websocket DBus service in the WebUI list is overkill to [tools][sprint 201712.1][bonus] Displaying all Worker status by calling Websocket DBus service in the WebUI list is overkill
Updated by szarate almost 7 years ago
- Target version changed from Current Sprint to Done