SlideShare uma empresa Scribd logo
1 de 52
Baixar para ler offline
Rusty Klophaus (@rklophaus)
BashoTechnologies
Masterless Distributed
Computing with Riak Core
Erlang User Conference
Stockholm, Sweden · November 2010
Monday, November 22, 2010
BashoTechnologies
2
About BashoTechnologies
• Offices in:
• Cambridge, Massachusetts
• San Francisco, California
• Distributed company
• ~20 people
• Riak KV and Riak Search (both Open Source)
• SLA-based Support and Enterprise Software ($)
• Other Open Source Erlang developed by Basho:
• Webmachine, Rebar, Bitcask, Erlang_JS, Basho Bench
Monday, November 22, 2010
Riak KV and Riak Search
3
Riak KV
Key/Value Datastore
Map/Reduce, Lightweight Data Relations, Client APIs
Riak Search
Full-text search and indexing engine
Near Realtime Indexing, Riak KV Integration, Solr Support.
Common Properties
Both are distributed, scalable, failure-tolerant applications.
Both based on Amazon’s Dynamo Architecture.
Monday, November 22, 2010
Riak
KV
Riak
Search
Riak
Core
The Common Parts are called Riak Core
Monday, November 22, 2010
Riak
KV
Riak
Search
Riak
Core
The Common Parts are called Riak Core
Distribution / Scaling /
Failure-Tolerance Code
Monday, November 22, 2010
Riak Core is an
Open Source Erlang library
that helps you build
distributed, scalable, failure-tolerant
applications using a
Dynamo-style architecture.
6
Monday, November 22, 2010
“We Generalized the
Dynamo Architecture and
Open-Sourced the Bits.”
7
Monday, November 22, 2010
What Areas are Covered?
Amazon’s Dynamo Paper highlighted to
show parts covered in Riak Core.
Monday, November 22, 2010
Distributed, scalable, failure-tolerant.
9
Monday, November 22, 2010
Distributed, scalable, failure-tolerant.
No central coordinator.
Easy to setup/operate.
10
Monday, November 22, 2010
Distributed, scalable, failure-tolerant.
Horizontally scalable;
add commodity hardware
to get more X.
11
Monday, November 22, 2010
Distributed, scalable, failure-tolerant.
Always available.
No single point of failure.
Self-healing.
12
Monday, November 22, 2010
Wait, doesn’t *Erlang* let you build
distributed, scalable, failure-tolerant
applications?
13
Monday, November 22, 2010
Client
Service A Service B
Resource D
Service C
Queue E
Erlang makes it easy to connect the
components of your application.
Monday, November 22, 2010
Service
Node A
Node E
Node I
Node M
Node B
Node F
Node J
Node N
Node C
Node G
Node K
Node O
Node D
Node H
Node L
. . .
Riak Core helps you build a service that
harnesses the power of many nodes.
Monday, November 22, 2010
How does Riak Core work?
16
Monday, November 22, 2010
A Simple Interface...
Command ObjectName, Payload
Send commands, get responses.
How do we route the commands
to physical machines?
Monday, November 22, 2010
Hash the Object Name
Command ObjectName, Payload
SHA1(ObjName), Payload
0 to 2^160
Monday, November 22, 2010
A Naive Approach
Command ObjectName, Payload
SHA1(ObjName), Payload
Node A Node B Node C Node D
Monday, November 22, 2010
A Naive Approach
Command
SHA1(ObjName), Payload
Node A Node B Node C Node D Node E
ObjectName, Payload
Existing routes become invalid
when you add/remove nodes.
Monday, November 22, 2010
"All problems in computer
science can be solved by
another level of indirection."
- David Wheeler
21
Monday, November 22, 2010
Routing with Consistent Hashing
Command ObjectName, Payload
SHA1(ObjName), Payload
VNode 0 VNode 1 VNode 2 VNode 3 VNode 4 VNode 5 VNode 6 VNode 7
Node A Node B Node C Node D
Monday, November 22, 2010
Adding a Node
Command ObjectName, Payload
SHA1(ObjName), Payload
VNode 0 VNode 1 VNode 2 VNode 3 VNode 4 VNode 5 VNode 6 VNode 7
Node A Node B Node C Node D Node E
Monday, November 22, 2010
Removing a Node
Command ObjectName, Payload
SHA1(ObjName), Payload
VNode 0 VNode 1 VNode 2 VNode 3 VNode 4 VNode 5 VNode 6 VNode 7
Node A Node B Node C Node D Node E
Monday, November 22, 2010
The Ring
Hash Location
Monday, November 22, 2010
Writing Replicas (NValue)
Locations when N=3
Monday, November 22, 2010
Routing Around Failures
Locations when N=3
and node 0 is down.
X
Monday, November 22, 2010
The Preflist
Preflist
Monday, November 22, 2010
Location of the Routing Layer
29
Monday, November 22, 2010
Router in the Middle Leads to SPOF
Client Client Client
Router
VNode
0
Node A Node B Node C Node D Node E
VNode
1
VNode
3
VNode
4
VNode
2
VNode
5
VNode
6
VNode
7
Monday, November 22, 2010
Riak Core - Router on Each Node
Client Client Client
Router Router Router RouterRouter
VNode
0
Node A Node B Node C Node D Node E
VNode
1
VNode
3
VNode
4
VNode
2
VNode
5
VNode
6
VNode
7
Monday, November 22, 2010
Eventually - Router in the Client
Client Client Client
VNode
0
Node A Node B Node C Node D Node E
VNode
1
VNode
3
VNode
4
VNode
2
VNode
5
VNode
6
VNode
7
Router RouterRouter
Why isn’t this done yet?
Time and complexity.
Monday, November 22, 2010
How DoThe Routers Reach Agreement?
Router Router Router RouterRouter
VNode
0
Node A Node B Node C Node D Node E
VNode
1
VNode
3
VNode
4
VNode
2
VNode
5
VNode
6
VNode
7
Monday, November 22, 2010
The Nodes GossipTheir WorldView
Local
Ring State
Incoming
Ring State
Are rings equivalent?
Strictly descendent?
Or different?
Monday, November 22, 2010
Not Mentioned
Vector Clocks
MerkleTrees
Bloom Filters
35
Monday, November 22, 2010
Building an Application
with Riak Core
36
Monday, November 22, 2010
Building an Application on Riak Core?
Two things to think about:
37
The Command Set
Command = ObjectName, Payload
The commands/requests/operations that you will send
through the system.
TheVNode Module
The callback module that will receive the commands.
Monday, November 22, 2010
Writing aVNode Module
38
Startup/Shutdown
init([Partition]) ->
{ok, State}
terminate(State) ->
ok
Receive Incoming Commands
handle_command(Cmd, Sender, State) ->
{noreply, State1} | {reply, Reply, State1}
handle_handoff_command(Cmd, Sender, State) ->
{noreply, State1} | {reply, ok, State1}
Monday, November 22, 2010
Writing aVNode Module
39
Send and Receive Handoff Data
handoff_starting(Node, State) ->
{Bool, State1}
encode_handoff_data(Data, State) ->
<<Binary>>.
handle_handoff_data(Data, Sender, State) ->
{reply, ok, State1}
handoff_finished(Node, State) ->
{ok, State1}
Monday, November 22, 2010
Start the riak_core application
riak_core
riak_core_vnode_sup riak_core_handoff_*
riak_core_ring_*
riak_core_node_*
riak_core_gossip_*
X_vnode
. . .
X_vnode
X_vnode
40
application:start(riak_core).
Monday, November 22, 2010
Start the riak_core application
riak_core
riak_core_vnode_sup riak_core_handoff_*
riak_core_ring_*
riak_core_node_*
riak_core_gossip_*
X_vnode
. . .
X_vnode
X_vnode
41
Supervise vnode processes.
Monday, November 22, 2010
Start the riak_core application
riak_core
riak_core_vnode_sup riak_core_handoff_*
riak_core_ring_*
riak_core_node_*
riak_core_gossip_*
X_vnode
. . .
X_vnode
X_vnode
42
Start, coordinate, and supervise handoff.
Monday, November 22, 2010
Start the riak_core application
riak_core
riak_core_vnode_sup riak_core_handoff_*
riak_core_ring_*
riak_core_node_*
riak_core_gossip_*
X_vnode
. . .
X_vnode
X_vnode
43
Maintain cluster membership information.
Monday, November 22, 2010
Start the riak_core application
riak_core
riak_core_vnode_sup riak_core_handoff_*
riak_core_ring_*
riak_core_node_*
riak_core_gossip_*
X_vnode
. . .
X_vnode
X_vnode
44
Monitor node liveness,
broadcast to registered modules.
Monday, November 22, 2010
Start the riak_core application
riak_core
riak_core_vnode_sup riak_core_handoff_*
riak_core_ring_*
riak_core_node_*
riak_core_gossip_*
X_vnode
. . .
X_vnode
X_vnode
45
Send ring information to other nodes.
Reconcile different views of the cluster.
Rebalance cluster when nodes join or leave.
Monday, November 22, 2010
In your application...
riak_core
riak_core_vnode_sup riak_core_handoff_*
riak_core_ring_*
riak_core_node_*
riak_core_gossip_*
X_vnode
. . .
X_vnode
X_vnode
46
Start the vnodes for your application.
Master = {
riak_X_vnode_master, {
riak_core_vnode_master, start_link, [riak_X_vnode]
},
permanent, 5000, worker, [riak_core_vnode_master]
},
{ok, { {one_for_one, 5, 10}, [Master]} }.
Monday, November 22, 2010
In your application...
riak_core
riak_core_vnode_sup riak_core_handoff_*
riak_core_ring_*
riak_core_node_*
riak_core_gossip_*
X_vnode
. . .
X_vnode
X_vnode
47
Tell riak_core that your application
is ready to receive requests.
riak_core:register_vnode_module(riak_X_vnode),
riak_core_node_watcher:service_up(riak_X,
self())
Monday, November 22, 2010
In your application...
riak_core
riak_core_vnode_sup riak_core_handoff_*
riak_core_ring_*
riak_core_node_*
riak_core_gossip_*
X_vnode
. . .
X_vnode
X_vnode
riak_core
riak_core_vnode_sup riak_core_handoff_*
riak_core_ring_*
riak_core_node_*
riak_core_gossip_*
X_vnode
. . .
X_vnode
X_vnode
48
Join to an existing node in the cluster.
riak_core_gossip:send_ring(ClusterNode,
node())
Monday, November 22, 2010
Start Sending Commands
49
# Figure out the preflist...
{_Verb, ObjName, _Payload} = Command,
PrefList = riak_core_apl:get_apl(ObjName,
NVal,
riak_X),
# Send the command...
riak_core_vnode_master:command(PrefList,
Command,
riak_X_vnode_master)
Monday, November 22, 2010
Review
Riak KV
Open Source Key/Value datastore.
Riak Search
Full-text, near real-time search engine based on Riak Core.
Riak Core
Open Source Erlang library that helps you build distributed,
scalable, failure-tolerant applications using a Dynamo-style
architecture.
50
Monday, November 22, 2010
Thanks! Questions?
Learn More
http://wiki.basho.com
Read Amazon’s Dynamo Paper
Get the Code
http://github.com/basho/riak_core
Get inTouch
rusty@basho.com on Email
@rklophaus onTwitter
51
Monday, November 22, 2010
END
Monday, November 22, 2010

