benedekh / WeLoveClouds

Repository for submissions on the CloudDB course.
0 stars 1 forks source link

Feature/persistent storage improvements #65

Closed benedekh closed 7 years ago

benedekh commented 7 years ago

Note: not tested yet

benedekh commented 7 years ago

Tested.

Some measurements with 200 key-value pairs. Key was just a number as a String (0-199), and value was a "valalalala " string. Number after the colon is the elapsed time in seconds (stroage as SSD, if it is in square brackets then the storage was HDD). Not a too precise benchmark just a 1st round estimate.

How storage algorithm works now?

It stores the entries in a map, the key and the value are separated. Each map has a max. capacity, and each map is persisted into a file. If a map has free capacity then the allocation algorithm first uses that map to put a new key-value pair into that. If there is no free map, then a new map is created for the key-value pair to be stored.

benedekh commented 7 years ago

The PR is closed, because in the meantime the storage functionality has been developped further in PR #82 on a different branch. The changes suggested in the code review are included in the new branch.