[Machine readable output from userland utilities] report

Jonathan Anderson jonathan.robert.anderson at gmail.com
Wed May 28 12:16:07 UTC 2014


On 28 May 2014, at 9:36, Zaro Korchev <zkorchev at 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 at FreeBSD.org
http://freebsd.org/~jonathan/


More information about the soc-status mailing list