Mais conteúdo relacionado

Mais procurados

Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Devang Garach
 
Verilator勉強会 2021/05/29
Verilator勉強会 2021/05/29Verilator勉強会 2021/05/29
Verilator勉強会 2021/05/29ryuz88
 
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
Reactive Card Magic: Understanding Spring WebFlux and Project ReactorReactive Card Magic: Understanding Spring WebFlux and Project Reactor
Reactive Card Magic: Understanding Spring WebFlux and Project ReactorVMware Tanzu
 
U-SQL Query Execution and Performance Tuning
U-SQL Query Execution and Performance TuningU-SQL Query Execution and Performance Tuning
U-SQL Query Execution and Performance TuningMichael Rys
 
Being Functional on Reactive Streams with Spring Reactor
Being Functional on Reactive Streams with Spring ReactorBeing Functional on Reactive Streams with Spring Reactor
Being Functional on Reactive Streams with Spring ReactorMax Huang
 
関数型っぽくROSロボットプログラミング
関数型っぽくROSロボットプログラミング関数型っぽくROSロボットプログラミング
関数型っぽくROSロボットプログラミングHideki Takase
 
Implementing a JavaScript Engine
Implementing a JavaScript EngineImplementing a JavaScript Engine
Implementing a JavaScript EngineKris Mok
 
