On 04/08/2013 04:49 PM, arvind viswanathan wrote:
Hi,
I wanted to check if event loop integration was supported even for remote
applications using libvirt. My application would like to make non-blocking
calls and also recv asynchronous notification remotely. Can some one point
out if its supported.
Yes, event registration and asyncrhonous notifications work even across
remote connections. Several APIs are documented as firing events on
completion. There are still some APIs that are blocking by default, and
where patches may be needed to let those APIs start a asynchronous
long-running job where you can rely on event notification or polling to
learn when it is done (most notably, we need to rework the
virStoragePool and virStorageVol APIs to add a concept of jobs); patches
are welcome if you are interested in improving the code base. But for
other existing APIs, such as lifecycle changes in a domain (when it
changes from running to shutdown, for example), the existing event
mechanism is great for avoiding polling or blocking calls, whether to a
local or remote libvirt connection URI.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org