Hey All,
        We've been talking about adding json in addition to xml for the tcp
listen port exchange format. And I was curious if the "EXTRA_DATA"
subtree to the XML ever contains something aside from "EXTRA_ELEMENTS"
and if the "EXTRA_ELEMENTS" ever have attributes aside from "NAME" and
"VAL".

Just doing some back of napkin calculations it looks like reducing this
portion of the xml from:

<METRIC NAME="swap_free" VAL="47872928" TYPE="float" UNITS="KB" TN="24"
TMAX="180" DMAX="0" SLOPE="both">
<EXTRA_DATA>
<EXTRA_ELEMENT NAME="GROUP" VAL="memory"/>
<EXTRA_ELEMENT NAME="DESC" VAL="Amount of available swap memory"/>
<EXTRA_ELEMENT NAME="TITLE" VAL="Free Swap Space"/>
</EXTRA_DATA>
</METRIC>

to:

<METRIC NAME="swap_free" VAL="47872928" TYPE="float" UNITS="KB" TN="24"
TMAX="180" DMAX="0" SLOPE="both">
<EXTRA_DATA GROUP="memory" DESC="Amount of available swap memory"
TITLE="Free Swap Space"/>
</METRIC>

would be quite a savings over the wire. Of course this would break
compatibility with anything that currently exchanges xml with ganglia
monitor. But... That gets me back to json...

The current data structure from xml to json is something like this:

{metric:{name:'swap_free',val:47872928,type:'float',units:'KB',tn:24,tmax:180,dmax:0,slope:'both',extra_data:{extra_element:[{name:'GROUP',val:'memory'},{name:'DESC',val:'Amount
of available swap memory'},{name:'TITLE',val:'Free Swap Space'}]}}}

While the collapsed version ends up being this tiny json blob:

{metric:{name:'swap_free',val:47872928,type:'float',units:'KB',tn:24,tmax:180,dmax:0,slope:'both',extra_data:{group:'memory',desc:'Amount
of available swap memory',title:'Free Swap Space'}}}


On a relatively small cluster with a dozen metrics and a handful of
hosts the savings are minor. However on a cluster of hundreds of hosts
with perhaps dozens of metrics the savings would equate to MBs of data
per tcp fetch. And the parse speed of the json /should/ be much faster
as well.

Any comments/questions/ideas?

-Dave

------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to