[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file |
Date: |
Wed, 24 Jun 2009 17:22:07 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Avi Kivity wrote:
> >With respect to RPC choice, if we did go that route, I'd be very
> >concerned about using jsonrpc verses a more well established rpc. I
> >would honestly prefer xml-rpc over jsonrpc.
>
> I agree xml-rpc is a more rational choice than jsonrpc, but I cannot
> find it in my heart to say something nice about xml. Additionally, XML
> parsers are pretty heavy.
I'm not defending XML here, but:
You can code a minimal XML parser in straight C quite easily, if it's
a restricted subset.
That is, if you specify the XML won't use any of the irrelevant
features like PIs, DTDs, namespaces and named entities and know it's
all UTF-8. Maybe even no comments. Then it's just nested elements,
attributes and strings, with < to escape a few characters.
But the XML-RPC spec does not appear to restrict the type of XML, so
you have to handle every XML feature to be XML-RPC compliant,
unfortunately.
Some other "wire" protocols do specify a reduced subset of XML, which
means you don't have to use a heavyweight library for them, which is
nice.
I think feature-restricted XML is quite good for this sort of thing.
It's a bit more self-documenting than JSON. But for some reason, lots
of XML users use it very badly, doing stupid things like
<array><element><type><typename>int</typename></type><subscript>0</subscript><element-value>0</element-value></element>...</array>.
That's an exaggeration but I'm sure you all recognise the pattern.
XML and JSON both have the same ugly problem with binary data: they
can't carry it. It's usually base64 encoded. Then again the QEMU
monitor is no better this respect :-)
-- Jamie
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, (continued)
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Vincent Hanquez, 2009/06/23
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, James, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Daniel P. Berrange, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, James, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Daniel P. Berrange, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Stefano Stabellini, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Anthony Liguori, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Daniel P. Berrange, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Avi Kivity, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Avi Kivity, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file,
Jamie Lokier <=
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Avi Kivity, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Jamie Lokier, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Vincent Hanquez, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Filip Navara, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Jamie Lokier, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Vincent Hanquez, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Filip Navara, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Jamie Lokier, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Ian Jackson, 2009/06/24
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, Jamie Lokier, 2009/06/24