next up previous [pdf]

Next: Core API Up: Developers Previous: Developers

Core design

As previously mentioned, the main way for programs to communicate in Madagascar is through RSF files. Thus, Madagascar programs are expected to read RSF files, process them, and then write RSF files as outputs that can be then used in other RSF programs. At the highest level of abstraction, we can consider RSF programs as black boxes that simply input and output RSF files and do something to them in between. From a practical standpoint, your programs will first read RSF files from disk into memory (or progressively do so) as hypercubes. Once the file is read,the program processes the hypercubes using routines that you design or external libraries. After processing, you then write the hypercubes to RSF files on disk.

In pseudocode this process looks something like:

data = make_array()

input = rsf_input()

rsf_read(input,data) 

. . . process data . . .

output = rsf_output()

rsf_write(output,data)




2011-11-03