[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] ANN: QEMU Monitor Protocol git tree
From: |
Daniel P. Berrange |
Subject: |
Re: [Qemu-devel] ANN: QEMU Monitor Protocol git tree |
Date: |
Wed, 23 Sep 2009 10:57:01 +0100 |
User-agent: |
Mutt/1.4.1i |
On Tue, Sep 22, 2009 at 08:56:04PM -0500, Anthony Liguori wrote:
> Luiz Capitulino wrote:
> >Now the controversial part: it's json based. ;)
> >
> >I have chosen json because of the reasons already explained by others in
> >the original QMP thread. Basically, json is so simple that if we design
> >a small protocol from scratch, chances are it will look like json.
> >
>
> json is not a deal break. My main concern was our ability to extend
> json and whether supporting stock json libraries was a hard
> requirement. I also would like to see a C client library since our
> biggest consumer (libvirt) is based in C.
I've googled around quickly and there are at least 5 pieces of C code
and/or C libraries that can parse JSON. Hopefully one of them will be
sufficient / suitable for libvirt's needs. We'll just need to try it
out and see what happens....
> >2.1 General Definitions
> >-----------------------
> >
> >All interactions transmitted by Client and Server are json-objects that end
> >with CRLF.
> >
>
> CRLF? Really?
>
> Ignoring the dos-ism, since you can parse JSON with a regexp, why do we
> need explicit message boundaries?
I think it would be nice to be able to assume that each JSON message
will not cross a line-end boundary. Whether we use CRLF, just CR or
just LF I don't mind. Its much easier to search for a message boundary
by just doing strchr('\n') than having to actually parse the JSON or
use a regexp at that point.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
- [Qemu-devel] ANN: QEMU Monitor Protocol git tree, Luiz Capitulino, 2009/09/21
- Re: [Qemu-devel] ANN: QEMU Monitor Protocol git tree, Anthony Liguori, 2009/09/22
- Re: [Qemu-devel] ANN: QEMU Monitor Protocol git tree,
Daniel P. Berrange <=
- Re: [Qemu-devel] ANN: QEMU Monitor Protocol git tree, Avi Kivity, 2009/09/23
- [Qemu-devel] Re: ANN: QEMU Monitor Protocol git tree, Paolo Bonzini, 2009/09/23
- [Qemu-devel] Re: ANN: QEMU Monitor Protocol git tree, Avi Kivity, 2009/09/23
- Re: [Qemu-devel] Re: ANN: QEMU Monitor Protocol git tree, Nathan Baum, 2009/09/23
- Re: [Qemu-devel] Re: ANN: QEMU Monitor Protocol git tree, Luiz Capitulino, 2009/09/23
- Re: [Qemu-devel] Re: ANN: QEMU Monitor Protocol git tree, Anthony Liguori, 2009/09/23
- Re: [Qemu-devel] Re: ANN: QEMU Monitor Protocol git tree, Jamie Lokier, 2009/09/23
- Re: [Qemu-devel] Re: ANN: QEMU Monitor Protocol git tree, Paolo Bonzini, 2009/09/23
- Re: [Qemu-devel] ANN: QEMU Monitor Protocol git tree, Markus Armbruster, 2009/09/23
- Re: [Qemu-devel] ANN: QEMU Monitor Protocol git tree, Luiz Capitulino, 2009/09/23