[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 19:52:33 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Avi Kivity wrote:
> On 06/24/2009 07:22 PM, Jamie Lokier wrote:
> >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,
>
> One of the points of using an existing RPC implementation is not to have
> to code it up.
In my experience, using some existing RPC implementations tends to
involve quite a lot of code, and implementing from scratch only a
little more, when we're talking about *simple* RPC protocols. Like
QEMU's monitor for example. You still reuse code of course, but it's
things like sockets, buffering, select and dispatch loops.
Obviously if it's something larger it's good to start with a good
library. One which not only exists, but doesn't need a lot of
application boilerplate. RPC libraries vary a lot in how much
application code they need you to write.
I don't know whether there are good XML-RPC libraries for C.
There doesn't seem to be much for JSON-RPC services.
> >if it's a restricted subset.
>
> You can't control what's coming in from the other side.
You can reject it if the protocol specification says it's not allowed.
Some protocols do that. Otherwise you have to process it correctly.
It's trivial to reject byte values that shouldn't be there.
-- Jamie
- Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file, (continued)
- 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, 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, 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
- 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, Luiz Capitulino, 2009/06/25