Magma FS - Flare System

The internal engine of Magma is called flare system and is implemented as a layered stack.

Flare system layers
1. Public API: flare_system_init, magma_open, magma_mknod, magma_lstat, ...
2. Lava network: magma_new_node, route_key, join_network
3. Flare objects: magma_new_flare, magma_search_or_create, magma_add_to_cache, ...

magma_mkdir can be used as an example of layer traversing. In this paragraph will be assumed that a directory called /example will be created. magma_mkdir is part of Public API layer. It is used to create a new directory, as done by standard Libc counterpart mkdir.

magma_mkdir first route the request to decide if it can be locally managed or will require network operations. To perform routing, path /example is translated in corresponding SHA1 hash key 81f762fd59d88768b06b8e9de56aef8a95962045. If routing determines the need to contact another vulcano node, request will not leave this layer. Lava network layer will forward the request to node owning the key, continuing the flow of operations on remote node. Routing is half the role of Lava network layer, which also includes network monitoring and vulcano nodes creation, update and removal.

Both being a local or a remote request, the last step is performed by Flare layer. Flare corresponding to key 81f762fd59d88768b06b8e9de56aef8a95962045 will be searched inside the cache. If not found, it will be created and loaded from disk, if already existing. On resulting flare object are first applied permission checking tests. If permission to operate is granted, initial request is fulfilled: in this example, flare is cast to directory if it wasn't already and is saved to disk.

Read more about this topic:  Magma FS

Famous quotes containing the words flare and/or system:

    still I’m ready to believe perhaps
    some lives
    tremble and flare up there, four blocks away ...
    Denise Levertov (b. 1923)

    A heresy can spring only from a system that is in full vigor.
    Eric Hoffer (1902–1983)