On Thu, Dec 9, 2010 at 9:03 PM, Anthony Liguori <aligu...@linux.vnet.ibm.com> wrote: > On 12/09/2010 02:45 PM, Michael Roth wrote: >> >> On 12/08/2010 04:10 AM, Stefan Hajnoczi wrote: >>> >>> On Fri, Dec 3, 2010 at 6:03 PM, Michael Roth<mdr...@linux.vnet.ibm.com> >>> wrote: >>>> >>>> These patches apply to master, and can also be obtained from: >>>> git://repo.or.cz/qemu/mdroth.git virtagent_v5 >>> >>> Why XML-RPC and not QMP? When I skim through the patch series it >>> seems like much of the work being done is very similar to QMP. >>> >> >> It does, actually, more than I realized. In terms of data encapsulation I >> don't see why we couldn't use QMP/JSON for at least the current set of RPCs. >> XMLRPC does support a wider range of data types however, such as nestable >> arrays and structs, and set-precision numerical types like 32 and 64-bit >> ints/floats, which may prove useful for future lower level interfaces. > > 1) XML-RPC is more widely supported than QMP (as there is zero support for > QMP outside of QEMU and libvirt)
True, but the current design doesn't lend itself to custom agents at the XML-RPC level. Therefore using a standard protocol doesn't win anything - it would have been more useful for QMP actually. > 2) The target of this work is for guest agents Not sure what this means. > 3) QMP does not support bidirectional RPC messages. Right. QMP has commands, responses, and asynchronous events so the client and server are two different roles (asymmetric). I hadn't though through the details and this suggests shoehorning QMP in as the agent protocol would be ugly. > 4) The RPC mechanism is a minor part of virt-agent so ultimately, it kind of > doesn't matter. The RPC messages themselves are what's important. Getting the design and features of virtagent right is key. But we still need to maintain the code, that's why I ask about reusing what we've got. Stefan