Introduction to Reactive programming
Introduction to Reactive programmingIntroduction to Reactive programming
Introduction to Reactive programmingDwi Randy Herdinanto
 
トピックブランチとは
トピックブランチとはトピックブランチとは
トピックブランチとはnakajima_yuji
 
Node.jsで使えるファイルDB"NeDB"のススメ
Node.jsで使えるファイルDB"NeDB"のススメNode.jsで使えるファイルDB"NeDB"のススメ
Node.jsで使えるファイルDB"NeDB"のススメIsamu Suzuki
 
Reactive Extensionsで非同期処理を簡単に
Reactive Extensionsで非同期処理を簡単にReactive Extensionsで非同期処理を簡単に
Reactive Extensionsで非同期処理を簡単にYoshifumi Kawai
 
サイボウズのフロントエンド開発 現在とこれからの挑戦
サイボウズのフロントエンド開発 現在とこれからの挑戦サイボウズのフロントエンド開発 現在とこれからの挑戦
サイボウズのフロントエンド開発 現在とこれからの挑戦Teppei Sato
 
プログラミング言語Clojureのニャンパスでの活用事例
プログラミング言語Clojureのニャンパスでの活用事例プログラミング言語Clojureのニャンパスでの活用事例
プログラミング言語Clojureのニャンパスでの活用事例sohta
 
C#の強み、或いは何故PHPから乗り換えるのか
C#の強み、或いは何故PHPから乗り換えるのかC#の強み、或いは何故PHPから乗り換えるのか
C#の強み、或いは何故PHPから乗り換えるのかYoshifumi Kawai
 
Using Recursive Common Table Expressions with Ecto
Using Recursive Common Table Expressions with EctoUsing Recursive Common Table Expressions with Ecto
Using Recursive Common Table Expressions with EctoMaarten van Vliet
 
Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced JavascriptDhruvin Shah
 
プロダクトに 1 から Vue.js を導入した話
プロダクトに 1 から Vue.js を導入した話プロダクトに 1 から Vue.js を導入した話
プロダクトに 1 から Vue.js を導入した話Shohei Okada
 

Mais procurados (20)

Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7Fundamental of Node.JS - Internship Presentation - Week7
Fundamental of Node.JS - Internship Presentation - Week7
 
Verilator勉強会 2021/05/29
Verilator勉強会 2021/05/29Verilator勉強会 2021/05/29
Verilator勉強会 2021/05/29
 
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
Reactive Card Magic: Understanding Spring WebFlux and Project ReactorReactive Card Magic: Understanding Spring WebFlux and Project Reactor
Reactive Card Magic: Understanding Spring WebFlux and Project Reactor
 
U-SQL Query Execution and Performance Tuning
U-SQL Query Execution and Performance TuningU-SQL Query Execution and Performance Tuning
U-SQL Query Execution and Performance Tuning
 
Being Functional on Reactive Streams with Spring Reactor
Being Functional on Reactive Streams with Spring ReactorBeing Functional on Reactive Streams with Spring Reactor
Being Functional on Reactive Streams with Spring Reactor
 
