Skip to content

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

Merged
Folyd merged 4 commits into
mainfrom
skyzh-minilsm
Feb 1, 2023
Merged

New article: MiniLSM: A Tutorial of Building Storage Engine in a Week using Rust#9
Folyd merged 4 commits into
mainfrom
skyzh-minilsm

Conversation

@Folyd

@Folyd Folyd commented Dec 30, 2022

Copy link
Copy Markdown
Contributor

Thanks for the contribution from @skyzh.

@LCrossman LCrossman left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread content/issue-1/minilsm.md Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Folyd commented Jan 3, 2023

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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

skyzh commented Jan 15, 2023

Copy link
Copy Markdown
Contributor

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

Folyd commented Jan 31, 2023

Copy link
Copy Markdown
Contributor Author

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