From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MzXWq-000400-Mk for qemu-devel@nongnu.org; Sun, 18 Oct 2009 11:18:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MzXWl-0003z9-O3 for qemu-devel@nongnu.org; Sun, 18 Oct 2009 11:18:39 -0400 Received: from [199.232.76.173] (port=40245 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MzXWl-0003z6-KM for qemu-devel@nongnu.org; Sun, 18 Oct 2009 11:18:35 -0400 Date: Sun, 18 Oct 2009 13:18:18 -0200 From: Luiz Capitulino Subject: Re: [Qemu-devel] Re: [PATCH 01/10] Introduce qmisc module Message-ID: <20091018131818.6d8d73ae@doriath> In-Reply-To: <4ADB2B13.4090207@codemonkey.ws> References: <1255037747-3340-1-git-send-email-lcapitulino@redhat.com> <1255037747-3340-2-git-send-email-lcapitulino@redhat.com> <4AD72B88.2040107@codemonkey.ws> <20091015122622.1f93ea2d@doriath> <20091015163936.GB532@redhat.com> <20091015142837.6c90580a@doriath> <4AD76B3C.3050001@codemonkey.ws> <4AD87424.3010000@redhat.com> <4AD87901.5030705@codemonkey.ws> <4AD8AECE.9000507@redhat.com> <4AD8AFA4.4070203@codemonkey.ws> <4AD8CB31.9080809@redhat.com> <4AD8E7B5.8000509@codemonkey.ws> <4AD910BA.4090607@gnu.org> <4AD922EB.5030501@codemonkey.ws> <4AD995FD.6070202@snarc.org> <20091018120631.0ab44d80@doriath> <4ADB2172.2040501@gnu.org> <4ADB2B13.4090207@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paolo Bonzini , Vincent Hanquez , qemu-devel@nongnu.org On Sun, 18 Oct 2009 09:49:55 -0500 Anthony Liguori wrote: > Paolo Bonzini wrote: > > On 10/18/2009 04:06 PM, Luiz Capitulino wrote: > >> Integration with QObjects is a killer feature, I think it's the > >> stronger argument against grabbing one from the internet. > > > > Yeah, I'd say let's go with Anthony's stuff. I'll rebase the encoder > > on top of it soonish (I still think it's best if JSON encoding lies in > > QObject like a kind of toString). If we'll need the asynchronous > > parsing later, we can easily replace it with mine or Vincent's. > > One thing I want to add as a feature to the 0.12 release is a nice > client API. To have this, we'll need message boundary identification > and a JSON encoder. I'll focus on the message boundary identification > today. > > I'd strongly suggest making the JSON encoder live outside of QObject. > There are many possible ways to represent a QObject. Think of JSON as a > view of the QObject model. The human monitor mode representation is a > different view. I agree. QObject's methods should only be used/needed by the object layer itself, if the problem at hand handles high level data types (QInt, QDict, etc) then we need a new type. The right way to have what Paolo is suggesting, would be to have a toString() method in the object layer and allow it to be overridden.