added PROJECTS file
[rrdtool.git] / PROJECTS
1 NEW RRD DATAFORMAT with Accessor Functions
2 ==========================================
3
4 Interested:
5
6 Tobias Oetiker <oetiker@ee.ethz.ch>
7 Jake Brutlag <jakeb@microsoft.com>  
8 - updating rrd_update to use accessor fks
9 Karl Schilke <karl_schilke@eli.net> 
10 - changeing data access to mmap
11
12
13 Plan:
14
15 Encapsulating access to the RRD files through
16 special accessor functions which provide
17 access to the datastructures within the
18 RRDfiles. 
19
20 pseudo code by Jake
21
22 For example, here is a current code block from rrd_update.c:
23
24         for (i=0;i<rrd.stat_head->ds_cnt;i++) {
25         if(isnan(pdp_new[i]))
26             rrd.pdp_prep[i].scratch[PDP_unkn_sec_cnt].u_cnt += interval;
27         else
28             rrd.pdp_prep[i].scratch[PDP_val].u_val+= pdp_new[i];
29           }
30
31 This could read:
32
33         for (i=0 ; i < getDSCount(&rrd) ;i++) {
34         if(isnan(pdp_new[i])) {
35             temp = getPDPParam(&rrd, i, PDP_unkn_sec_cnt);
36             temp.u_cnt += interval;
37             setPDPParam(&rrd, i, PDP_unkn_sec_cnt, temp);
38         } else {
39             temp = getPDPParam(&rrd, i, PDP_val);
40             temp.u_val += pdp_new[i];
41             setPDPParam(&rrd, i, PDP_val, temp);
42         }
43           }
44
45
46