Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Basho Packages it's Riak Core for Distrubted App Developers

DZone's Guide to

Basho Packages it's Riak Core for Distrubted App Developers

· Database Zone ·
Free Resource

New whitepaper: Database DevOps – 6 Tips for Achieving Continuous Delivery. Discover 6 tips for continuous delivery with Database DevOps in this new whitepaper from Redgate. In 9 pages, it covers version control for databases and configurations, branching and testing, automation, using NuGet packages, and advice for how to start a pioneering Database DevOps project. Also includes further research on the industry-wide state of Database DevOps, how application and database development compare, plus practical steps for bringing DevOps to your database. Read it now free.

The developers at Basho Technologies recently decided to take a useful piece of the Riak codebase and refractor it into its own codebase for easier usage.  Riak is a NoSQL key-value store with the additional ability to put links between the things you store and perform MapReduce queries.  Kevin Smith, a senior developer on the Basho team, explained that this the useful piece was the riak_core, which is an OTP application that provides the services required to easily write distributed applications.

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. 

New whitepaper: Database DevOps – 6 Tips for Achieving Continuous Delivery. Discover 6 tips for continuous delivery with Database DevOps in this new whitepaper from Redgate. In 9 pages, it covers version control for databases and configurations, branching and testing, automation, using NuGet packages, and advice for how to start a pioneering Database DevOps project. Also includes further research on the industry-wide state of Database DevOps, how application and database development compare, plus practical steps for bringing DevOps to your database. Read it now free.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}