2. GPad
Born to be a developer with an interest in distributed system.
I develop using many languages like C++, C#, js and ruby. I had fallen in love with
functional programming, especially with elixir, erlang.
Twitter: https://twitter.com/gpad619
Github: https://github.com/gpad/
Medium: https://medium.com/@gpad
CTO & founder of coders51
3. Schedule
What is riak_core?
How to implement a simple distributed command
How to implement a command that involves all nodes
If we had more time, we would talk about:
What happens when I remove a node?
How to handle a node crash?
Conflict-resolution
http://github.com/gpad/no_slides
http://medium.com/@GPad/
4. What is riak_core?
From readme page on github:
Riak Core is the distributed systems framework that forms the basis of how Riak
distributes data and scales. More generally, it can be thought of as a toolkit for building
distributed, scalable, fault-tolerant applications.
5. What is riak_core?
DO
It manages the addition and removal of nodes
from the cluster
It manages how the requests should be routed
inside the cluster
It manages how to upgrade cluster having
nodes with various capabilities
It manages information cluster-wide
etc ...
DON’T
It doesn’t help to store data
It isn’t DB centric
It doesn’t care what type of data do you use
(more or less)
It’ doesn’t care what type of computation you
do ...
etc ...
6. How does a riak_core cluster work?
Every node is equivalent (masterless)
Any client can connect to any node of the cluster
The node executes the work or forwards it to correct node
Consistent Hashing / VNode
31. What we have done...
Create an in-memory KV store that:
Can be used from every nodes
Can execute a command on a specific node
Can execute a command on the entire cluster
32. What we have done...
Main concepts:
Consistent hashing
Virtual Node vs Physical Node
Preference List
33. What we have done...
Next concepts:
Handoff - Manage the addition and removal of nodes
Manage the crash of a node through replications
How to use conflict-resolution strategy
http://github.com/gpad/no_slides
http://medium.com/@GPad/