関数型っぽくROSロボットプログラミング
関数型っぽくROSロボットプログラミング関数型っぽくROSロボットプログラミング
関数型っぽくROSロボットプログラミング
 
Implementing a JavaScript Engine
Implementing a JavaScript EngineImplementing a JavaScript Engine
Implementing a JavaScript Engine
 
Introduction to Reactive programming
Introduction to Reactive programmingIntroduction to Reactive programming
Introduction to Reactive programming
 
PHPにおけるI/O多重化とyield
PHPにおけるI/O多重化とyieldPHPにおけるI/O多重化とyield
PHPにおけるI/O多重化とyield
 
Swagger
SwaggerSwagger
Swagger
 
トピックブランチとは
トピックブランチとはトピックブランチとは
トピックブランチとは
 
Node.jsで使えるファイルDB"NeDB"のススメ
Node.jsで使えるファイルDB"NeDB"のススメNode.jsで使えるファイルDB"NeDB"のススメ
Node.jsで使えるファイルDB"NeDB"のススメ
 
Reactive Extensionsで非同期処理を簡単に
Reactive Extensionsで非同期処理を簡単にReactive Extensionsで非同期処理を簡単に
Reactive Extensionsで非同期処理を簡単に
 
サイボウズのフロントエンド開発 現在とこれからの挑戦
サイボウズのフロントエンド開発 現在とこれからの挑戦サイボウズのフロントエンド開発 現在とこれからの挑戦
サイボウズのフロントエンド開発 現在とこれからの挑戦
 
プログラミング言語Clojureのニャンパスでの活用事例
プログラミング言語Clojureのニャンパスでの活用事例プログラミング言語Clojureのニャンパスでの活用事例
プログラミング言語Clojureのニャンパスでの活用事例
 
C#の強み、或いは何故PHPから乗り換えるのか
C#の強み、或いは何故PHPから乗り換えるのかC#の強み、或いは何故PHPから乗り換えるのか
C#の強み、或いは何故PHPから乗り換えるのか
 
Redux Thunk
Redux ThunkRedux Thunk
Redux Thunk
 
Using Recursive Common Table Expressions with Ecto
Using Recursive Common Table Expressions with EctoUsing Recursive Common Table Expressions with Ecto
Using Recursive Common Table Expressions with Ecto
 
Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced Javascript
 
プロダクトに 1 から Vue.js を導入した話
プロダクトに 1 から Vue.js を導入した話プロダクトに 1 から Vue.js を導入した話
プロダクトに 1 から Vue.js を導入した話
 

Semelhante a Masterless Distributed Computing with Riak Core - EUC 2010

Nanog75, Network Device Property as Code
Nanog75, Network Device Property as CodeNanog75, Network Device Property as Code
Nanog75, Network Device Property as CodeDamien Garros
 
Atom The Redis Streams-Powered Microservices SDK: Dan Pipemazo
Atom The Redis Streams-Powered Microservices SDK: Dan PipemazoAtom The Redis Streams-Powered Microservices SDK: Dan Pipemazo
Atom The Redis Streams-Powered Microservices SDK: Dan PipemazoRedis Labs
 
Let's build a robot with ROS - Internet of Things, Hardware & Robotics meetup...
Let's build a robot with ROS - Internet of Things, Hardware & Robotics meetup...Let's build a robot with ROS - Internet of Things, Hardware & Robotics meetup...
Let's build a robot with ROS - Internet of Things, Hardware & Robotics meetup...Marcin Bielak
 
SDNs: hot topics, evolution & research opportunities
SDNs: hot topics, evolution & research opportunitiesSDNs: hot topics, evolution & research opportunities
SDNs: hot topics, evolution & research opportunitiesDiego Kreutz
 
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTStéphanie Roger
 
OpenStack cloud for ConoHa, Z.com and GMO AppsCloud in okinawa opendays 2015 ...
OpenStack cloud for ConoHa, Z.com and GMO AppsCloud in okinawa opendays 2015 ...OpenStack cloud for ConoHa, Z.com and GMO AppsCloud in okinawa opendays 2015 ...
OpenStack cloud for ConoHa, Z.com and GMO AppsCloud in okinawa opendays 2015 ...Naoto Gohko
 
Banog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as codeBanog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as codeDamien Garros
 
Knot.x: when Vert.x and RxJava meet
Knot.x: when Vert.x and RxJava meetKnot.x: when Vert.x and RxJava meet
Knot.x: when Vert.x and RxJava meetTomasz Michalak
 
OpenDaylight Netvirt and Neutron - Mike Kolesnik, Josh Hershberg - OpenStack ...
OpenDaylight Netvirt and Neutron - Mike Kolesnik, Josh Hershberg - OpenStack ...OpenDaylight Netvirt and Neutron - Mike Kolesnik, Josh Hershberg - OpenStack ...
OpenDaylight Netvirt and Neutron - Mike Kolesnik, Josh Hershberg - OpenStack ...Cloud Native Day Tel Aviv
 
Mirantis OpenStack-DC-Meetup 17 Sept 2014
Mirantis OpenStack-DC-Meetup 17 Sept 2014Mirantis OpenStack-DC-Meetup 17 Sept 2014
Mirantis OpenStack-DC-Meetup 17 Sept 2014Mirantis
 
