From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJAni-0000zD-3Q for qemu-devel@nongnu.org; Tue, 23 Jun 2009 14:32:58 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJAnd-0000tE-8s for qemu-devel@nongnu.org; Tue, 23 Jun 2009 14:32:57 -0400 Received: from [199.232.76.173] (port=48720 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJAnd-0000t3-4a for qemu-devel@nongnu.org; Tue, 23 Jun 2009 14:32:53 -0400 Received: from mx20.gnu.org ([199.232.41.8]:21815) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MJAnc-0004MR-Mo for qemu-devel@nongnu.org; Tue, 23 Jun 2009 14:32:52 -0400 Received: from e3.ny.us.ibm.com ([32.97.182.143]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MJAnb-0007YM-DD for qemu-devel@nongnu.org; Tue, 23 Jun 2009 14:32:51 -0400 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by e3.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n5NIRcrE021555 for ; Tue, 23 Jun 2009 14:27:38 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n5NIWcEg950436 for ; Tue, 23 Jun 2009 14:32:39 -0400 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n5NIWc3D004674 for ; Tue, 23 Jun 2009 12:32:38 -0600 Message-ID: <4A411FC5.7050701@us.ibm.com> Date: Tue, 23 Jun 2009 13:32:37 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file References: <20090623012811.53a62493@doriath> <20090623144521.GA614@snarc.org> <4A40FB11.8090100@redhat.com> <4A40FB26.2040702@us.ibm.com> <4A40FD1A.1040303@redhat.com> <4A40FE31.2010007@us.ibm.com> <4A40FFB0.2070905@redhat.com> In-Reply-To: <4A40FFB0.2070905@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: ehabkost@redhat.com, jan.kiszka@siemens.com, dlaor@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino , Vincent Hanquez Avi Kivity wrote: > > An RPC makes it a lot easier for clients to parse, there's no need for > a regular expression per command, or to bother with line continuations > etc. You just focus on the data. > > We have an opportunity to make a clean break, let's make use of it. If we structure things internally correctly, by having a flow that basically looks like: int (Monitor *mon, ) { // process args if (success) { monitor_print_data(mon, ); } else { record_extended_error(); return error_code; } } Then it that works well for both the human monitor and the computer monitor. It's an RPC though. Should we support other types of RPCs? I don't know. I'd think that you could create a computer monitor -> jsonrpc bridge easily enough. If we implement this correctly, then an RPC interface could just be another option to see the computer monitor mode implemented as a "module". >> I don't want to invent Xen-API here and go through that pain in QEMU. > > I don't see the parallel. Xen-API was the "clean break" for Xend. -- Regards, Anthony Liguori