Question

In: Computer Science

Why would log-structured merge trees be inappropriate (bad) for an application like git that manages source...

Why would log-structured merge trees be inappropriate (bad) for an application like git that manages source code? Explain

Solutions

Expert Solution

- In application like Git, we need to make frequent updates to the storage structure without having to have a conflict from ONE update to another.
- There can be multiple updates in Git at the same time for different codebases / branches.

Basic of log-structured merge trees
- In this data structure, the files / storage system are indexed. If we want to refer to any point of data or any file, we can do it by using the index of that.
- The index keys are stored in seperate file. Whenever we want to refer to the data, linear search to the file happens for the index to the data item. (Point B)


Why log-structured merge(LSM) will be bad of application like Git

  In git, files might grow at huge volume based on the project scope. We might say, files can increase exponentially.
To resolve Point B mentioned above, whenever number of files will increase to a defined limit, we will make the pair of files and then merge those files in one file. This is done to reduce the number of indexes to half and make the index file searching faster (file size is halved). But, point to note here is that while we reduced one trade off , we increased one. The file size has now become double. Here is the issue. When the files size keep on increasing (doubling) in each merge, the subsequent merge operation will take much longer time. And in application like Git, there is a huge volume of new data every day.

Thus, merging two files with a lot of data will take a lot of time and might result in latency. So, using LSM is a bad option in application like Git.



Kindly upvote if this helped.


Related Solutions

You are given 2 sorted sequences of log(n) and n-1 keys. We would like to merge...
You are given 2 sorted sequences of log(n) and n-1 keys. We would like to merge those 2 sorted sequences by performing o(n) comparisons.[Note that we are interested in the comparisons and not the running time.] Show how this can be done or argue how this cannot be done. In class we show that ordinary merging would require no more than lg(n)+n-1+1 = n+lg(n) comparisons.
Why do we use B-trees if ??(log?? ??) = ??(??????) for all ??, ??
Why do we use B-trees if ??(log?? ??) = ??(??????) for all ??, ??
Why would a company want to merge or buy another company?
Why would a company want to merge or buy another company?
Explain why it would be beneficial for Apple and Dell to merge into a single firm...
Explain why it would be beneficial for Apple and Dell to merge into a single firm that will manufacture computers. Identify the type of integration. Discuss the circumstances under which the Federal Trade Commission will oppose this merger.
The payroll department would like to see a more structured commencement process established for all new...
The payroll department would like to see a more structured commencement process established for all new hires, as the existing procedures are proving to be inefficient and unreliable. Prepare a brief memo for the Payroll Manager with your recommendation for a new process.
Why is an invasive species like water hyacinth so bad for the Delta?
Why is an invasive species like water hyacinth so bad for the Delta?
Subject: Managerial Economics 2. Explain why it would be beneficial for Apple and Dell to merge...
Subject: Managerial Economics 2. Explain why it would be beneficial for Apple and Dell to merge into a single firm that will manufacture computers. Identify the type of integration. Discuss the circumstances under which the Federal Trade Commission will oppose this merger.
Why are decision trees a good model to use for regression predictions/problems for variables like price?...
Why are decision trees a good model to use for regression predictions/problems for variables like price? What are the pros and cons of using decision trees?
Why is the profitablity index bad for valuing mutually exclusive projects, and why would NPV be...
Why is the profitablity index bad for valuing mutually exclusive projects, and why would NPV be a better valuation method?
Why a company would like to invest in China?
Why a company would like to invest in China?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT