<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><font class="Apple-style-span" face="'Courier New'">Hi!</font><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">After some discussions with Tobi here an initiative for a broader discussion regarding how to make rrdtool more object orientated.</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">Maybe first a reason why I am starting this:</font></div><div><font class="Apple-style-span" face="'Courier New'">I initially started with the idea of implementing different types of graphs - scatter graphs that could get used for correlation of CPU versus TPS or similar to estimate the capacity reserves (See the P.s. for a quick overview what I would like to achieve)</font></div><div><font class="Apple-style-span" face="'Courier New'">So this would require some changes to the argument parser as well and now after having started with a key-value parser that still does the positional arguments as well I am now getting closer to the point of graphing.</font></div><div><font class="Apple-style-span" face="'Courier New'">But then while writing the new parser I came to realize that we are carrying a lot of stuff arround that is either not needed (lots of fields in graph_desc_t) and now that I am finally getting closer to adding new types it came to my mind to take the opportunity to also improve the code by converting(the graphing code) to a more object-orientated approach at the same time.</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">I have been thinking about different options and would like your thoughts of in which directions we should go:</font></div><div><font class="Apple-style-span" face="'Courier New'">* do an OO approach of our own (maybe following the ideas of:&nbsp;<a href="http://www.planetpdf.com/codecuts/pdfs/ooc.pdf">http://www.planetpdf.com/codecuts/pdfs/ooc.pdf</a>)</font></div><div><font class="Apple-style-span" face="'Courier New'">* using GLIB (with class and interface type), which requires a lot of boilerblade code to get written per class</font></div><div><font class="Apple-style-span" face="'Courier New'">* using GLIB with a preprocessor like gop2 or Vala</font></div><div><font class="Apple-style-span" face="'Courier New'">* going with c++</font></div><div><font class="Apple-style-span" face="'Courier New'">* other options (how do pango and others do it?)</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">The idea is really to make the code easier to maintain and better localized the code to what is really needed.</font></div><div><font class="Apple-style-span" face="'Courier New'">THis should also make extending it with new functionality much easier (maybe even allowing for dynamic loading of functions?)</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">So please share your input on the direction we should be taking here...</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">Obviously all this would be material possibly for a 2.0 release.</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">Thanks,</font></div><div><font class="Apple-style-span" face="'Courier New'"><span class="Apple-tab-span" style="white-space:pre">        </span>Martin</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">P.s: What in the end my goal would be is configuring a graph like this:</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; title</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp; &nbsp; &nbsp;XAXIS2 &nbsp; &nbsp; XAXIS3</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp; +----------+----------+</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| Y</font></div><div><font class="Apple-style-span" face="'Courier New'">Y |&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| A</font></div><div><font class="Apple-style-span" face="'Courier New'">A&nbsp;|&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| X</font></div><div><font class="Apple-style-span" face="'Courier New'">X&nbsp;|&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| 4</font></div><div><font class="Apple-style-span" face="'Courier New'">3 |&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;+----------+&nbsp;</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;| &nbsp;XAXIS3 &nbsp;</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp; +----------+----------+</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |</font></div><div><font class="Apple-style-span" face="'Courier New'">Y |&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Y</font></div><div><font class="Apple-style-span" face="'Courier New'">A |&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | A</font></div><div><font class="Apple-style-span" face="'Courier New'">X |&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | X</font></div><div><font class="Apple-style-span" face="'Courier New'">1 | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | 2</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp; | &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp; +---------------------+</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; XAXIS1</font></div><div><font class="Apple-style-span" face="'Courier New'">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; legend</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">VDEF:p95=data2,95,PERCENTNAN</font></div><div><font class="Apple-style-span" face="'Courier New'">AXIS:xaxis=1:label=XAXIS1:min=AUTOSCALEMIN:max=AUTOSCALEMAX:type=TIME<br>AXIS:xaxis=2:label=XAXIS2:min=AUTOSCALEMIN:max=AUTOSCALEMAX:type=TIME<br></font><span class="Apple-style-span" style="font-family: 'Courier New'; ">AXIS:xaxis=3:label=XAXISx:min=AUTOSCALEMIN:max=AUTOSCALEMAX:type=TIME<br></span><font class="Apple-style-span" face="'Courier New'">AXIS:yaxis=1:label=YAX1:min=AUTOSCALEALTMIN:max=AUTOSCALEALTMAX:type=VALUE<br>AXIS:yaxis=2:label=YAX2:min=AUTOSCALEMIN:max=P95:type=VALUE<br>AXIS:yaxis=3:label=YAX3:min=AUTOSCALEMIN:max=AUTOSCALEMAX:type=VALUE<br>AXIS:yaxis=4:label=YAX4:min=AUTOSCALEMIN:max=AUTOSCALEMAX:type=VALUE<br>AXIS:yaxis=5:label=YAX5:min=AUTOSCALEMIN:max=AUTOSCALEMAX:type=VALUE</font></div><div><font class="Apple-style-span" face="'Courier New'">GRAPH:placement=0%x0%+100%x50%:xaxis=1:yaxis=1:ylabellocation=left:xlabellocation=bottom<br>GRAPH:placement=0%x0%+100%x50%:xaxis=1:yaxis=2:ylabellocation=right:xlabellocation=hidden<br>GRAPH:placement=0%x50%+50%x100%:xaxis=2:yaxis=3:ylabellocation=left:xlabellocation=top<br>GRAPH:placement=50%x50%+100%x100%:xaxis=3:yaxis=4:ylabellocation=right:xlabellocation=hidden<br>GRAPH:placement=50%x50%+100%x100%:xaxis=3:yaxis=5:ylabellocation=hidden:xlabellocation=bottom<br></font></div><div><font class="Apple-style-span" face="'Courier New'">LINE:vname=data1:xaxis=1:yaxis=1:label=data1:color=...<br>LINE:vname=data2:xaxis=1:yaxis=2:label=data2:color=...<br>LINE:vname=data3:xaxis=2:yaxis=3:label=data3:color=...<br>LINE:vname=data3:xaxis=3:yaxis=4:label=data4:color=...</font></div><div><font class="Apple-style-span" face="'Courier New'">LINE:data3#ff00ff:data4:xaxis=3:yaxis=4 # to show the old positional parser is still working...</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">You also see that I would like to be able to use VDEFs to control MIN/MAX of an axis (and use implicit VDEFS for defaults)</font></div><div><font class="Apple-style-span" face="'Courier New'">Also we should be able to set the type of an axis to value or time, so that we can create different types of graphs.</font></div><div><font class="Apple-style-span" face="'Courier New'"><br></font></div><div><font class="Apple-style-span" face="'Courier New'">What also came to my mind is the possibility to decide if we want to print/graph something depending on a vdef (say by&nbsp;</font><span class="Apple-style-span" style="font-family: 'Courier New'; ">LINE:vname=data3:...:if=data,MAX,20,LT - also for gprint or such)</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New'; ">Then we could graph high and low volume data in 2 graphs top/bottom and see any abnormalies in any of those lines.</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New'; "><br></span></div><div><span class="Apple-style-span" style="font-family: 'Courier New'; ">To implement all this it would obviously make life much easier with some object-orientated design at its base...</span></div><div><span class="Apple-style-span" style="font-family: 'Courier New'; "><br></span></div><div><span class="Apple-style-span" style="font-family: 'Courier New'; ">Adding another type of chart (say PIE or Histogram) may then be as easy as writing a custom library that gets dynamically loaded...</span></div><div><br></div></body></html>