<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>The model of network map and data placement in the distributed decentralized storage platform</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Anatoly Bogatyrev</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sergei Liubich</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Fabian Wahle</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Stanislav Bogatyrev</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Alexey Vanin</string-name>
          <email>alexeyg@nspcc.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>JSC "NEO Saint Petersburg Competence Center"</institution>
          ,
          <addr-line>St. Petersburg, Russia https://nspcc.ru</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>Nowadays, building an e cient, reliable and scalable decentralized data storage architecture is an actual problem in both corporate and academic communities since decentralization requires new approaches that adapt existing models of distributed systems. The aim of this research is to form a model for the decentralized storage system to distribute data over available storage nodes, e ciently reorganize data when nodes are added or removed and enforce exible constraints on object replica placement that maximize data safety in the presence of coincident or correlated failures. The model of distributed decentralized object storage integrated with blockchain payment system is proposed in this paper. A novel approach based on representing a network map as a graph and creating extended ltering mechanism for deterministic subgraph de nition for object placement is introduced. The concept of a container, de ning a network map subgraph, and a placement function for obtaining a container subgraph (based on the network map graph) or an object placement subgraph (based on the container subgraph) are presented. A modi cation of the CRUSH method is proposed for data placement.</p>
      </abstract>
      <kwd-group>
        <kwd>Network map Placement function Placement rule Storage policy Distributed decentralized storage platform</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The development of blockchain technology has recently moved not so much
towards global public permissionless blockchains as toward the implementation of
corporate- and state use to solve speci c internal tasks. It is logical to expect
the development of Dapp projects in this direction. At the same time, DApps
are supposed to store data in the decentralized storage systems to preserve their
advantages over classic applications.</p>
      <p>
        Currently, most projects [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ] in this eld are aimed at implementing
simple exclusive storages of data of some users on the capacities of other users or
at creating add-ons via IPFS [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] for implementing public content distribution
based on traditional hosting and CDN. In this case, the niche of storages that
have a convenient API for DApp and the ability to organize isolated areas with
control over data exchange in both public- and other private data storage areas
is practically empty.
      </p>
      <p>Building an e cient, reliable and scalable decentralized data storage
architecture is an actual problem in both corporate and academic communities since
decentralization requires new approaches that adapt existing models of distributed
systems.</p>
      <p>
        The aim of this research is to propose a model for the decentralized
faulttolerant [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] object storage system to distribute data over available storage nodes
(a modi cation of the CRUSH [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] method is proposed for data placement),
efciently reorganize data when nodes are added or removed and enforce exible
constraints on object replica placement that maximize data safety in the
presence of coincident or correlated failures.
      </p>
      <p>The proposed model contains the following components: network structure,
network map, data placement method and the concept of a container. These
components are discussed in this paper.
2</p>
    </sec>
    <sec id="sec-2">
      <title>The Model</title>
      <p>2.1</p>
      <p>
        Network Structure
The Distributed Decentralized Storage Platform (DDSP) p2p network is
comprised of two types of nodes: Inner Ring nodes are responsible for maintaining
information about network topology, accounting and data audit; Outer Ring
nodes are responsible for storing data and ensuring its integrity and availability.
Information about all active Outer Ring storage nodes and their properties forms
a Network Map. Inner Ring is responsible for keeping Network Map up to date
and distributes changes over all network peers. At the same time, Inner Ring
nodes have to maintain all operations in the conditions of total distrust [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] of all
network nodes. To solve this, it is proposed to use dBFT consensus protocol [
        <xref ref-type="bibr" rid="ref8 ref9">8,
9</xref>
        ].
2.2
      </p>
      <p>
        Network Map
