From: Anthony Liguori <anthony@codemonkey.ws>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
Markus Armbruster <armbru@redhat.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Re: [RFC] qapi: events in QMP
Date: Mon, 14 Feb 2011 14:15:27 -0600 [thread overview]
Message-ID: <4D598D5F.6050101@codemonkey.ws> (raw)
In-Reply-To: <20110214175800.060d4204@doriath>
On 02/14/2011 01:58 PM, Luiz Capitulino wrote:
> No, of course not, our plan has always been to do this via an schema,
> the only reason we don't do this today is lack of time/help.
>
>
Understood--I'm here to help now :-)
>> We need to expose the schema, I'm not saying we shouldn't. But we don't
>> today.
>>
>> You're arguing that we should extend commands by adding new parameters.
>>
> Commands and events, you haven't commented on events yet and that seems
> a bit worse than commands.
>
Events are just commands that never return a value and are posted.
IOW:
client -> server message == command
server -> client message == event
However, we limit events to have no return value and semantically, when
an event is invoked, the message is only posted (we're not guaranteed
that the client has seen it).
The reason for the lack of symmetry is to simplify the programming
model. If we had to wait for an event to be ack'd and receive a return
value, it would involve a lot of ugly callback registrations.
But beyond those few limitations, events and commands should be treated
exactly the same IMHO.
> I disagree. Let's say we have added three new arguments to the command foo,
> and now we have foo1, foo2 and foo3. I'm a quite old distro and only
> have foo, which command should I backport? All of them? Only the latest?
>
> I can't see how easier this is. Backporting APIs will almost always suck.
>
1) if we have to add three arguments to a command, we've failed in our
API design after an initial release
2) it depends on what level of functionality the distro needs. The more
complicated we make the API, the harder it will be to write clients
against it. If we have four ways to do the same thing (even if that's
via one command or four separate ones), writing a client is going to
suck no matter what.
> For C, yes. But one of the main goals of a high level protocol is to be
> language independent, isn't it?
>
Yes, which means first-class support for a variety of languages with C
being a very important one.
>>> Look, although I did _not_ check any code yet, your description of the QAPI
>>> looks really exciting. I'm not against it, what bothers me though is this
>>> number of small limitations we're imposing to the wire protocol.
>>>
>>> Why don't we make libqmp internal only? This way we're free to change it
>>> whatever we want.
>>>
>>>
>> libqmp is a test of how easy it is to use QMP from an external
>> application. If we can't keep libqmp stable, then that means tools like
>> libvirt will always have a hard time using QMP.
>>
>> Proper C support is important. We cannot make it impossible to write a
>> useful C client API.
>>
> I wouldn't say it's impossible, but anyway, the important point here is
> that we disagree about the side effects QAPI is going to introduce in QMP,
> I don't know how to solve this, maybe we can discuss this upstream, but I'm
> not sure the situation will change much.
>
> Should we vote? :)
>
Let's wait until I actually post patches... My purpose of this thread
was to get some feedback on using signal/slots as an abstraction in QEMU.
The QMP conversion is almost done, I'll be able to post patches very soon.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2011-02-14 20:17 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 [this message]
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
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=4D598D5F.6050101@codemonkey.ws \
--to=anthony@codemonkey.ws \
--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).