Basho Packages it's Riak Core for Distrubted App Developers
Join the DZone community and get the full member experience.Join For Free
The first feature in riak_core is the riak_core_node_watcher, which is responsible for checking the status of nodes within a riak_core cluster. It can also take a node out of the cluster programmatically when, for example, there's a short required outage and you don't want to stop the server software.
A riak_core cluster stores the global state in a ring structure and the state information is transferred in such a way that all members stay in sync. This is called "gossiping". riak_core_ring is the module that creates and manipulates the state data while riak_core_ring_manager manages the cluster ring for a node. riak_core_gossip manages the rings gossip.
A master/worker configuration is used on each node to manage work unit execution. riak_core also uses consistent hashing to determine target nodes for requests. The master process on each node farms out each request to worker processes called vnodes. riak_core_vnode_master routes requests to the vnodes as they run after starting up the worker vnodes on a given node. Finally, riak_core_vnode is an OTP behavior that wraps all the boilerplate logic required to implement a vnode.
riak_core is currently available on GitHub and is licensed under the Apache v2 license. Over the next few months Smith will blog about the process by which you can build a distributed graph database using riak_core.
Opinions expressed by DZone contributors are their own.