Database Project 3 Riak
Students:
Salhi Issam Eddine
Taibi Abd El Ouahed
Dobbi Ayoub
Professor:
Amirat Hanane
What is Riak?
Distributed NoSQL Amazon Dynamo Inspired
A distributed, key-value NoSQL database Originally developed by Basho Technologies,
engineered for exceptional high availability and drawing inspiration from the seminal Amazon
fault tolerance. Dynamo paper (2007).
Enterprise-Grade Masterless Architecture
Utilised by major enterprises for critical Operates efficiently on standard hardware,
applications demanding superior scalability and featuring a masterless architecture for
resilience. enhanced robustness.
Riak's Distributed Architecture: The Ring and
Vnodes
Riak's core architecture is built around two fundamental concepts:
The "Ring": A 160-bit circular hash space, conceptually divided into
numerous partitions known as vnodes.
Each vnode represents a virtual unit, managed by a physical node, and is
responsible for a specific segment of the data.
This homogeneous architecture ensures that every node can process
all types of requests, effectively eliminating any single point of failure.
The Ring State mechanism continuously synchronises the cluster's
status, enabling automatic request redirection and load balancing when
nodes are added or experience failures.
Key-Value Data Model
Simple & Flexible CRUD Operations
Storage Supports standard Create,
Data is stored as binary key- Read, Update, and Delete
value pairs, where the key is a (CRUD) operations via RESTful
unique identifier and the value APIs and Protocol Buffers for
can be opaque, JSON, broad compatibility.
documents, images, or any
other data type.
Rich Feature Set
Offers extensions such as
secondary indexes for efficient
querying, full-text search
capabilities (leveraging Apache
Solr), and MapReduce for
distributed data processing.
Riak and the CAP Theorem: Availability & Partition
Tolerance
Riak's design prioritises Availability (A) and Partition
Tolerance (P) over strict Consistency (C) as per the
CAP theorem.
Its masterless architecture ensures that both read
and write operations can proceed uninterrupted,
even in the event of network partitions.
Riak employs an "eventual consistency" model by
default, offering adjustable consistency levels
(strong or eventual) on a per-bucket basis to suit
varying application needs.
Conflict resolution is managed through vector
clocks, which track the causal history of data,
enabling intelligent conflict detection and
resolution.
Replication and Consistency in Riak
01 02
Multi-Node Replication Hinted Handoff
Data is replicated across multiple nodes, with a The "hinted handoff" mechanism temporarily
default setting of three replicas to ensure data redirects data meant for an unavailable node to a
durability and availability. neighbouring node, ensuring writes are never lost.
03 04
Multi-Datacenter Replication Automatic Conflict Resolution
Supports multi-datacenter replication with Riak features automatic conflict resolution using
'fullsync' and 'realtime' modes, providing business causal contexts, eliminating the need for global
continuity and disaster recovery capabilities. locks and maintaining high throughput.
Advantages of Riak
High Availability
1 Guaranteed high availability, even in the face of hardware failures
or network partitions.
Linear Scalability
2 Seamless addition or removal of nodes without service
interruption or manual data reorganisation.
Fault Tolerance
3 Inherent fault tolerance due to its masterless architecture and
intelligent replication strategies.
Easy Integration
4 Simple integration with other Big Data technologies, such as
Apache Spark, Redis, and Solr.
Limitations and
Disadvantages
Strong Consistency Challenges
Achieving strong consistency can be challenging, which
may not suit all transactional application requirements.
Relational Query Limitations
The simple key-value model is less suited for complex
relational queries compared to traditional SQL
databases.
Conflict Management
Conflict resolution may occasionally necessitate
additional application-level logic for optimal handling.
Analytical Performance
May exhibit lower performance than some competitors
for specific analytical query types.
Practical Use Cases
User Session & Personalisation Data
Managing user sessions and personalisation data
for mobile platforms and e-commerce
applications.
Log Storage & Real-time Analytics
Storing extensive logs and operational data for
real-time analysis and monitoring.
Multi-Site Replication
Implementing multi-site replication for business
continuity and robust disaster recovery solutions.
Leading companies such as Uber and The
Weather Company leverage Riak for its
unparalleled resilience and scalability in
demanding environments.
Conclusion: Why Choose Riak?
Robust Solution Innovative Architecture
An exceptionally robust solution Its innovative distributed
for applications demanding architecture guarantees
maximum availability and performance and resilience in
horizontal scalability. critical environments.
Embrace Riak Unstructured Data Ideal
An invitation to explore Riak in Perfectly suited for storing
your Big Data projects to harness unstructured data with stringent
its unique strengths. fault tolerance requirements.