Where are yours vertexes and what are they talking about?
Where are yours vertexes and what are they talking about?Where are yours vertexes and what are they talking about?
Where are yours vertexes and what are they talking about?Roberto Franchini
 
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」Sho Shimizu
 
Considerations for using NoSQL technology on your next IT project - Akmal Cha...
Considerations for using NoSQL technology on your next IT project - Akmal Cha...Considerations for using NoSQL technology on your next IT project - Akmal Cha...
Considerations for using NoSQL technology on your next IT project - Akmal Cha...BCS Data Management Specialist Group
 
Why we need internet of things on Node.js
Why we need internet of things on Node.jsWhy we need internet of things on Node.js
Why we need internet of things on Node.jsIndeema Software Inc.
 
Know Your Competitor - Oracle 10g Express Edition
Know Your Competitor - Oracle 10g Express EditionKnow Your Competitor - Oracle 10g Express Edition
Know Your Competitor - Oracle 10g Express EditionRonald Bradford
 
Red Hat OpenStack - Open Cloud Infrastructure
Red Hat OpenStack - Open Cloud InfrastructureRed Hat OpenStack - Open Cloud Infrastructure
Red Hat OpenStack - Open Cloud InfrastructureAlex Baretto
 
Webinar about Spring Data Neo4j 4
Webinar about Spring Data Neo4j 4Webinar about Spring Data Neo4j 4
Webinar about Spring Data Neo4j 4GraphAware
 

Semelhante a Masterless Distributed Computing with Riak Core - EUC 2010 (20)

Nanog75, Network Device Property as Code
Nanog75, Network Device Property as CodeNanog75, Network Device Property as Code
Nanog75, Network Device Property as Code
 
Atom The Redis Streams-Powered Microservices SDK: Dan Pipemazo
Atom The Redis Streams-Powered Microservices SDK: Dan PipemazoAtom The Redis Streams-Powered Microservices SDK: Dan Pipemazo
Atom The Redis Streams-Powered Microservices SDK: Dan Pipemazo
 
Let's build a robot with ROS - Internet of Things, Hardware & Robotics meetup...
Let's build a robot with ROS - Internet of Things, Hardware & Robotics meetup...Let's build a robot with ROS - Internet of Things, Hardware & Robotics meetup...
Let's build a robot with ROS - Internet of Things, Hardware & Robotics meetup...
 
SDNs: hot topics, evolution & research opportunities
SDNs: hot topics, evolution & research opportunitiesSDNs: hot topics, evolution & research opportunities
SDNs: hot topics, evolution & research opportunities
 
Networking in Openstack - Neutron 101
Networking in Openstack - Neutron 101Networking in Openstack - Neutron 101
Networking in Openstack - Neutron 101
 
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoTInria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
Inria Tech Talk : RIOT, l'OS libre pour vos objets connectés #IoT
 
OpenStack cloud for ConoHa, Z.com and GMO AppsCloud in okinawa opendays 2015 ...
OpenStack cloud for ConoHa, Z.com and GMO AppsCloud in okinawa opendays 2015 ...OpenStack cloud for ConoHa, Z.com and GMO AppsCloud in okinawa opendays 2015 ...
OpenStack cloud for ConoHa, Z.com and GMO AppsCloud in okinawa opendays 2015 ...
 
Banog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as codeBanog meetup August 30th, network device property as code
Banog meetup August 30th, network device property as code
 
Knot.x: when Vert.x and RxJava meet
Knot.x: when Vert.x and RxJava meetKnot.x: when Vert.x and RxJava meet
Knot.x: when Vert.x and RxJava meet
 
OpenDaylight Netvirt and Neutron - Mike Kolesnik, Josh Hershberg - OpenStack ...
OpenDaylight Netvirt and Neutron - Mike Kolesnik, Josh Hershberg - OpenStack ...OpenDaylight Netvirt and Neutron - Mike Kolesnik, Josh Hershberg - OpenStack ...
OpenDaylight Netvirt and Neutron - Mike Kolesnik, Josh Hershberg - OpenStack ...
 
Mirantis OpenStack-DC-Meetup 17 Sept 2014
Mirantis OpenStack-DC-Meetup 17 Sept 2014Mirantis OpenStack-DC-Meetup 17 Sept 2014
Mirantis OpenStack-DC-Meetup 17 Sept 2014
 
Where are yours vertexes and what are they talking about?
Where are yours vertexes and what are they talking about?Where are yours vertexes and what are they talking about?
Where are yours vertexes and what are they talking about?
 
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」
Openflow勉強会 「OpenFlowコントローラを取り巻く状況とその実装」
 
Considerations for using NoSQL technology on your next IT project - Akmal Cha...
Considerations for using NoSQL technology on your next IT project - Akmal Cha...Considerations for using NoSQL technology on your next IT project - Akmal Cha...
Considerations for using NoSQL technology on your next IT project - Akmal Cha...
 
Why we need internet of things on Node.js
Why we need internet of things on Node.jsWhy we need internet of things on Node.js
Why we need internet of things on Node.js
 
NoSQL Introduction
NoSQL IntroductionNoSQL Introduction
NoSQL Introduction
 
NoSQL Introduction
NoSQL IntroductionNoSQL Introduction
NoSQL Introduction
 
