Block placement (Layouts) discussion #119
Replies: 4 comments
-
Layout 1 ("horizontal"):
Layout 2 ("vertical"):
Layout 2R ("vertical rotated"):
Layout 1R is also possible. |
Beta Was this translation helpful? Give feedback.
-
Finally, about the Diagonal layout. Its definition is up to Dmitry, but my understanding of his idea:
I'm not sure it's possible at all, and anyway it will be less efficient than the Striped layout for data recovery. So, my alternative proposal is to drop requirement to have single numeration for both block types and have separate sequences - one for data blocks and another for parity blocks:
This approach allows simple definition of formulas, supports adding new data to datasets, and allows us to use Striped and Striped Rotated layouts which are the most efficient ones (in terms of sequential download and recovery of single lost block) |
Beta Was this translation helpful? Give feedback.
-
Detailed review of Layout 1 ("horizontal" aka Sequential).Node number to indexes of data and parity blocks it should store (used by contract to fill slots): for node in 0 .. K-1:
data[node*S + group] for group in 0 .. S-1
for node in K .. K+M-1:
parity[(node-K)*S + group] for group in 0 .. S-1 EC group number to indexes of data and parity blocks it includes (used by uploader to construct ECC, used by downloader to recover data): for group in 0..S-1:
data[node*S + group] for node in 0 .. K-1
parity[(node-K)*S + group] for node in K .. K+M-1 NOTESince the current code places both block types in the same array, the mapping is even simpler: for node in 0 .. K+M-1
for group in 0..S-1:
block[node*S + group] and similarly for "vertical" layout: for group in 0..S-1:
for node in 0 .. K+M-1
block[group*(K+M) + node] |
Beta Was this translation helpful? Give feedback.
-
Detailed review of Layout 2 ("vertical" aka Striped)Node number to indexes of data and parity blocks it should store (used by contract to fill slots): for node in 0 .. K-1:
data[group*K + node] for group in 0 .. S-1
for node in K .. K+M-1:
parity[group*M + (node - K)] for group in 0 .. S-1 EC group number to indexes of data and parity blocks it includes (used by uploader to construct ECC, used by downloader to recover data): for group in 0..S-1:
data[group*K + node] for node in 0 .. K-1
parity[group*M + (node - K)] for node in K .. K+M-1 |
Beta Was this translation helpful? Give feedback.
-
Continuation of #85 and part of #70 efforts.
If we use ECC with K+M encoding (K data blocks and M parity blocks in each EC group), a dataset contains S*K data blocks and S*M parity blocks. Here we discuss various ways to distribute them over N nodes and currently we support (and discuss here) only the N=K+M case.
Note that the block order of the original data has special meaning - it's the typical retrieval order (in particular, currently we support only sequential download of the entire dataset). For simplicity, we extend dataset with empty blocks to the nearest S*K blocks size. OTOH, parity block order isn't important and we can choose it arbitrarily.
Layout is defined by two functions providing mapping of:
We have the following requirements to Layouts, in order of decreasing importance:
Extra requirement that will allow us to develop extensible contracts:
Beta Was this translation helpful? Give feedback.
All reactions