Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Rocksdb storage #93

Closed
jopemachine opened this issue Apr 29, 2024 · 2 comments · Fixed by #124
Closed

Implement Rocksdb storage #93

jopemachine opened this issue Apr 29, 2024 · 2 comments · Fixed by #124
Assignees
Labels
feature New feature or request log-storage Log store (Stable storage)

Comments

@jopemachine
Copy link
Member

jopemachine commented Apr 29, 2024

It would be helpful to implement various log storage types and benchmark their performance.

@jopemachine jopemachine added feature New feature or request log-storage Log store (Stable storage) labels Apr 29, 2024
@TaskerJang
Copy link
Contributor

TaskerJang commented Aug 25, 2024

Goal

The goal is to implement RocksDB storage in the project, enabling the use of the RocksDB engine to store logs.

Tasks

  1. Implement RocksDB Storage:

    • Define a new storage module or structure that manages and stores log data using RocksDB.
    • This structure should implement the StableStorage trait to integrate seamlessly with the existing codebase.
  2. Utilize RocksDB Methods:

    • Implement log storage, retrieval, and deletion functions using RocksDB's core methods (put, get, delete, etc.).
    • Ensure the implementation efficiently handles large data volumes while maintaining performance and reliability.
  3. Integrate with Existing Codebase:

    • Ensure the new RocksDB storage implementation is compatible with the existing storage interface and can be easily swapped with other storage types.
    • Modify relevant parts of the codebase to allow the selection of different storage backends during configuration or runtime.
  4. Performance Benchmarking:

    • After implementation, benchmark the performance of RocksDB storage against other storage types to evaluate its efficiency and suitability.
    • Compare relevant metrics such as read/write speed and memory usage to provide insights into the optimal storage options for various scenarios.

Things to Learn

  1. RocksDB Basics:

    • Study RocksDB's official documentation to understand its internal structure and operation.
    • Focus on key concepts such as Column Families, Write-Ahead Logging (WAL), Compaction, and Snapshots.
  2. Integrating RocksDB with Rust:

    • Learn how to use the Rust RocksDB library to interact with RocksDB in Rust.
    • Master the API for creating, reading, writing, and deleting databases in Rust using RocksDB.

For example

image

@TaskerJang
Copy link
Contributor

TaskerJang commented Sep 15, 2024

💬 TaskerJang commented just now:
🔗 Pull Request #124 - Implement RocksDB Storage for Raftify

In this pull request, the following key features have been added to the project:

  • RocksDB Storage Integration: Introduced a new storage backend using RocksDB to manage Raft logs, state, and snapshots.
  • Log Storage & Retrieval: Implemented core functionalities to store, retrieve, and delete logs efficiently using RocksDB’s put, get, and delete methods.
  • Snapshot Management: Added the ability to create and apply Raft snapshots to ensure data durability and recovery.
  • Storage Compaction: Enabled log compaction to optimize storage usage by removing outdated entries.
  • Comprehensive Testing: Provided unit tests for all major functions, ensuring the reliability of the new storage backend.

This pull request aims to improve performance and scalability, offering an alternative storage solution within the Raftify project.

@jopemachine jopemachine linked a pull request Sep 15, 2024 that will close this issue
@jopemachine jopemachine added ossca-24 OSS Contribution Academy mentee's contributions. and removed ossca-24 OSS Contribution Academy mentee's contributions. labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request log-storage Log store (Stable storage)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants