From: Markus Armbruster <armbru@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>
Cc: "P. Berrange, Daniel" <berrange@redhat.com>,
Sergio Lopez Pascual <slp@redhat.com>,
"Hajnoczi, Stefan" <stefanha@gmail.com>,
qemu-devel <qemu-devel@nongnu.org>,
"Bonzini, Paolo" <pbonzini@redhat.com>,
John Snow <jsnow@redhat.com>
Subject: Re: [PATCH] PoC: Rust binding for QAPI (qemu-ga only, for now)
Date: Tue, 22 Sep 2020 17:37:07 +0200 [thread overview]
Message-ID: <87y2l1kel8.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <CAMxuvay_mQjukGvinb6ur+8z-YyKxu=BdquuF=+yf+UrNmmd2A@mail.gmail.com> ("Marc-André Lureau"'s message of "Mon, 21 Sep 2020 14:11:05 +0400")
Marc-André Lureau <marcandre.lureau@redhat.com> writes:
> Hi
>
> On Mon, Sep 21, 2020 at 1:16 PM Markus Armbruster <armbru@redhat.com> wrote:
>>
>> marcandre.lureau@redhat.com writes:
[...]
>> > Finally, given that the QAPI types are easy to serialize, it was simple
>> > to use "serde" on them, and provide a D-Bus interface for QMP with zbus.
>> > (a similar approach could probably be taken for other protocols, that
>> > could be dynamically loaded... anyone like protobuf better?)
>>
>> QMP is an *external* interface.
>>
>> It supports compatible evolution: we can make certain kinds of changes
>> without affecting clients. These include:
>>
>> * Adding optional arguments
>>
>> * Adding results
>>
>> * Adding values to an enumeration type, branches to a union or
>> alternate
>>
>> * Reordering members of enumerations, structs, unions
>>
>> * Turning an argument type into an alternate with the old type as branch
>>
>> We've made use of this extensively. See also
>> docs/devel/qapi-code-gen.txt section "Compatibility considerations."
>>
>> How do such changes affect clients of the proposed D-Bus interface?
>>
>
> It's not just about the D-Bus interface though.
>
> QMP being JSON, being lazily typed: everytime we make such changes, we
> inflict some pain to all the QMP bindings that want to have a
> statically checked & native version of the interface. Iow, we should
> think twice before doing any of this.
Having to think twice before doing something we need to do all the time
would slow us down. I don't think this is going to fly.
QMP is designed to avoid tight coupling of server (i.e. QEMU) and
client. In particular, we don't want "you have to upgrade both in
lockstep".
A well-behaved client works fine even when it's written for a somewhat
older or newer QMP than the server provides. "Somewhat" because we
deprecate and eventually remove stuff. Graceful degradation when the
gap gets too large.
There's a gap between the "lose" wire format, and a "tight" statically
typed internal interface. The gap exists in QEMU, and we bridge it.
Clients can do the same. Libvirt does: it provides a statically typed
version of the interface without undue coupling.
Replacing the "lose" wire format by something "tighter" like D-Bus
shrinks the gap. Good. It also tightens the coupling. Bad.
[...]
next prev parent reply other threads:[~2020-09-22 15:39 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-10 17:48 [PATCH] PoC: Rust binding for QAPI (qemu-ga only, for now) marcandre.lureau
2020-09-11 10:24 ` Paolo Bonzini
2020-09-11 13:08 ` Paolo Bonzini
2020-09-11 14:00 ` Marc-André Lureau
2020-09-11 15:17 ` Paolo Bonzini
2020-09-29 17:55 ` Marc-André Lureau
2020-09-29 18:23 ` Paolo Bonzini
2020-09-30 9:15 ` Marc-André Lureau
2020-09-30 14:02 ` Paolo Bonzini
2020-09-11 10:46 ` Daniel P. Berrangé
2020-09-11 11:03 ` Marc-André Lureau
2020-09-11 11:28 ` Paolo Bonzini
2020-09-11 11:31 ` Daniel P. Berrangé
2020-09-11 14:19 ` John Snow
2020-09-11 14:17 ` Marc-André Lureau
2020-09-21 9:16 ` Markus Armbruster
2020-09-21 9:30 ` Paolo Bonzini
2020-09-22 14:59 ` Markus Armbruster
2020-09-21 10:04 ` Marc-André Lureau
2020-09-22 15:09 ` Markus Armbruster
2020-09-22 16:35 ` Marc-André Lureau
2020-09-22 17:08 ` Paolo Bonzini
2020-09-29 7:45 ` Marc-André Lureau
2020-09-29 10:14 ` Paolo Bonzini
2020-09-29 10:34 ` Marc-André Lureau
2020-09-29 11:00 ` Paolo Bonzini
2020-09-29 11:34 ` Marc-André Lureau
2020-09-30 7:34 ` Markus Armbruster
2020-09-30 7:51 ` Marc-André Lureau
2020-09-30 13:14 ` Paolo Bonzini
2020-09-22 16:52 ` Daniel P. Berrangé
2020-09-23 11:51 ` Markus Armbruster
2020-09-21 10:11 ` Marc-André Lureau
2020-09-22 15:37 ` Markus Armbruster [this message]
2020-09-22 16:25 ` Marc-André Lureau
2020-09-24 7:31 ` Markus Armbruster
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=87y2l1kel8.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=jsnow@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=slp@redhat.com \
--cc=stefanha@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.