Project

General

Profile

action #25766

[tools][sprint 201712.1][bonus] Displaying all Worker status by calling Websocket DBus service in the WebUI list is overkill

Added by EDiGiacinto almost 3 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2017-10-04
Due date:
% Done:

0%

Estimated time:
Difficulty:

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]

  1. https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Schema/Result/Workers.pm#L157
  2. https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/Schema/Result/Workers.pm#L190
  3. https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI/Controller/Admin/Workers.pm#L25
  4. https://github.com/os-autoinst/openQA/blob/master/lib/OpenQA/WebAPI/Controller/Admin/Workers.pm#L38

Related issues

Related to openQA Project - action #27832: [epic][tools][sprint 201712.2][bonus] Revamping of /admin/workersResolved2017-11-17

Related to openQA Project - action #19996: [tools][sprint 201712.2] Show only online workers by default on the workers page `/admin/workers`Resolved2017-06-22

History

#1 Updated by EDiGiacinto almost 3 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

#2 Updated by EDiGiacinto almost 3 years ago

  • Related to action #27832: [epic][tools][sprint 201712.2][bonus] Revamping of /admin/workers added

#3 Updated by EDiGiacinto almost 3 years ago

  • Related to action #19996: [tools][sprint 201712.2] Show only online workers by default on the workers page `/admin/workers` added

#4 Updated by EDiGiacinto almost 3 years ago

  • Assignee set to EDiGiacinto

#5 Updated by EDiGiacinto almost 3 years ago

  • Status changed from New to Resolved

#6 Updated by EDiGiacinto over 2 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

#7 Updated by szarate over 2 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

#8 Updated by szarate over 2 years ago

  • Target version changed from Current Sprint to Done

Also available in: Atom PDF