Changeset 211dc60 in trunk


Ignore:
Timestamp:
2017-06-05T22:26:46Z (8 years ago)
Author:
meejah <meejah@…>
Branches:
master
Children:
adb9a98
Parents:
17cff7a
git-author:
Brian Warner <warner@…> (2016-11-15 00:24:26)
git-committer:
meejah <meejah@…> (2017-06-05 22:26:46)
Message:

updates from summit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified docs/specifications/servers-of-happiness.rst

    r17cff7a r211dc60  
    109109We calculate share placement like so:
    110110
    111 1. Query 2n servers for existing shares.
     1110. Start with an ordered list of servers. Maybe *2N* of them.
    112112
    113 2. Construct a bipartite graph of readonly servers to shares, where an edge
    114 exists between an arbitrary readonly server s and an arbitrary share n if and only if s
    115 holds n.
     1131. Query all servers for existing shares.
    116114
    117 3. Calculate the maximum matching graph of the bipartite graph. The maxmum matching
    118 is the matching which contains the largest possible number of edges.
     1152. Construct a bipartite graph G1 of *readonly* servers to pre-existing
     116   shares, where an edge exists between an arbitrary readonly server S and an
     117   arbitrary share T if and only if S currently holds T.
    119118
    120 4. Construct a bipartite graph of servers to shares, removing any servers and
    121 shares used in the maximum matching graph from step 3. Let an edge exist between
    122 server s and share n if and only if s holds n.
     1193. Calculate a maximum matching graph of G1 (a set of S->T edges that has or
     120   is-tied-for the highest "happiness score"). There is a clever efficient
     121   algorithm for this, named "Ford-Fulkerson". There may be more than one
     122   maximum matching for this graph; we choose one of them arbitrarily, but
     123   prefer earlier servers. Call this particular placement M1. The placement
     124   maps shares to servers, where each share appears at most once, and each
     125   server appears at most once.
    123126
    124 5. Calculate the maximum matching graph of the new graph.
     1274. Construct a bipartite graph G2 of readwrite servers to pre-existing
     128   shares. Then remove any edge (from G2) that uses a server or a share found
     129   in M1. Let an edge exist between server S and share T if and only if S
     130   already holds T.
    125131
    126 6. Construct a bipartite graph of servers to share, removing any servers and
    127 shares used in the maximum matching graphs from steps 3 and 5. Let an edge exist
    128 between server s and share n if and only if s can hold n.
     1325. Calculate a maximum matching graph of G2, call this M2, again preferring
     133   earlier servers.
    129134
    130 7. Calculate the maximum matching graph of the new graph.
     1356. Construct a bipartite graph G3 of (only readwrite) servers to shares. Let
     136   an edge exist between server S and share T if and only if S already has T,
     137   or *could* hold T (i.e. S has enough available space to hold a share of at
     138   least T's size). Then remove (from G3) any servers and shares used in M1
     139   or M2 (note that we retain servers/shares that were in G1/G2 but *not* in
     140   the M1/M2 subsets)
    131141
    132 8. Renew the shares on their respective servers from steps 3
    133 and 5.
     1427. Calculate a maximum matching graph of G3, call this M3, preferring earlier
     143   servers. The final placement table is the union of M1+M2+M3.
    134144
    135 9. Place share n on server s if an edge exists between s and n in the
    136 maximum matching graph from step 7.
     1458. Renew the shares on their respective servers from M1 and M2.
    137146
    138 10. If any placements from step 7 fail, remove the server from the set of possible
    139 servers and regenerate the matchings.
     1479. Upload share T to server S if an edge exists between S and T in M3.
    140148
     14910. If any placements from step 9 fail, mark the server as read-only. Go back
     150    to step 2 (since we may discover a server is/has-become read-only, or has
     151    failed, during step 9).
     152
     153Rationale (Step 4): when we see pre-existing shares on read-only servers, we
     154prefer to rely upon those (rather than the ones on read-write servers), so we
     155can maybe use the read-write servers for new shares. If we picked the
     156read-write server's share, then we couldn't re-use that server for new ones
     157(we only rely upon each server for one share, more or less).
    141158
    142159Properties of Upload Strategy of Happiness
Note: See TracChangeset for help on using the changeset viewer.