DDSP keeps the network map up to date and distributes it over nodes. It
contains information about groups of nodes, their location in the network and main
parameters necessary for correct data search and placement. The network map
is represented as a graph [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] in the proposed method. The graph consists of
vertices: buckets and nodes. A bucket is a vertex of the graph [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Together with
outbound edges, it forms a subgraph of the network map, leaves of which are
represented by nodes. Nodes can only be leaves, the bucket can be a parent
for other buckets or nodes. The bucket is characterized by type and value (a
key-value pair).
      </p>
      <p>Placement Function and Placement Rule
Instead of maintaining and querying database with information about each
object's location, the proposed DDSP uses consistent placement function with the
following arguments:
{ storage Policy de ned with Placement Rules,
{ network map (or the network map subgraph),
{ rendezvous hashing salt.</p>
      <p>The one can de ne a storage policy that is applied to the stored object. The
placement rules consist of a set of SELECT() or FILTER() operations applied
to the network map. The result of these operations is a subgraph of the network
map where data can be placed. The SELECT() operation is applied to a tree-like
subset of Network Map. It takes as inputs a replication factor and a bucket type.
Multiple operations in the storage policy are enqueued and each subsequent
operation is recursively applied to the previous operation's output. The FILTER()
operation is applied to the graph. The operation inputs are the bucket type,
bucket value and comparison operation. For text values, the operations eq and
ne are available. For numeric values, gt, ge, lt, le are additionally available.</p>
      <p>
        A set of operations on the graph (in the placement rule) can be grouped by
using AND, OR, NOT. The placement function is performed recursively, with
the operation of the next step being performed for all the nodes retrieved at
the previous step. Buckets and placement nodes in the bucket are selected using
Rendezvous hashing algorithm. With it, each node or bucket has an individual
hash number for an individual item, and a bucket or node having the largest hash
number are chosen. Data in this algorithm is distributed uniformly and small
number of data movement is required when nodes are added or removed [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
However, it can achieve minimum data movement when nodes are added or
removed.
      </p>
      <p>The placement function is executed recursively with the operation of the next
step being applied for all the nodes retrieved at the previous step.</p>
      <p>This network map (or network map subgarph) (see Fig. 1) consists of the
bucket with types Loc (country), City (city), Storage (storage disk type) and
the nodes of the corresponding buckets. The storage policy may be de ned as
follows:
{ it is stored in 2 di erent countries,
{ it has 3 copies per each country,
{ it should be stored on SSD drives only.</p>
      <p>This informal description should be represented as sets of SELECT(r, type)
and FILTER(type:value, op) operations. The total replication factor is obtained
by multiplying all the factors of each SELECT(r, type) replication. The nal
statement must always be SELECT(X, Node) (see Table 1).
FILTER ( [ Eu ] \ [ Storage:SSD ] ) [
(Storage:SSD, equal) ( [ Ru ] \ [ Storage:SSD ] )</p>
      <sec id="sec-2-1">
        <title>SELECT(3, Node)</title>
      </sec>
      <sec id="sec-2-2">
        <title>Placement group result</title>
        <p>[[ Node 3, Node 4,
Node 5, Node 6 ],
[ Node 7, Node 8,
Node 9, Node 10 ]]
[[ Node 4, Node 5,
Node 6 ],
[ Node 7, Node 8,</p>
        <p>Node 9, Node 10 ]]
( [N1; N2; N3] 2
( [ EU ] \ [ Storage:SSD ] ) ) [ [[ Node 4, Node 5, Node 6 ],
( [N4; N5; N6] 2 [ Node 8, Node 9, Node 10 ]]
( [ Ru ] \ [ Storage:SSD ] ) )</p>
        <p>Thus, the subgraph of the network map and the 6 nodes have been obtained
(see Fig. 2), where the object should be placed on to meet the placement policy
requirements. The result of the placement function operation is a subgraph of
the network map { the Placement group { leaves of which are a deterministic
and consistent list of the storage nodes. If the storage policy, salt and network
map are known the Placement group can be retrieved without referring to a
third party or storing \object-storage node" pairs.
2.4</p>
        <p>Container
In order to place objects in the system a user needs to de ne a container. The
container has the following elds: storage policy (placement rule and redundancy
factor), uuid, owner and maximum capacity. The container de nes the subgraph
of the network map. The approach, where a complete network map, which
operates with all the connected nodes, plays the role of an initial graph, can impose
additional costs as the network increases. The allocation of limited space within
the network map (subgraph), de ned by the container, allows to do the following:
root
Loc: EU</p>
        <p>Storage: SSD</p>
        <p>Loc: RU</p>
        <p>City: Milan</p>
        <p>To form the container`s subgraph, the replication factor in each SELECT (r,
type) call is increased by the redundancy factor (Kr). The container uuid is used
as salt for selection in the placement function.</p>
        <p>For ease of presentation, consider the example, where Kr = 2 see Table 2.</p>
      </sec>
      <sec id="sec-2-3">
        <title>Source Placement rule Placement function result Salt</title>
        <sec id="sec-2-3-1">
          <title>Network Map SELECT(2 Kr, Loc) [[[NU1S; ,NE2;UN, 3R; UN,4]J,a ]</title>
        </sec>
      </sec>
      <sec id="sec-2-4">
        <title>Container salt</title>
        <p>SELECT(2 Kr, node) [[NN59;; NN610;;NN71;1N; N8],12],</p>
        <p>[N13; N14; N15; N16]]</p>
        <p>As a result, a number of nodes is obtained that can be represented as a
subgraph of the network map. When forming the container, it is possible to
approximately estimate its capacity. To do so, the weights of the nodes might
be used, depending on their capacity. The weight of the selected nodes has to</p>
      </sec>
      <sec id="sec-2-5">
        <title>Source Placement rule Placement function result Salt</title>
        <sec id="sec-2-5-1">
          <title>Container SSEELLEECCTT((22,, nLoodc)e) [[ [UNS,2,JaN]4 ], [ N15, N16 ] ] bHeaisnhg opflatcheedobject</title>
          <p>correspond to the container capacity declared. The object is placed into the
container by using the placement function, where the hash of the object being
placed is used as salt (see Table 3).</p>
          <p>Network map</p>
          <p>Container
root
Loc: US</p>
          <p>Loc: EU</p>
          <p>Loc: Ca
Loc: RU</p>
          <p>Loc: Ja</p>
          <p>The highlighted buckets are the Placement group subgraph for the object. (see
Fig. 3).
3</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Results</title>
      <p>The paper proposes a novel approach to scalable data placement in decentralized
distributed storage systems. Using a subset of network map, storage policy rules
for object placement, and a Rendezvous hashing for a node selection allow to
control an object location and a minimal data movement in case of storage nodes
failures. Metrics comparison with the existing models are the subjects of further
research.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>FileCoin</given-names>
            <surname>Homepage</surname>
          </string-name>
          , https:// lecoin.io/.
          <source>Last accessed 30 Jan 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>NKN</given-names>
            <surname>Homepage</surname>
          </string-name>
          , https://www.nkn.org/.
          <source>Last accessed 30 Jan 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <article-title>3. "IPFS - content addressed, versioned, p2p le system"</article-title>
          , https://github.com/ipfs/ipfs/blob/master/papers/ipfs-cap2pfs/
          <article-title>ipfs-p2p- lesystem</article-title>
          .pdf.
          <source>Last accessed 30 Jan 2019</source>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Bogatyrev</surname>
            ,
            <given-names>V.A.</given-names>
          </string-name>
          :
          <article-title>Exchange of Duplicated Computing Complexes in Fault tolerant Systems</article-title>
          .
          <source>In: Automatic Control and Computer Sciences</source>
          , vol.
          <volume>45</volume>
          , no.
          <issue>5</issue>
          , pp.
          <fpage>268</fpage>
          -
          <lpage>276</lpage>
          (
          <year>2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Weil</surname>
            ,
            <given-names>S.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brandt</surname>
            ,
            <given-names>S.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miller</surname>
            ,
            <given-names>E.L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maltzahn</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>CRUSH: Controlled, Scalable, Decentralized Placement of Replicated Data</article-title>
          .
          <source>In: ACM IEEE SC 2006 Conference (SC'06)</source>
          , (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Weil</surname>
            ,
            <given-names>S. A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Brandt</surname>
            ,
            <given-names>S. A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Miller</surname>
            ,
            <given-names>E. L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Long</surname>
            ,
            <given-names>D. D. E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maltzahn</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Ceph: A scalable, highperformance distributed le system</article-title>
          .
          <source>In Proceedings of the 7th Symposium on Operating Systems Design and Implementation</source>
          (OSDI), (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Kallahalla</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Riedel</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Swaminathan</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fu</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Plutus: Scalable Secure File Sharing on Untrusted Storage</article-title>
          .
          <source>In Proceedings of the 2Nd USENIX Conference on File and Storage Technologies</source>
          ,
          <source>FAST '03</source>
          , pages
          <fpage>29</fpage>
          {
          <fpage>42</fpage>
          , Berkeley, CA, USA,
          <year>2003</year>
          . USENIX Association, (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Miller</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Xia</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Croman</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shi</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Song</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>The Honey Badger of BFT Protocols</article-title>
          . In Conference: the
          <source>2016 ACM SIGSAC Conference</source>
          , (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Ongaro</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ousterhout</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>In search of an understandable consensus algorithm</article-title>
          .
          <source>In Proc. USENIX Annual Technical Conference</source>
          , pp.
          <volume>305</volume>
          {
          <fpage>320</fpage>
          , (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>