Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 May 2014 09:46:06 -0230
From:      Jonathan Anderson <jonathan.robert.anderson@gmail.com>
To:        Zaro Korchev <zkorchev@mail.bg>
Cc:        Vsevolod Stakhov <vsevolod@FreeBSD.org>, Eitan Adler <eadler@FreeBSD.org>, David Chisnall <theraven@theravensnest.org>, Pawel Jakub Dawidek <pjd@freebsd.org>, soc-status@freebsd.org, Jonathan Anderson <jonathan@FreeBSD.org>
Subject:   Re: [Machine readable output from userland utilities] report
Message-ID:  <1ED224CA-9E91-459F-9ADE-E614755D1AA2@gmail.com>
In-Reply-To: <105B3699-2A41-4384-8D02-523D8445436B@mail.bg>
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>

index | next in thread | previous in thread | raw e-mail

On 28 May 2014, at 9:36, Zaro Korchev <zkorchev@mail.bg> 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.
> 
> 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/

home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1ED224CA-9E91-459F-9ADE-E614755D1AA2>