Overview of Riak, the open source distributed database, for retail and eCommerce platform and services. Covers use cases including shopping carts, product catalogs, and mobile apps; data modeling and querying; architecture and operations.
model • with some extras: search, MapReduce, 2i, links, pre- and post-commit hooks, pluggable backends, HTTP and binary interfaces • Written in Erlang with C/C++ • Open source under Apache 2 License Riak
Must be highly available • High latency is perceived as unavailability • Withstands node failure, network partition, datacenter failure • Many of the same architectural principles that power Amazon’s shopping cart
data as a platform to internal and external client, developers and partners/affiliates • Flexible, schemaless design • RESTful HTTP API, protocol buffers and many client libraries • Throughput and capacity scales linearly with growth
SKU or ID JSON, XML or Text, HTML doc Product Advertising Campaign ID Ad Content User Profile Login, Email, UUID User attributes (often, JSON doc) Image or Video Content Content Name, ID or Integer Image or video file format Session Information User/Session ID Session Data
to require >1 physical machine (preferably >5) When availability is more important than consistency (think “critical data”on “big data”) When your data can be modeled as keys and values; don’t be afraid to denormalize
photos, other objects • Picked Riak for operational ease of use • “It does what it’s supposed to do; nodes can go down but Riak will still work. It’s great to be able to deal with node failures the next day instead of at 3am.”