From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NupT3-0000ej-68 for qemu-devel@nongnu.org; Thu, 25 Mar 2010 11:59:33 -0400 Received: from [140.186.70.92] (port=46029 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NupT2-0000eJ-2E for qemu-devel@nongnu.org; Thu, 25 Mar 2010 11:59:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NupSz-0004uM-Q6 for qemu-devel@nongnu.org; Thu, 25 Mar 2010 11:59:31 -0400 Received: from ey-out-1920.google.com ([74.125.78.147]:19706) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NupSz-0004uB-LZ for qemu-devel@nongnu.org; Thu, 25 Mar 2010 11:59:29 -0400 Received: by ey-out-1920.google.com with SMTP id 4so2258036eyg.14 for ; Thu, 25 Mar 2010 08:59:28 -0700 (PDT) Message-ID: <4BAB885A.5080604@codemonkey.ws> Date: Thu, 25 Mar 2010 10:59:22 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt References: <4BA7C40C.2040505@codemonkey.ws> <20100323145105.GV16253@redhat.com> <4BA8D8A9.7090308@codemonkey.ws> <201003231557.19474.paul@codesourcery.com> <4BA8E6FC.9080207@codemonkey.ws> <4BA901B5.3020704@redhat.com> <4BA9A066.3070904@redhat.com> <20100324103643.GB624@redhat.com> <4BA9EC88.6000906@redhat.com> <20100324134250.38822113@redhat.com> <4BAA6CD9.6060001@redhat.com> <20100324171219.4365318b@redhat.com> <4BAA76EA.2060601@codemonkey.ws> <20100324182501.000b69a7@redhat.com> <4BAA86C2.4020701@codemonkey.ws> <4BAB1E21.8080009@snarc.org> <4BAB5805.9080000@codemonkey.ws> <4BAB58F1.20401@redhat.com> <4BAB68A2.6020707@codemonkey.ws> <4BAB69C9.6080704@redhat.com> <4BAB6BD0.1000509@codemonkey.ws> <20100325110959.35d805e5@redhat.com> In-Reply-To: <20100325110959.35d805e5@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: Luiz Capitulino Cc: "libvir-list@redhat.com" , Vincent Hanquez , qemu-devel@nongnu.org, Avi Kivity , Paul Brook On 03/25/2010 09:09 AM, Luiz Capitulino wrote: > >> We can provide a generic QMP dispatch interface that high level >> languages can use. Then they can do fancy dispatch, treat QErrors as >> exceptions, etc. >> > They can do that by accessing QMP directly. Why would a Python developer > get in the mess of writing a Python binding for libqemu if they call do > the exactly same thing by using its native json module? > > Man, opening a QMP connection from Python and sending commands can be > done with a few lines. > Problem is, without a libqemu, libvirt cannot return a QMPContext that can be used by python bindings. This is the problem that all high level languages have with respect to RPC transports. You need libqemu to deal with establishing the transport. That code needs to be common and shared across languages. Dispatch can be handled by the high level language. >> We just ought to also provide some simple C wrappers for all of the >> functions. Yes, the C interface is inferior to the generic interface >> but that's fine. >> > Why don't we start with my simple lib suggestion and wait one or two > releases to see what happens? > I have no problem starting without the generated C wrappers. But we need the core library to have the right abstractions with respect to transports. Regards, Anthony Liguori