Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1436981 - [RFE] Add support for asynchronous requests and pipe-lining
[RFE] Add support for asynchronous requests and pipe-lining
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine-sdk-python
Classification: oVirt
Component: Core (Show other bugs)
4.1.3
Unspecified Unspecified
unspecified Severity high (vote)
: ovirt-4.1.3
: 4.1.4
Assigned To: Ondra Machacek
Radim Hrazdil
: FutureFeature, Performance
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-03-29 03:55 EDT by Juan Hernández
Modified: 2017-07-06 09:18 EDT (History)
8 users (show)

See Also:
Fixed In Version: python-ovirt-engine-sdk4-4.1.4
Doc Type: Enhancement
Doc Text:
The Python SDK now support asynchronous requests and HTTP pipe-lining. Users can now send requests asynchronously and wait for the response later in code. This makes it possible to send multiple request using multiple connections or pipelined connections, and wait for the response later, which improves performance when fetching multiple objects from the API.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-06 09:18:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.1+
rule-engine: ovirt‑4.2+
mgoldboi: planning_ack+
mperina: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 76041 master MERGED Add support for asynchronous requests 2017-05-04 09:32 EDT
oVirt gerrit 76462 sdk_4.1 MERGED Add support for asynchronous requests 2017-05-04 10:43 EDT

  None (edit)
Description Juan Hernández 2017-03-29 03:55:34 EDT
Currently the Python SDK works always in a synchronous fashion. This RFE is about adding the ability to perform requests in an asynchronous way, without waiting for the responses. That should be combined with the support for multiple simultaneous HTTP connections, and HTTP pipe-lining.

Similar changes have already been done for the Ruby SDK. I believe that the interface should be similar, using the 'future' concept. There is an example of how to use this in the Ruby SDK here:

  https://github.com/oVirt/ovirt-engine-sdk-ruby/blob/master/sdk/examples/asynchronous_inventory.rb

The relevant patch that added that support to the Ruby SDK is this:

  Add support for asynchronous requests
  https://gerrit.ovirt.org/74088

Note that most of the code in the above patch is written in C. I would like to do the same in the Python SDK, but is not really necessary if the 'pycurl' library that that it uses supports well the 'multi' interface of the underlying 'libcurl' library.
Comment 1 Ondra Machacek 2017-05-25 03:37:15 EDT
Here is the description of this RFE:

 https://www.ovirt.org/blog/2017/05/higher-performance-for-python-sdk/
Comment 2 Radim Hrazdil 2017-05-31 10:09:02 EDT
Verified using Machacek's example and example provided by Juan: 
https://github.com/oVirt/ovirt-engine-sdk/blob/master/sdk/examples/asynchronous_inventory.py  

SDK version 4.1.4

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