Know Your Competitor - Oracle 10g Express Edition
Know Your Competitor - Oracle 10g Express EditionKnow Your Competitor - Oracle 10g Express Edition
Know Your Competitor - Oracle 10g Express Edition
 
Red Hat OpenStack - Open Cloud Infrastructure
Red Hat OpenStack - Open Cloud InfrastructureRed Hat OpenStack - Open Cloud Infrastructure
Red Hat OpenStack - Open Cloud Infrastructure
 
Webinar about Spring Data Neo4j 4
Webinar about Spring Data Neo4j 4Webinar about Spring Data Neo4j 4
Webinar about Spring Data Neo4j 4
 

Mais de Rusty Klophaus

Everybody Polyglot! - Cross-Language RPC with Erlang
Everybody Polyglot! - Cross-Language RPC with ErlangEverybody Polyglot! - Cross-Language RPC with Erlang
Everybody Polyglot! - Cross-Language RPC with ErlangRusty Klophaus
 
Winning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test CycleWinning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test CycleRusty Klophaus
 
Querying Riak Just Got Easier - Introducing Secondary Indices
Querying Riak Just Got Easier - Introducing Secondary IndicesQuerying Riak Just Got Easier - Introducing Secondary Indices
Querying Riak Just Got Easier - Introducing Secondary IndicesRusty Klophaus
 
Riak - From Small to Large - StrangeLoop
Riak - From Small to Large - StrangeLoopRiak - From Small to Large - StrangeLoop
Riak - From Small to Large - StrangeLoopRusty Klophaus
 
Riak - From Small to Large
Riak - From Small to LargeRiak - From Small to Large
Riak - From Small to LargeRusty Klophaus
 
Riak Core: Building Distributed Applications Without Shared State
Riak Core: Building Distributed Applications Without Shared StateRiak Core: Building Distributed Applications Without Shared State
Riak Core: Building Distributed Applications Without Shared StateRusty Klophaus
 
Riak Search - Erlang Factory London 2010
Riak Search - Erlang Factory London 2010Riak Search - Erlang Factory London 2010
Riak Search - Erlang Factory London 2010Rusty Klophaus
 
Riak Search - Berlin Buzzwords 2010
Riak Search - Berlin Buzzwords 2010Riak Search - Berlin Buzzwords 2010
Riak Search - Berlin Buzzwords 2010Rusty Klophaus
 
Riak from Small to Large
Riak from Small to LargeRiak from Small to Large
Riak from Small to LargeRusty Klophaus
 
Getting Started with Riak - NoSQL Live 2010 - Boston
Getting Started with Riak - NoSQL Live 2010 - BostonGetting Started with Riak - NoSQL Live 2010 - Boston
Getting Started with Riak - NoSQL Live 2010 - BostonRusty Klophaus
 

Mais de Rusty Klophaus (10)

Everybody Polyglot! - Cross-Language RPC with Erlang
Everybody Polyglot! - Cross-Language RPC with ErlangEverybody Polyglot! - Cross-Language RPC with Erlang
Everybody Polyglot! - Cross-Language RPC with Erlang
 
Winning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test CycleWinning the Erlang Edit•Build•Test Cycle
Winning the Erlang Edit•Build•Test Cycle
 
Querying Riak Just Got Easier - Introducing Secondary Indices
Querying Riak Just Got Easier - Introducing Secondary IndicesQuerying Riak Just Got Easier - Introducing Secondary Indices
Querying Riak Just Got Easier - Introducing Secondary Indices
 
Riak - From Small to Large - StrangeLoop
Riak - From Small to Large - StrangeLoopRiak - From Small to Large - StrangeLoop
Riak - From Small to Large - StrangeLoop
 
Riak - From Small to Large
Riak - From Small to LargeRiak - From Small to Large
Riak - From Small to Large
 
Riak Core: Building Distributed Applications Without Shared State
Riak Core: Building Distributed Applications Without Shared StateRiak Core: Building Distributed Applications Without Shared State
Riak Core: Building Distributed Applications Without Shared State
 
Riak Search - Erlang Factory London 2010
Riak Search - Erlang Factory London 2010Riak Search - Erlang Factory London 2010
Riak Search - Erlang Factory London 2010
 
Riak Search - Berlin Buzzwords 2010
Riak Search - Berlin Buzzwords 2010Riak Search - Berlin Buzzwords 2010
Riak Search - Berlin Buzzwords 2010
 
Riak from Small to Large
Riak from Small to LargeRiak from Small to Large
Riak from Small to Large
 
Getting Started with Riak - NoSQL Live 2010 - Boston
Getting Started with Riak - NoSQL Live 2010 - BostonGetting Started with Riak - NoSQL Live 2010 - Boston
Getting Started with Riak - NoSQL Live 2010 - Boston
 

