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

New article: MiniLSM: A Tutorial of Building Storage Engine in a Week using Rust #9

Merged
merged 4 commits into from
Feb 1, 2023

Conversation

Folyd
Copy link
Contributor

@Folyd Folyd commented Dec 30, 2022

Thanks for the contribution from @skyzh.

Copy link
Collaborator

@LCrossman LCrossman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MiniLSM tutorial is a comprehensive piece of work that is interesting and appears helpful and challenging to the reader. A person undertaking the tutorial would probably need to invest some time and a reasonable amount of work, therefore I think it is entirely important to describe very clearly the benefits this structure is offering. Some example data types would be helpful to see the need and requirements for the person to undertake the tutorial. Finally, the tutorial has a bit of an unfinished look and feel with some empty headings and it would be potentially better to close this out so it has more of a finished feel at the moment.

Generally speaking, LSM Tree is an append-friendly data structure. It is more intuitive to compare LSM to other
key-value data structure like RB-Tree and B-Tree. For RB-Tree and B-Tree, all data operations are in-place. That is to
say, when you update the value corresponding to the key, the value will be overwritten at its original memory or disk
space. But in an LSM Tree, all write operations, i.e., insertions, updates, deletions, are performed in somewhere else.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete "in" and further clarification on where the write operations are performed and how and why this is important is requested

their underlying storage engine. [RocksDB](http://rocksdb.org), based on [LevelDB](https://github.com/google/leveldb),
is an implementation of LSM-Tree storage engine. It provides a wide range of key-value access functionalities and is
used in a lot of production systems.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can multiple values be used per key? Are there any examples of appropriate data types?

multi-thread program with the help of borrow checker.

## Upcoming Chapters

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the tutorial both is and appears unfinished. It would seem to be clearer for the tutorial to be a finished piece of work with no empty headings. Can you tie it up for now so it has a more finished look to this point?

@Folyd
Copy link
Contributor Author

Folyd commented Jan 3, 2023

Thanks, @LCrossman. @skyzh do you mind checking the review suggestions?

@Folyd Folyd mentioned this pull request Jan 6, 2023
8 tasks
1. We will first probe all the memtables from latest to oldest.
2. If the key is not found, we will then search the entire LSM tree containing SSTs to find the data.

## Tutorial Overview
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section needs to add some key Rust code examples to make the article look fuller.

@skyzh
Copy link
Contributor

skyzh commented Jan 15, 2023

I'm back from my trip. Thanks for @LCrossman and @ZhangHanDong 's suggestion. Will update soon.

Signed-off-by: Alex Chi <iskyzh@gmail.com>
@Folyd
Copy link
Contributor Author

Folyd commented Jan 31, 2023

Ping @LCrossman @ZhangHanDong

@Folyd Folyd merged commit 11c5365 into main Feb 1, 2023
@Folyd Folyd deleted the skyzh-minilsm branch February 1, 2023 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants