qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel <qemu-devel@nongnu.org>,
	Markus Armbruster <armbru@redhat.com>
Subject: [Qemu-devel] Re: [RFC] qapi: events in QMP
Date: Mon, 14 Feb 2011 13:33:04 +0000	[thread overview]
Message-ID: <20110214133304.GI2729@redhat.com> (raw)
In-Reply-To: <20110214112852.6223b04d@doriath>

On Mon, Feb 14, 2011 at 11:28:52AM -0200, Luiz Capitulino wrote:
> On Sun, 13 Feb 2011 12:08:04 -0600
> Anthony Liguori <anthony@codemonkey.ws> wrote:
> 
> > Hi,
> > 
> > In my QAPI branch[1], I've now got almost every existing QMP command 
> > converted with (hopefully) all of the hard problems solved.  There is 
> > only one remaining thing to attack before posting for inclusion and 
> > that's events.  Here's my current thinking about what to do.
> > 
> > Events in QMP Today
> > 
> > QMP events are asynchronous messages.  They are not tied explicitly to 
> > any type of context, do not have a well defined format, and are have no 
> > mechanism to mask or filter events.  As of right now, we have somewhere 
> > around a dozen events.
> > 
> > Goals of QAPI
> > 
> > 1) Make all interfaces consumable in C such that we can use the 
> > interfaces in QEMU
> > 
> > 2) Make all interfaces exposed through a library using code generation 
> > from static introspection
> > 
> > 3) Make all interfaces well specified in a formal schema
> > 
> > Proposal for events in QAPI
> > 
> > For QAPI, I'd like to model events on the notion of signals and 
> > slots[2].  A client would explicitly connect to a signal through a QMP 
> > interface which would result in a slot being added that then generates 
> > an event.  Internally in QEMU, we could also connect slots to the same 
> > signals.  Since we don't have an object API in QMP, we'd use a pair of 
> > connect/disconnect functions that had enough information to identify the 
> > signal.
> 
> This seems to be the right way to do this in C, but I wonder if it will
> get complex/bloated to require this on the wire protocol.
> 
> In the initial discussions on QMP events, we decided that it was
> simpler/easier to just send all events and let the client do the masking if it
> wants to. Later on, Daniel commented that it would be useful to able to mask
> events early on.. Now, this proposal will require registration.
> 
> We don't seem to make our mind..
> 
> Daniel, what do you think?

I've always thought it was bad to have all events enabled all
the time, because it is not scalable as the number & frequency
of events increases. Requiring the app register for each event
it cares about is more scalable & also allows the app to discover
if a particular event is actually supported by that QEMU version.
eg The initial 'qmp_capabilities' greeting from the client could
include the list of all desired event names from the client,
and the server could reply with the list of those event it can
actually support & has enabled.


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  reply	other threads:[~2011-02-14 13:33 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-13 18:08 [Qemu-devel] [RFC] qapi: events in QMP Anthony Liguori
2011-02-13 18:15 ` Anthony Liguori
2011-02-14  9:50 ` [Qemu-devel] " Kevin Wolf
2011-02-14 12:03   ` Anthony Liguori
2011-02-14 12:32     ` Kevin Wolf
2011-02-14 12:45       ` Luiz Capitulino
2011-02-14 14:39         ` Anthony Liguori
2011-02-14 18:34           ` Luiz Capitulino
2011-02-14 19:34             ` Anthony Liguori
2011-02-14 19:58               ` Luiz Capitulino
2011-02-14 20:01                 ` Luiz Capitulino
2011-02-14 20:15                 ` Anthony Liguori
2011-02-15 13:35                   ` Luiz Capitulino
2011-02-15 14:54                 ` Markus Armbruster
2011-02-15  9:20               ` Kevin Wolf
2011-02-15 13:38                 ` Luiz Capitulino
2011-02-16  0:59                   ` Anthony Liguori
2011-02-16  8:50                     ` Kevin Wolf
2011-02-16 13:43                       ` Anthony Liguori
2011-02-16 14:15                         ` Kevin Wolf
2011-02-16 14:32                           ` Anthony Liguori
2011-02-16 14:32                           ` Anthony Liguori
2011-02-14 21:14       ` Anthony Liguori
2011-02-14 13:28 ` Luiz Capitulino
2011-02-14 13:33   ` Daniel P. Berrange [this message]
2011-02-14 14:24     ` Anthony Liguori
2011-02-14 14:32   ` Anthony Liguori
2011-02-15 14:07 ` What's QAPI? (was: [Qemu-devel] [RFC] qapi: events in QMP) Markus Armbruster
2011-02-15 14:13   ` [Qemu-devel] Re: What's QAPI? Anthony Liguori
2011-02-15 16:15   ` Anthony Liguori

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=20110214133304.GI2729@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@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).