Structure Of This Post:
- Purpose.
- Explanation of terms.
- Dive into source code.
WHY We Want to Study This?
Distributed computing is a hot topic of computer science. Studying any implementation of real projects is a good start. We can learn how to organize a project and how to integrate different libraries, packages, and algorithms into one project.
WHAT
Before we start to dive into the source code of rqlite, we need to understand basic concepts of this project.
Distributed Computing
- Description:
Distributed Computing is a field of computer science that studies distributed systems.
In distributed computing, a problem is divided into many tasks, each of which is solved by one or more computers,[3] which communicate with each other by message passing.
Three significant characteristics of distributed systems are: concurrency of components, lack of a global clock, and independent failure of components. Examples of distributed systems vary from SOA-based systems to massively multiplayer online games to peer-to-peer applications.
Raft
Description:
Raft is a consensus algorithm designed as an alternative to Paxos. It was meant to be more understandable than Paxos by means of separation of logic, but it is also formally proven safe and offers some new features.
Raft offers a generic way to distribute a state machine across a cluster of computing systems, ensuring that each node in the cluster agrees upon the same series of state transitions
Raft is a distributed consensus protocol.
Such protocol are used to ensure multiple different nodes-server-always agree on a given set of values.
SQLite
Description:
SQLite is a relational database management system contained in a C programming library. In contrast to many other database management systems, SQLite is not a client–server database engine. Rather, it is embedded into the end program.
SQLite is ACID-compliant and implements most of the SQL standard, using a dynamically and weakly typed SQL syntax that does not guarantee the domain integrity.[5]
SQLite is a popular choice as embedded database software for local/client storage in application software such as web browsers. It is arguably the most widely deployed database engine, as it is used today by several widespread browsers, operating systems, and embedded systems (such as mobile phones), among others.[6] SQLite has bindings to many programming languages.
HOW (The architecture of RQLite)
What’s the architecture of this project?
—Diagram comes from the documentation of rqlite—
1 | ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ┌ ─ ─ ─ ─ ┐ |
—The structure of code of RQLite.—
1 | ├── auth |
Conclusion
The above texts are the basic information of RQLite. Next post, we will focus on hashicorp/raft . Understand how to use the library and how to integrate with SQLite.
Reference:
@credit image from rqlite