qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] QEMU Dbus support - a proposal management API
Date: Tue, 11 Dec 2007 14:56:58 +0000	[thread overview]
Message-ID: <20071211145658.GB17368@redhat.com> (raw)
In-Reply-To: <475E6F02.9000302@qumranet.com>

On Tue, Dec 11, 2007 at 01:05:38PM +0200, Avi Kivity wrote:
> Fabrice Bellard wrote:
> >Hi,
> >
> >At this point I am not interested in integrating it into QEMU as it is 
> >one more API level to maintain in addition to the command line 
> >monitor. However, I can change my mind if several projects insists to 
> >have a similar interface.
> >
> 
> I think that many projects now want to control qemu programatically.  
> The monitor is not a good interface since it is text-based, hard to 
> parse, and liable to change without notice when new features are added.  
> However, I agree that having many similar constructs is not a good 
> thing, and that we should retain the monitor for non-programmatic control.
> 
> What do you say to implementing the qemu interface as a plugin API, and 
> implementing the monitor on top of this API? e.g.:
> 
> qemu loads /usr/local/lib/qemu/libmonitor.so, which uses the API to 
> export the good old qemu monitor interface.  If it finds 
> /usr/local/lib/qemu/libdbus.so, it loads an additional dbus interface.  
> If libvirt wants to drop a libvirtapi.so into that directory, it can 
> control qemu through that.

To be honest this is overkill. IMHO, there should simply be a client side
'libqemumonitor.so' which provides a formal C API for applications to use.
This C api would then talk to the QEMU monitor, thus isolating all the
string parsing & formatting in one place. Behind the scenes I could imagine
dropping in an alternative QEMU monitor impl which used an XDR serialization
format for the args & reply to avoid the string parsing/formatting, but this
is a minor detail, compared to the big picture, which is that applications
would benefit from a simply C api implementing the monitor commands. I'd
be interested in using such an API in libvirt, since I could remove the 
string parsing/formatting code I currently have. Having libvirt drop a
custom .so into the QEMU process just feels horribly wrong.

Regards,
Dan.
-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 978 392 2496 -=|
|=-           Perl modules: http://search.cpan.org/~danberr/              -=|
|=-               Projects: http://freshmeat.net/~danielpb/               -=|
|=-  GnuPG: 7D3B9505   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505  -=| 

  parent reply	other threads:[~2007-12-11 14:57 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-10  8:28 [Qemu-devel] [RFC] QEMU Dbus support - a proposal management API Yuval Kashtan
2007-12-10 20:51 ` Blue Swirl
2007-12-11  7:16   ` Yuval Kashtan
2007-12-11  9:10     ` Fabrice Bellard
2007-12-11  9:23       ` Laurent Vivier
2007-12-11 10:06         ` Brad Campbell
2007-12-11 10:07         ` Dor Laor
2007-12-11 14:51           ` Anthony Liguori
2007-12-11 15:00             ` Daniel P. Berrange
2007-12-11 15:21               ` Yuval Kashtan
2007-12-11 15:31                 ` Daniel P. Berrange
2007-12-11 15:36                 ` Anthony Liguori
2007-12-11 15:59                   ` Avi Kivity
2007-12-11 16:18                     ` Paul Brook
2007-12-11 16:40                       ` Avi Kivity
2007-12-11 15:02             ` Daniel P. Berrange
2007-12-11 15:15               ` Anthony Liguori
2007-12-11 15:40                 ` Richard W.M. Jones
2007-12-11 15:48                   ` Anthony Liguori
2007-12-11 15:58                     ` Daniel P. Berrange
2007-12-11 16:49                       ` Anthony Liguori
2007-12-11 17:04                         ` Daniel P. Berrange
2007-12-11 15:59                     ` Dor Laor
2007-12-11 15:17             ` Jean-Christian de Rivaz
2007-12-11 15:24               ` Daniel P. Berrange
2007-12-11 10:20         ` Andreas Färber
2007-12-11 10:29           ` Laurent Vivier
2007-12-11 10:50             ` Andreas Färber
2007-12-11 10:21         ` Heikki Lindholm
2007-12-11 11:05       ` Avi Kivity
2007-12-11 14:43         ` Anthony Liguori
2007-12-11 14:56         ` Daniel P. Berrange [this message]
2007-12-11 15:57           ` Avi Kivity
2007-12-11 16:07             ` Richard W.M. Jones
2007-12-11 15:44     ` Daniel P. Berrange
2007-12-11 16:10       ` Fabrice Bellard
2007-12-11 14:53 ` Daniel P. Berrange

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071211145658.GB17368@redhat.com \
    --to=berrange@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).