[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: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file
Date: Sun, 28 Jun 2009 15:11:15 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

On 06/26/2009 06:02 PM, Anthony Liguori wrote:
Anthony Liguori wrote:
Avi Kivity wrote:
Merging is a meaningless milestone since the protocol will not be enabled. Since we'll miss 0.11 in reality we have 7-8 months before the protocol can be used in production. IMO you're optimizing for the short term, disregarding long-term maintenance, and disregarding ease of implementation for users of the qemu monitor.

Here's an updated grammar.

One benefit of using our own grammar over just JSON-RPC that is line based is that lines form discrete PDUs. If you wanted to implement a JSON-RPC parser, you would have to be able to either invent your own PDU transmission mechanism or rely on the JSON parser to determine message boundaries. Since the later is likely to be a recursive decent parser, this is difficult to work into an asynchronous client library. The same is true for XML-RPC. With XML-RPC, you rely on HTTP's Content-Length header to determine boundaries.

You could also abort the parse if you reach EOF, and start it from the beginning when you get more data. It's reasonably efficient in a local protocol, and when you expect small messages.

I'm fine with a newline delimiter though.

error compiling committee.c: too many arguments to function

reply via email to

[Prev in Thread] Current Thread [Next in Thread]