-news-
Documentation effort magma 0.0.20070911 released magma 0.0.20070829 released magma 0.0.20070806 released on SVN All the news
NEWS :: magma v.0.0.20070829 released on SVN and download area
Big rewriting of the flare system occurred, since a better and more rational interface was needed.
Previous interface assumed that, to work with magma contents,
programmers should face directly flare internals. That's crazy!
If a programmer want to code a function that read n bytes
from a file, (s)he expect to use something similar to
read(filename, offset, size, buffer). She or he will
find absurd to have to cast a new flare, read contents from inside
flare structure and perform some extra checks.
The solution was to rethink the whole flare system interface. That's how:
- Old
magma_flare.hbecamemagma_flare_internals.h, no longer exported viamagma.hand no longer needed to work with the flare system. - A new
magma_flare.hwas written to offer better interface. New exported functions mimic libc functions behaviour. As you havemknod(),open()andchmod()in libc, you'll findmagma_mknod(),magma_open()andmagma_chmod()to work with flares. - As a thumb rule, functions exported by
magma_flare.haccept as first and second parameters auid_tand agid_tvalues describing the user that originated the request. These values are used to perform permission checking by underlying flare system. If a function does not expect these parameters, likemagma_readdir()does, that's because they are already saved in some data structure passed to the function, like inmagma_DIR_tstructure. - Routing issues are totally transparent to users and programmers. If you need access to a flare, just name it. Flare system will find it, will contact owner node, will perform network operations if needed and will finally return you the answer you asked.
- More external symbols where moved inside flare system. That lead
to a shortening of
magma.ccode. To initialize flare system, two calls are now needed:magma_config_myself()used to transfer command line arguments that describe the vulcano node inside an internalmagma_node_tstructure calledmyself.flare_system_init()used to bootstrap the lava ring (or join an existing one), to create/.dht/directory to store DHT status, to start the balancer and the garbage collector threads and to perform some other setup operations.
- Some files where merged inside
magma_flare_internals.csince having separate source files with one or two functions was meaningless. - A special case of previous point is
dir_ops.c. Externally exposable functions, likemagma_opendir()was moved insidemagma_flare.h, while internal ones likemagma_get_slot()was merged withmagma_flare_internals.h. - A network event loop called
magma_network_loop()was also provided. It's the third step in creating a fully featured magma application, after callingmagma_config_myself()andflare_system_init().
This file last modified Wednesday, 03-Oct-2007 11:10:42 CEST
