Upload
byron-haynes
View
222
Download
0
Embed Size (px)
DESCRIPTION
Yes and no No No need of scaling Local distribution Financial transactions simple queryability complex data structures rigid schema
Citation preview
7 databases in 7 weeksPart 3 Riak
Yes and no Yes
distributed data-replicating enhanced key-value store no single point of failure HTTP(Protobuf) Availability Speed huge data handling
Yes and no No
No need of scaling Local distribution Financial transactions simple queryability complex data structures rigid schema
CRUD Links and MIMEs httplocalhost8091stats
vnode_gets0vnode_puts0vnode_index_reads0connected_nodes[dev2127001dev3127001]ring_members[dev1127001dev2127001dev3127001]ring_num_partitions64ring_ownership[dev312700121dev212700121dev112700122]ldquo
Bucketvalue httpSERVERPORTriakBUCKETKEY Curl ndashX GET httplocalhost8091riak
buckets=true
Simple bad query $curl ndashI
httplocalhost8091riakno_bucketno_keyHTTP11 404 Object Not FoundServer MochiWeb11WebMachine173(participate in the frantic)Date Thu 04 Aug 2011 012549 GMT Content-Type textplainContent-Length10
CRUD Curl ndashv ndashX PUT http
localhost8091riakanimalsace -H Content-Type applicationjsonldquo -d nicknameldquo The Wonder Dog breedGermanShepherd
Returns 204 Curl httplocalhost8091riakanimalsace Curl ndashI ndashX DELETE
httplocalhost8091riakanimalsace
Links Link ltriakbucketkeygtriaktag=ldquofuuldquo Curl ndashX PUT
httplocalhost8091riakcages1-H Content-Type applicationjson-H Linkltriakanimalspollygtriaktag=contains-d room101lsquo
link relationship is one-directional Link is returned in the header
Link walking Curl httplocalhost8091riakcages1
___ ___ - buckettagkeep Curl
httplocalhost8091riakcages2_next_to0animals__
MIME Types Binary-encoded value Curl ndashX PUT
httplocalhost8091riakphotospollyjpg-H Content-type imagejpeg-H Linkltriakanimalspollygtriaktag=photo--data-binary polly_imagejpg
Mapreduce
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Yes and no Yes
distributed data-replicating enhanced key-value store no single point of failure HTTP(Protobuf) Availability Speed huge data handling
Yes and no No
No need of scaling Local distribution Financial transactions simple queryability complex data structures rigid schema
CRUD Links and MIMEs httplocalhost8091stats
vnode_gets0vnode_puts0vnode_index_reads0connected_nodes[dev2127001dev3127001]ring_members[dev1127001dev2127001dev3127001]ring_num_partitions64ring_ownership[dev312700121dev212700121dev112700122]ldquo
Bucketvalue httpSERVERPORTriakBUCKETKEY Curl ndashX GET httplocalhost8091riak
buckets=true
Simple bad query $curl ndashI
httplocalhost8091riakno_bucketno_keyHTTP11 404 Object Not FoundServer MochiWeb11WebMachine173(participate in the frantic)Date Thu 04 Aug 2011 012549 GMT Content-Type textplainContent-Length10
CRUD Curl ndashv ndashX PUT http
localhost8091riakanimalsace -H Content-Type applicationjsonldquo -d nicknameldquo The Wonder Dog breedGermanShepherd
Returns 204 Curl httplocalhost8091riakanimalsace Curl ndashI ndashX DELETE
httplocalhost8091riakanimalsace
Links Link ltriakbucketkeygtriaktag=ldquofuuldquo Curl ndashX PUT
httplocalhost8091riakcages1-H Content-Type applicationjson-H Linkltriakanimalspollygtriaktag=contains-d room101lsquo
link relationship is one-directional Link is returned in the header
Link walking Curl httplocalhost8091riakcages1
___ ___ - buckettagkeep Curl
httplocalhost8091riakcages2_next_to0animals__
MIME Types Binary-encoded value Curl ndashX PUT
httplocalhost8091riakphotospollyjpg-H Content-type imagejpeg-H Linkltriakanimalspollygtriaktag=photo--data-binary polly_imagejpg
Mapreduce
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Yes and no No
No need of scaling Local distribution Financial transactions simple queryability complex data structures rigid schema
CRUD Links and MIMEs httplocalhost8091stats
vnode_gets0vnode_puts0vnode_index_reads0connected_nodes[dev2127001dev3127001]ring_members[dev1127001dev2127001dev3127001]ring_num_partitions64ring_ownership[dev312700121dev212700121dev112700122]ldquo
Bucketvalue httpSERVERPORTriakBUCKETKEY Curl ndashX GET httplocalhost8091riak
buckets=true
Simple bad query $curl ndashI
httplocalhost8091riakno_bucketno_keyHTTP11 404 Object Not FoundServer MochiWeb11WebMachine173(participate in the frantic)Date Thu 04 Aug 2011 012549 GMT Content-Type textplainContent-Length10
CRUD Curl ndashv ndashX PUT http
localhost8091riakanimalsace -H Content-Type applicationjsonldquo -d nicknameldquo The Wonder Dog breedGermanShepherd
Returns 204 Curl httplocalhost8091riakanimalsace Curl ndashI ndashX DELETE
httplocalhost8091riakanimalsace
Links Link ltriakbucketkeygtriaktag=ldquofuuldquo Curl ndashX PUT
httplocalhost8091riakcages1-H Content-Type applicationjson-H Linkltriakanimalspollygtriaktag=contains-d room101lsquo
link relationship is one-directional Link is returned in the header
Link walking Curl httplocalhost8091riakcages1
___ ___ - buckettagkeep Curl
httplocalhost8091riakcages2_next_to0animals__
MIME Types Binary-encoded value Curl ndashX PUT
httplocalhost8091riakphotospollyjpg-H Content-type imagejpeg-H Linkltriakanimalspollygtriaktag=photo--data-binary polly_imagejpg
Mapreduce
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
CRUD Links and MIMEs httplocalhost8091stats
vnode_gets0vnode_puts0vnode_index_reads0connected_nodes[dev2127001dev3127001]ring_members[dev1127001dev2127001dev3127001]ring_num_partitions64ring_ownership[dev312700121dev212700121dev112700122]ldquo
Bucketvalue httpSERVERPORTriakBUCKETKEY Curl ndashX GET httplocalhost8091riak
buckets=true
Simple bad query $curl ndashI
httplocalhost8091riakno_bucketno_keyHTTP11 404 Object Not FoundServer MochiWeb11WebMachine173(participate in the frantic)Date Thu 04 Aug 2011 012549 GMT Content-Type textplainContent-Length10
CRUD Curl ndashv ndashX PUT http
localhost8091riakanimalsace -H Content-Type applicationjsonldquo -d nicknameldquo The Wonder Dog breedGermanShepherd
Returns 204 Curl httplocalhost8091riakanimalsace Curl ndashI ndashX DELETE
httplocalhost8091riakanimalsace
Links Link ltriakbucketkeygtriaktag=ldquofuuldquo Curl ndashX PUT
httplocalhost8091riakcages1-H Content-Type applicationjson-H Linkltriakanimalspollygtriaktag=contains-d room101lsquo
link relationship is one-directional Link is returned in the header
Link walking Curl httplocalhost8091riakcages1
___ ___ - buckettagkeep Curl
httplocalhost8091riakcages2_next_to0animals__
MIME Types Binary-encoded value Curl ndashX PUT
httplocalhost8091riakphotospollyjpg-H Content-type imagejpeg-H Linkltriakanimalspollygtriaktag=photo--data-binary polly_imagejpg
Mapreduce
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Bucketvalue httpSERVERPORTriakBUCKETKEY Curl ndashX GET httplocalhost8091riak
buckets=true
Simple bad query $curl ndashI
httplocalhost8091riakno_bucketno_keyHTTP11 404 Object Not FoundServer MochiWeb11WebMachine173(participate in the frantic)Date Thu 04 Aug 2011 012549 GMT Content-Type textplainContent-Length10
CRUD Curl ndashv ndashX PUT http
localhost8091riakanimalsace -H Content-Type applicationjsonldquo -d nicknameldquo The Wonder Dog breedGermanShepherd
Returns 204 Curl httplocalhost8091riakanimalsace Curl ndashI ndashX DELETE
httplocalhost8091riakanimalsace
Links Link ltriakbucketkeygtriaktag=ldquofuuldquo Curl ndashX PUT
httplocalhost8091riakcages1-H Content-Type applicationjson-H Linkltriakanimalspollygtriaktag=contains-d room101lsquo
link relationship is one-directional Link is returned in the header
Link walking Curl httplocalhost8091riakcages1
___ ___ - buckettagkeep Curl
httplocalhost8091riakcages2_next_to0animals__
MIME Types Binary-encoded value Curl ndashX PUT
httplocalhost8091riakphotospollyjpg-H Content-type imagejpeg-H Linkltriakanimalspollygtriaktag=photo--data-binary polly_imagejpg
Mapreduce
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Simple bad query $curl ndashI
httplocalhost8091riakno_bucketno_keyHTTP11 404 Object Not FoundServer MochiWeb11WebMachine173(participate in the frantic)Date Thu 04 Aug 2011 012549 GMT Content-Type textplainContent-Length10
CRUD Curl ndashv ndashX PUT http
localhost8091riakanimalsace -H Content-Type applicationjsonldquo -d nicknameldquo The Wonder Dog breedGermanShepherd
Returns 204 Curl httplocalhost8091riakanimalsace Curl ndashI ndashX DELETE
httplocalhost8091riakanimalsace
Links Link ltriakbucketkeygtriaktag=ldquofuuldquo Curl ndashX PUT
httplocalhost8091riakcages1-H Content-Type applicationjson-H Linkltriakanimalspollygtriaktag=contains-d room101lsquo
link relationship is one-directional Link is returned in the header
Link walking Curl httplocalhost8091riakcages1
___ ___ - buckettagkeep Curl
httplocalhost8091riakcages2_next_to0animals__
MIME Types Binary-encoded value Curl ndashX PUT
httplocalhost8091riakphotospollyjpg-H Content-type imagejpeg-H Linkltriakanimalspollygtriaktag=photo--data-binary polly_imagejpg
Mapreduce
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
CRUD Curl ndashv ndashX PUT http
localhost8091riakanimalsace -H Content-Type applicationjsonldquo -d nicknameldquo The Wonder Dog breedGermanShepherd
Returns 204 Curl httplocalhost8091riakanimalsace Curl ndashI ndashX DELETE
httplocalhost8091riakanimalsace
Links Link ltriakbucketkeygtriaktag=ldquofuuldquo Curl ndashX PUT
httplocalhost8091riakcages1-H Content-Type applicationjson-H Linkltriakanimalspollygtriaktag=contains-d room101lsquo
link relationship is one-directional Link is returned in the header
Link walking Curl httplocalhost8091riakcages1
___ ___ - buckettagkeep Curl
httplocalhost8091riakcages2_next_to0animals__
MIME Types Binary-encoded value Curl ndashX PUT
httplocalhost8091riakphotospollyjpg-H Content-type imagejpeg-H Linkltriakanimalspollygtriaktag=photo--data-binary polly_imagejpg
Mapreduce
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Links Link ltriakbucketkeygtriaktag=ldquofuuldquo Curl ndashX PUT
httplocalhost8091riakcages1-H Content-Type applicationjson-H Linkltriakanimalspollygtriaktag=contains-d room101lsquo
link relationship is one-directional Link is returned in the header
Link walking Curl httplocalhost8091riakcages1
___ ___ - buckettagkeep Curl
httplocalhost8091riakcages2_next_to0animals__
MIME Types Binary-encoded value Curl ndashX PUT
httplocalhost8091riakphotospollyjpg-H Content-type imagejpeg-H Linkltriakanimalspollygtriaktag=photo--data-binary polly_imagejpg
Mapreduce
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Link walking Curl httplocalhost8091riakcages1
___ ___ - buckettagkeep Curl
httplocalhost8091riakcages2_next_to0animals__
MIME Types Binary-encoded value Curl ndashX PUT
httplocalhost8091riakphotospollyjpg-H Content-type imagejpeg-H Linkltriakanimalspollygtriaktag=photo--data-binary polly_imagejpg
Mapreduce
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
MIME Types Binary-encoded value Curl ndashX PUT
httplocalhost8091riakphotospollyjpg-H Content-type imagejpeg-H Linkltriakanimalspollygtriaktag=photo--data-binary polly_imagejpg
Mapreduce
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Mapreduce
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Mapreduce in riak
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Reduce Procedures build in functions
keyfilterslink walking
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Riak ring
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
NodesWritesReads Curl http
localhost8091riakanimalsacer=3 n_val3r2w1 OneAllQuorumDefault(3) Curl
httplocalhost8091riakanimalspollyr=quorum
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Conflicts and hooks Vector Clocks Resolving conflicts as in gitsvn Vector pruning PrePost-commit Hooks
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached
Search and index Curl http
localhost8091solranimalsselectq=breedShepherd
Wild cards Curl
httplocalhost8091solranimalsselectwt=jsonampq=nicknamerin20breedshepherdampqop=and
Indexing is done on metadata attached