Bug 966062 - [Admin Portal] Move to lighter business entities
[Admin Portal] Move to lighter business entities
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-webadmin-portal (Show other bugs)
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Nobody's working on this, feel free to take it
Pavel Stehlik
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2013-05-22 08:01 EDT by Jiri Belka
Modified: 2015-09-22 09 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-12-01 14:23:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
NetworkData.xml - IE Developer Tools (15.15 KB, application/x-gzip)
2013-05-22 08:01 EDT, Jiri Belka
no flags Details

  None (edit)
Description Jiri Belka 2013-05-22 08:01:33 EDT
Created attachment 751670 [details]
NetworkData.xml - IE Developer Tools

Description of problem:
Vm's subdata (like Applications reported by guest agent) are downloaded when entering Virtual Machines main tab but only for VMs which were previously selected.

More exactly: When staying in Virtual Machines maintab, you select couple of VMs. Then you go to 'Data Centers' maintab. Then you go back to 'Virtual Machines' maintab, though no VMs is selected (as you won't click on any VMs!), the Admin Portal app still downloads subtabs' data for each VMs (ones previously selected).

This seems to be wrong, for example for performance reasons.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. go to 'Virtual Machines' maintab and select all VMs
2. switch to 'Data Centers' maintab
3. go back to 'Virtual Machines' maintab

Actual results:
subtabs' data are downloaded for previously selected VMs (in step 1.)

Expected results:
i think it should not download subtabs' data when no VMs is again selected

Additional info:
I discovered this with IE Developers tools (F12). More precisly:
* go to 'Virtual Machines' maintab and select all VMs
* switch to 'Data Centers' maintab
* in Developer Tools select 'Network' and start capturing data
* go back to 'Virtual Machines' maintab
* in Developer Tools stop capturing, save data, open it and check if subtabs' data were downloaded (I have couple of VMs with guest agent running and I could see installed apps like RHEV-Agent64, so this is evidently from Applications subtab).

In attachment you can see my captured data after described action.
Comment 1 Einav Cohen 2013-05-23 08:42:54 EDT
Jiri: the "installed applications" are part of the VM business entity; when fetching the VMs to display in the VMs main tab (even without selecting any of the VMs to display the sub-tabs), the "installed application" information for each VM is there (again - since it is part of the VM business entity that is returned from the backend within the search results), even if it is currently not being displayed.

so the "installed applications" information is downloaded to the client for *all* displayed VMs, and not only for VMs that were previously selected.

I agree that this information is not needed while we are not selecting any VM in the grid, and we indeed discussed in the past the possibility of returning in the search results "lighter" business entities in order to save some traffic between the server and the client and possibly improve the performance.

I am turning this BZ to be a general "move to lighter business entities" BZ. We should consider it against other tasks that we are planning, e.g. moving to work against the REST API (including REST API business entities).
Comment 2 vszocs 2013-05-28 12:41:07 EDT
> Jiri: the "installed applications" are part of the VM business entity

Yes, in VmDynamic entity (part of VM entity) there's "String appList" field that contains delimited list of installed applications. So "installed applications" data should be always part of VM entity data, even when fetching VMs for VM main-tab.

On the other hand, each time you change selection in VM main table, VM "Applications" sub-tab (VmAppListModel) fetches up-to-date "installed applications" data by GetVmDataByPoolId query, which basically returns (updated) VM entity for given selection -> again, we use "String appList" field of VM entity, as mentioned above.

The general problem is using same business entities on both client and server, which should be solved after we move GUI on top of REST API -> even better, if REST API supports returning entity data filtered according to client preferences (i.e. just get me fields X and Y but not Z because I don't need it in my GUI).
Comment 3 Itamar Heim 2013-12-01 14:23:51 EST
as vojtech mentioned, we'll try to do this as part of moving to the rest api. i don't think we need a separate tracker for this though.
Comment 4 vszocs 2013-12-09 08:55:07 EST
(In reply to Itamar Heim from comment #3)
> as vojtech mentioned, we'll try to do this as part of moving to the rest
> api. i don't think we need a separate tracker for this though.

Indeed, moving to use REST API in web UI will solve many problems related to GWT RPC, including problem described in this BZ.

Note: aggregation of useful data related to given entity (i.e. VM) can be implemented either on client (JavaScript SDK) or server (REST API backend).

Note You need to log in before you can comment on or make changes to this bug.