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:
magma_flare_internals.h, no longer exported via
magma.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 have
chmod()in libc, you'll find
magma_chmod()to work with flares.
- As a thumb rule, functions exported by
magma_flare.haccept as first and second parameters a
gid_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, like
magma_readdir()does, that's because they are already saved in some data structure passed to the function, like in
- 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 internal
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, like
magma_opendir()was moved inside
magma_flare.h, while internal ones like
magma_get_slot()was merged with
- A network event loop called
magma_network_loop()was also provided. It's the third step in creating a fully featured magma application, after calling