Último

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Último (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Masterless Distributed Computing with Riak Core - EUC 2010

  • 1. Rusty Klophaus (@rklophaus) BashoTechnologies Masterless Distributed Computing with Riak Core Erlang User Conference Stockholm, Sweden · November 2010 Monday, November 22, 2010
  • 2. BashoTechnologies 2 About BashoTechnologies • Offices in: • Cambridge, Massachusetts • San Francisco, California • Distributed company • ~20 people • Riak KV and Riak Search (both Open Source) • SLA-based Support and Enterprise Software ($) • Other Open Source Erlang developed by Basho: • Webmachine, Rebar, Bitcask, Erlang_JS, Basho Bench Monday, November 22, 2010
  • 3. Riak KV and Riak Search 3 Riak KV Key/Value Datastore Map/Reduce, Lightweight Data Relations, Client APIs Riak Search Full-text search and indexing engine Near Realtime Indexing, Riak KV Integration, Solr Support. Common Properties Both are distributed, scalable, failure-tolerant applications. Both based on Amazon’s Dynamo Architecture. Monday, November 22, 2010
  • 4. Riak KV Riak Search Riak Core The Common Parts are called Riak Core Monday, November 22, 2010
  • 5. Riak KV Riak Search Riak Core The Common Parts are called Riak Core Distribution / Scaling / Failure-Tolerance Code Monday, November 22, 2010
  • 6. Riak Core is an Open Source Erlang library that helps you build distributed, scalable, failure-tolerant applications using a Dynamo-style architecture. 6 Monday, November 22, 2010
  • 7. “We Generalized the Dynamo Architecture and Open-Sourced the Bits.” 7 Monday, November 22, 2010
  • 8. What Areas are Covered? Amazon’s Dynamo Paper highlighted to show parts covered in Riak Core. Monday, November 22, 2010
  • 10. Distributed, scalable, failure-tolerant. No central coordinator. Easy to setup/operate. 10 Monday, November 22, 2010
  • 11. Distributed, scalable, failure-tolerant. Horizontally scalable; add commodity hardware to get more X. 11 Monday, November 22, 2010
  • 12. Distributed, scalable, failure-tolerant. Always available. No single point of failure. Self-healing. 12 Monday, November 22, 2010
  • 13. Wait, doesn’t *Erlang* let you build distributed, scalable, failure-tolerant applications? 13 Monday, November 22, 2010
  • 14. Client Service A Service B Resource D Service C Queue E Erlang makes it easy to connect the components of your application. Monday, November 22, 2010
  • 15. Service Node A Node E Node I Node M Node B Node F Node J Node N Node C Node G Node K Node O Node D Node H Node L . . . Riak Core helps you build a service that harnesses the power of many nodes. Monday, November 22, 2010
  • 16. How does Riak Core work? 16 Monday, November 22, 2010
  • 17. A Simple Interface... Command ObjectName, Payload Send commands, get responses. How do we route the commands to physical machines? Monday, November 22, 2010
  • 18. Hash the Object Name Command ObjectName, Payload SHA1(ObjName), Payload 0 to 2^160 Monday, November 22, 2010
  • 19. A Naive Approach Command ObjectName, Payload SHA1(ObjName), Payload Node A Node B Node C Node D Monday, November 22, 2010
  • 20. A Naive Approach Command SHA1(ObjName), Payload Node A Node B Node C Node D Node E ObjectName, Payload Existing routes become invalid when you add/remove nodes. Monday, November 22, 2010
  • 21. "All problems in computer science can be solved by another level of indirection." - David Wheeler 21 Monday, November 22, 2010
  • 22. Routing with Consistent Hashing Command ObjectName, Payload SHA1(ObjName), Payload VNode 0 VNode 1 VNode 2 VNode 3 VNode 4 VNode 5 VNode 6 VNode 7 Node A Node B Node C Node D Monday, November 22, 2010
  • 23. Adding a Node Command ObjectName, Payload SHA1(ObjName), Payload VNode 0 VNode 1 VNode 2 VNode 3 VNode 4 VNode 5 VNode 6 VNode 7 Node A Node B Node C Node D Node E Monday, November 22, 2010
  • 24. Removing a Node Command ObjectName, Payload SHA1(ObjName), Payload VNode 0 VNode 1 VNode 2 VNode 3 VNode 4 VNode 5 VNode 6 VNode 7 Node A Node B Node C Node D Node E Monday, November 22, 2010
  • 25. The Ring Hash Location Monday, November 22, 2010
  • 26. Writing Replicas (NValue) Locations when N=3 Monday, November 22, 2010
  • 27. Routing Around Failures Locations when N=3 and node 0 is down. X Monday, November 22, 2010
  • 29. Location of the Routing Layer 29 Monday, November 22, 2010
  • 30. Router in the Middle Leads to SPOF Client Client Client Router VNode 0 Node A Node B Node C Node D Node E VNode 1 VNode 3 VNode 4 VNode 2 VNode 5 VNode 6 VNode 7 Monday, November 22, 2010
  • 31. Riak Core - Router on Each Node Client Client Client Router Router Router RouterRouter VNode 0 Node A Node B Node C Node D Node E VNode 1 VNode 3 VNode 4 VNode 2 VNode 5 VNode 6 VNode 7 Monday, November 22, 2010
  • 32. Eventually - Router in the Client Client Client Client VNode 0 Node A Node B Node C Node D Node E VNode 1 VNode 3 VNode 4 VNode 2 VNode 5 VNode 6 VNode 7 Router RouterRouter Why isn’t this done yet? Time and complexity. Monday, November 22, 2010
  • 33. How DoThe Routers Reach Agreement? Router Router Router RouterRouter VNode 0 Node A Node B Node C Node D Node E VNode 1 VNode 3 VNode 4 VNode 2 VNode 5 VNode 6 VNode 7 Monday, November 22, 2010
  • 34. The Nodes GossipTheir WorldView Local Ring State Incoming Ring State Are rings equivalent? Strictly descendent? Or different? Monday, November 22, 2010
  • 35. Not Mentioned Vector Clocks MerkleTrees Bloom Filters 35 Monday, November 22, 2010
  • 36. Building an Application with Riak Core 36 Monday, November 22, 2010
  • 37. Building an Application on Riak Core? Two things to think about: 37 The Command Set Command = ObjectName, Payload The commands/requests/operations that you will send through the system. TheVNode Module The callback module that will receive the commands. Monday, November 22, 2010
  • 38. Writing aVNode Module 38 Startup/Shutdown init([Partition]) -> {ok, State} terminate(State) -> ok Receive Incoming Commands handle_command(Cmd, Sender, State) -> {noreply, State1} | {reply, Reply, State1} handle_handoff_command(Cmd, Sender, State) -> {noreply, State1} | {reply, ok, State1} Monday, November 22, 2010
  • 39. Writing aVNode Module 39 Send and Receive Handoff Data handoff_starting(Node, State) -> {Bool, State1} encode_handoff_data(Data, State) -> <<Binary>>. handle_handoff_data(Data, Sender, State) -> {reply, ok, State1} handoff_finished(Node, State) -> {ok, State1} Monday, November 22, 2010
  • 40. Start the riak_core application riak_core riak_core_vnode_sup riak_core_handoff_* riak_core_ring_* riak_core_node_* riak_core_gossip_* X_vnode . . . X_vnode X_vnode 40 application:start(riak_core). Monday, November 22, 2010
  • 41. Start the riak_core application riak_core riak_core_vnode_sup riak_core_handoff_* riak_core_ring_* riak_core_node_* riak_core_gossip_* X_vnode . . . X_vnode X_vnode 41 Supervise vnode processes. Monday, November 22, 2010
  • 42. Start the riak_core application riak_core riak_core_vnode_sup riak_core_handoff_* riak_core_ring_* riak_core_node_* riak_core_gossip_* X_vnode . . . X_vnode X_vnode 42 Start, coordinate, and supervise handoff. Monday, November 22, 2010
  • 43. Start the riak_core application riak_core riak_core_vnode_sup riak_core_handoff_* riak_core_ring_* riak_core_node_* riak_core_gossip_* X_vnode . . . X_vnode X_vnode 43 Maintain cluster membership information. Monday, November 22, 2010
  • 44. Start the riak_core application riak_core riak_core_vnode_sup riak_core_handoff_* riak_core_ring_* riak_core_node_* riak_core_gossip_* X_vnode . . . X_vnode X_vnode 44 Monitor node liveness, broadcast to registered modules. Monday, November 22, 2010
  • 45. Start the riak_core application riak_core riak_core_vnode_sup riak_core_handoff_* riak_core_ring_* riak_core_node_* riak_core_gossip_* X_vnode . . . X_vnode X_vnode 45 Send ring information to other nodes. Reconcile different views of the cluster. Rebalance cluster when nodes join or leave. Monday, November 22, 2010
  • 46. In your application... riak_core riak_core_vnode_sup riak_core_handoff_* riak_core_ring_* riak_core_node_* riak_core_gossip_* X_vnode . . . X_vnode X_vnode 46 Start the vnodes for your application. Master = { riak_X_vnode_master, { riak_core_vnode_master, start_link, [riak_X_vnode] }, permanent, 5000, worker, [riak_core_vnode_master] }, {ok, { {one_for_one, 5, 10}, [Master]} }. Monday, November 22, 2010
  • 47. In your application... riak_core riak_core_vnode_sup riak_core_handoff_* riak_core_ring_* riak_core_node_* riak_core_gossip_* X_vnode . . . X_vnode X_vnode 47 Tell riak_core that your application is ready to receive requests. riak_core:register_vnode_module(riak_X_vnode), riak_core_node_watcher:service_up(riak_X, self()) Monday, November 22, 2010
  • 48. In your application... riak_core riak_core_vnode_sup riak_core_handoff_* riak_core_ring_* riak_core_node_* riak_core_gossip_* X_vnode . . . X_vnode X_vnode riak_core riak_core_vnode_sup riak_core_handoff_* riak_core_ring_* riak_core_node_* riak_core_gossip_* X_vnode . . . X_vnode X_vnode 48 Join to an existing node in the cluster. riak_core_gossip:send_ring(ClusterNode, node()) Monday, November 22, 2010
  • 49. Start Sending Commands 49 # Figure out the preflist... {_Verb, ObjName, _Payload} = Command, PrefList = riak_core_apl:get_apl(ObjName, NVal, riak_X), # Send the command... riak_core_vnode_master:command(PrefList, Command, riak_X_vnode_master) Monday, November 22, 2010
  • 50. Review Riak KV Open Source Key/Value datastore. Riak Search Full-text, near real-time search engine based on Riak Core. Riak Core Open Source Erlang library that helps you build distributed, scalable, failure-tolerant applications using a Dynamo-style architecture. 50 Monday, November 22, 2010
  • 51. Thanks! Questions? Learn More http://wiki.basho.com Read Amazon’s Dynamo Paper Get the Code http://github.com/basho/riak_core Get inTouch rusty@basho.com on Email @rklophaus onTwitter 51 Monday, November 22, 2010