From owner-soc-status@FreeBSD.ORG Wed May 28 12:16:07 2014 Return-Path: Delivered-To: soc-status@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EC2646C; Wed, 28 May 2014 12:16:07 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65DB32F90; Wed, 28 May 2014 12:16:07 +0000 (UTC) Received: from [IPv6:::1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s4SCG4MY003804; Wed, 28 May 2014 12:16:05 GMT (envelope-from jonathan.robert.anderson@gmail.com) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Subject: Re: [Machine readable output from userland utilities] report From: Jonathan Anderson In-Reply-To: <105B3699-2A41-4384-8D02-523D8445436B@mail.bg> Date: Wed, 28 May 2014 09:46:06 -0230 Content-Transfer-Encoding: quoted-printable Message-Id: <1ED224CA-9E91-459F-9ADE-E614755D1AA2@gmail.com> References: <8D1B686D-1AAA-4E07-9270-E42699110561@mail.bg> <4890861C-FC91-445D-AE9B-31CD5FDFD0A9@theravensnest.org> <15BC1D7C-B909-48DB-AB6D-FF0F0F9C2B0A@mail.bg> <899129C5-977C-4CE7-A873-460D69D6EA85@theravensnest.org> <5385BD49.5020602@FreeBSD.org> <105B3699-2A41-4384-8D02-523D8445436B@mail.bg> To: Zaro Korchev X-Mailer: Apple Mail (2.1878.2) Cc: Vsevolod Stakhov , Eitan Adler , David Chisnall , Pawel Jakub Dawidek , soc-status@freebsd.org, Jonathan Anderson X-BeenThere: soc-status@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Summer of Code Status Reports and Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 May 2014 12:16:07 -0000 On 28 May 2014, at 9:36, Zaro Korchev wrote: > The idea is to serialize the object as it is constructed. That way it = is not necessary to keep all the data in memory at any given moment. = This also allows to create pipeline when the second application starts = consuming output before the first one finished producing it. >=20 > for example: > object_start(buf, ...) writes to buf: > { > object_key(buf, ..., "foo") writes to buf: > "foo" > sol_object_integer(buf, ..., 42) writes to buf: > : 42 > sol_object_end(buf, ...) writes to buf: > } I notice that you have a mix of "object_" and "sol_object_" calls: are = these all purely serialization functions (and should they all be = prefixed with "sol_")? It would be unfortunate to commit to a stateful = object *creation* API, as that would make things difficult for = multithreaded work (e.g. each thread creates an object, each of which is = added to the top-level object as it is completed rather than in lexical = order). Jon -- Jonathan Anderson jonathan@FreeBSD.org http://freebsd.org/~jonathan/=