From: Paolo Bonzini <pbonzini@redhat.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: armbru@redhat.com, qiaonuohan@cn.fujitsu.com,
Amos Kong <akong@redhat.com>,
qemu-devel@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [PATCH] full introspection support for QMP
Date: Wed, 03 Jul 2013 07:52:58 +0200 [thread overview]
Message-ID: <51D3BC3A.4030803@redhat.com> (raw)
In-Reply-To: <87zju4wufh.fsf@codemonkey.ws>
Il 02/07/2013 22:58, Anthony Liguori ha scritto:
> > > We consume the schema in QEMU. No reason for us to consume it in a
> > > different format than libvirt.
> >
> > One reason could be that qapi-schema.json, as written, lacks a schema
> > that can be expressed itself using QAPI.
>
> Yup, but how much does that matter in practice?
It matters little because we do not provide a library of QAPI
parsers/visitors, so clients have to invent their own anyway.
But if we did, clients would be completely oblivious of the fact that
QMP is based on JSON. Sending qapi-schema.json down the wire as a JSON
string would break the abstraction that we provide to the clients.
> At any rate, if we wanted to solve this problem--a self-describing
> schema--we should do it in qapi-schema.json too.
I disagree. I also disagree that qapi-schema.json, as written, is a
format designed for machine consumption.
So, qapi-schema.json has to be readable/writable _mostly_ by humans.
That it is valid JSON is little more than a curious accident, because
overall the syntax greatly favors humans rather than computers. A
format designed for computers would have a schema such that no parsing
tasks (however small---I'm thinking of the "list of" and "optional"
syntaxes) would be left after parsing the JSON.
The example that Eric sent is not something that I would find easy to
read/write. qapi-schema.json instead is more than acceptable.
Paolo
next prev parent reply other threads:[~2013-07-03 5:53 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-19 12:24 [Qemu-devel] [PATCH] full introspection support for QMP Amos Kong
2013-06-19 12:49 ` Amos Kong
2013-06-20 10:16 ` Amos Kong
2013-07-02 16:39 ` Eric Blake
2013-06-21 3:20 ` Luiz Capitulino
2013-07-02 8:37 ` Amos Kong
2013-07-02 14:20 ` Luiz Capitulino
2013-07-16 10:52 ` Amos Kong
2013-07-02 14:51 ` Anthony Liguori
2013-07-02 15:28 ` Eric Blake
2013-07-02 15:39 ` Daniel P. Berrange
2013-07-02 16:44 ` Eric Blake
2013-07-02 17:01 ` Paolo Bonzini
2013-07-02 17:06 ` Eric Blake
2013-07-02 18:27 ` Anthony Liguori
2013-07-04 3:54 ` Amos Kong
2013-07-02 18:21 ` Anthony Liguori
2013-07-02 20:00 ` Paolo Bonzini
2013-07-02 20:08 ` Eric Blake
2013-07-02 20:58 ` Anthony Liguori
2013-07-03 5:52 ` Paolo Bonzini [this message]
2013-07-03 12:54 ` Anthony Liguori
2013-07-03 14:45 ` Paolo Bonzini
2013-07-03 16:06 ` Anthony Liguori
2013-07-04 7:53 ` Paolo Bonzini
2013-07-11 13:37 ` Amos Kong
2013-07-02 17:06 ` Anthony Liguori
2013-07-02 17:11 ` Eric Blake
2013-07-02 18:28 ` Anthony Liguori
2013-07-03 15:08 ` Kevin Wolf
2013-07-03 15:59 ` Anthony Liguori
2013-07-04 7:42 ` Kevin Wolf
2013-07-04 7:55 ` Paolo Bonzini
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=51D3BC3A.4030803@redhat.com \
--to=pbonzini@redhat.com \
--cc=akong@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qiaonuohan@cn.fujitsu.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.