guys- i thought i would touch base with you about the g3 code base. i know i keep saying that i'm close but well... i'm close.
to see the code visit http://matt-massie.com/g3/ganglia-3.0.0.tar.gz i've compiled and ran it on linux and windows although i'm sure it'll work elsewhere. this code is a completely different beast than i had before. i've come to realize that ganglia doesn't need to be threaded. it just doesn't make sense to use threads. ganglia is i/o intensive .. not cpu intensive. the new g3 uses a select loop for i/o and collecting metrics. it's about a gazillion times more efficient. threads were a liability. (think rrdtool). i did some benchmarking of my old g3 code against my new code and found the threaded version was about 10x slower. too much contention between threads and the data structures were too heavy. the new g3 is more zen and simple but better for it. there is a very basic gmond in this code (it doesn't nothing useful) but it shows you how this select() model will work... look in ./apps and run % ./gmond -f to run it in the foreground. also, to get the taste of the lighter faster data structures... look in ./tests at the file test-tree.c. it is used to create the ./tests/test-tree binary. % ./test-tree will output the hierarchical data structure as xml. again, it does nothing useful right now. once i've tested everything and firmed up the api.. i'll move the code ./lib/tree.c. test-tree shows you how g3 will take s-expressions or xml and store them into a nested hash structure and how the nested hash structure can then be printed but into xml/s-expressions. in the test-tree program i'm using a pair array and static strings but in the "real" g3 those strings will be found in xml/s-expression C structures. i hope you guys have a great weekend. expect a real working g3 soon... not in the geological sense of soon but more immediately (i hope). -- matt