Removed notes.

This commit is contained in:
Michael Whittaker 2021-02-04 20:54:36 -08:00
parent 07a25f6ca9
commit cbf973e082
7 changed files with 0 additions and 431 deletions

View file

@ -1,20 +0,0 @@
\documentclass[12pt]{article}
\usepackage[margin=1in]{geometry}
\usepackage{pervasives}
\newcommand{\dual}[1]{#1^d}
\begin{document}
\begin{center}
{\Large Quorum Systems}
\today{}
\end{center}
{\input{sections/quorum_systems.tex}}
{\input{sections/read_write_quorum_systems.tex}}
{\input{sections/brainstorm.tex}}
\bibliographystyle{plain}
\bibliography{references}
\end{document}

View file

@ -1,184 +0,0 @@
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{environ}
\usepackage{etoolbox}
\usepackage{mathrsfs}
\usepackage{mathtools}
\usepackage{tcolorbox}
\usepackage{tikz}
\usepackage{xcolor}
\tcbuselibrary{breakable}
\tcbuselibrary{skins}
% A pretty color palette taken from https://flatuicolors.com/palette/defo. To
% see a preview of the different colors, use the \showcolors command below.
\definecolor{flatdarkgray}{HTML}{7F8C8D}
\definecolor{flatgray}{HTML}{BDC3C7}
\definecolor{flatred}{HTML}{C0392B}
\definecolor{flatorange}{HTML}{D35400}
\definecolor{flatyellow}{HTML}{F39C12}
\definecolor{flatdenim}{HTML}{2C3E50}
\definecolor{flatpurple}{HTML}{8E44AD}
\definecolor{flatblue}{HTML}{2980B9}
\definecolor{flatgreen}{HTML}{27AE60}
\definecolor{flatcyan}{HTML}{16A085}
\definecolor{flatdarkgrayalt}{HTML}{95A5A6}
\definecolor{flatgrayalt}{HTML}{ECF0F1}
\definecolor{flatredalt}{HTML}{E74C3C}
\definecolor{flatorangealt}{HTML}{E67E22}
\definecolor{flatyellowalt}{HTML}{F1C40F}
\definecolor{flatdenimalt}{HTML}{34495E}
\definecolor{flatpurplealt}{HTML}{9B59B6}
\definecolor{flatbluealt}{HTML}{3498DB}
\definecolor{flatgreenalt}{HTML}{2ECC71}
\definecolor{flatcyanalt}{HTML}{1ABC9C}
\definecolor{flatbrown}{HTML}{836953}
\newcommand{\showcolors}{%
\begin{center}
\begin{tikzpicture}
\tikzstyle{swatch}=[minimum width=3cm, minimum height=0.5cm, y=0.5cm]
\node[swatch, fill=flatdarkgray] at (0, 9) {\texttt{flatdarkgray}};
\node[swatch, fill=flatgray] at (0, 8) {\texttt{flatgray}};
\node[swatch, fill=flatred] at (0, 7) {\texttt{flatred}};
\node[swatch, fill=flatorange] at (0, 6) {\texttt{flatorange}};
\node[swatch, fill=flatyellow] at (0, 5) {\texttt{flatyellow}};
\node[swatch, fill=flatdenim] at (0, 4) {\texttt{flatdenim}};
\node[swatch, fill=flatpurple] at (0, 3) {\texttt{flatpurple}};
\node[swatch, fill=flatblue] at (0, 2) {\texttt{flatblue}};
\node[swatch, fill=flatgreen] at (0, 1) {\texttt{flatgreen}};
\node[swatch, fill=flatcyan] at (0, 0) {\texttt{flatcyan}};
\node[swatch, fill=flatdarkgrayalt] at (3, 9) {\texttt{flatdarkgrayalt}};
\node[swatch, fill=flatgrayalt] at (3, 8) {\texttt{flatgrayalt}};
\node[swatch, fill=flatredalt] at (3, 7) {\texttt{flatredalt}};
\node[swatch, fill=flatorangealt] at (3, 6) {\texttt{flatorangealt}};
\node[swatch, fill=flatyellowalt] at (3, 5) {\texttt{flatyellowalt}};
\node[swatch, fill=flatdenimalt] at (3, 4) {\texttt{flatdenimalt}};
\node[swatch, fill=flatpurplealt] at (3, 3) {\texttt{flatpurplealt}};
\node[swatch, fill=flatbluealt] at (3, 2) {\texttt{flatbluealt}};
\node[swatch, fill=flatgreenalt] at (3, 1) {\texttt{flatgreenalt}};
\node[swatch, fill=flatcyanalt] at (3, 0) {\texttt{flatcyanalt}};
\end{tikzpicture}
\end{center}
}
% New theorem environments.
\newtheorem{theorem}{Theorem}
\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{benchmark}{Benchmark}
\newtheorem{example}{Example}
\newtheorem{invariant}{Invariant}
% Toggleable TODOs.
\newtoggle{showtodos}
\toggletrue{showtodos}
% \togglefalse{showtodos}
\newcommand{\TODO}[2][]{%
\iftoggle{showtodos}{{\textcolor{blue}{\textbf{TODO(#1): #2}}}}{}%
}
% Toggleable notes.
\newtoggle{shownotes}
\toggletrue{shownotes}
% \togglefalse{shownotes}
\newcommand{\NOTE}[2][]{%
\iftoggle{shownotes}{{\textcolor{red}{NOTE(#1): #2}}}{}%
}
% Labels and references. To label a figure use the \figlabel command, to label
% a lemma, use the \lemlabel command, etc. Similarly, use the \figref, lemref,
% etc. commands to reference these labels. For example:
%
% \begin{figure}
% % ...
% \caption{A nice figure}\figlabel{MyNiceFigure}
% \end{figure}
%
% Refer to \figref{MyNiceFigure} for a nice figure.
%
% Toggle showlabels to show or hide all labels.
\newtoggle{showlabels}
% \toggletrue{showlabels}
\togglefalse{showlabels}
\newcommand{\genericlabel}[2]{%
\label{#1:#2}%
\iftoggle{showlabels}{\textcolor{flatdarkgray}{\texttt{[#2]}}}{}%
}
\newcommand{\algolabel}[1]{\genericlabel{alg}{#1}}
\newcommand{\algoref}[1]{Algorithm~\ref{alg:#1}}
\newcommand{\applabel}[1]{\genericlabel{app}{#1}}
\newcommand{\appref}[1]{Appendix~\ref{app:#1}}
\newcommand{\benchlabel}[1]{\genericlabel{bench}{#1}}
\newcommand{\benchref}[1]{Benchmark~\ref{bench:#1}}
\newcommand{\clmlabel}[1]{\genericlabel{clm}{#1}}
\newcommand{\clmref}[1]{Claim~\ref{clm:#1}}
\newcommand{\eqnlabel}[1]{\genericlabel{eqn}{#1}}
\newcommand{\eqnref}[1]{\eqref{eqn:#1}}
\newcommand{\invlabel}[1]{\genericlabel{inv}{#1}}
\newcommand{\invref}[1]{Invariant~\ref{inv:#1}}
\newcommand{\examplelabel}[1]{\genericlabel{exa}{#1}}
\newcommand{\exampleref}[1]{Example~\ref{exa:#1}}
\newcommand{\figlabel}[1]{\genericlabel{fig}{#1}}
\newcommand{\figref}[1]{Figure~\ref{fig:#1}}
\newcommand{\lemlabel}[1]{\genericlabel{lem}{#1}}
\newcommand{\lemref}[1]{Lemma~\ref{lem:#1}}
\newcommand{\linelabel}[1]{\genericlabel{line}{#1}}
\newcommand{\lineref}[1]{line~\ref{line:#1}}
\newcommand{\Lineref}[1]{Line~\ref{line:#1}}
\newcommand{\lstlabel}[1]{\genericlabel{lst}{#1}}
\newcommand{\lstref}[1]{Listing~\ref{lst:#1}}
\newcommand{\seclabel}[1]{\genericlabel{sec}{#1}}
\newcommand{\secref}[1]{Section~\ref{sec:#1}}
\newcommand{\appendixlabel}[1]{\genericlabel{appendix}{#1}}
\newcommand{\appendixref}[1]{Appendix~\ref{appendix:#1}}
\newcommand{\tablabel}[1]{\genericlabel{tab}{#1}}
\newcommand{\tabref}[1]{Table~\ref{tab:#1}}
\newcommand{\thmlabel}[1]{\genericlabel{thm}{#1}}
\newcommand{\thmref}[1]{Theorem~\ref{thm:#1}}
% Surrounding symbols.
\DeclarePairedDelimiter{\parens}{(}{)}
\DeclarePairedDelimiter{\set}{\{}{\}}
\DeclarePairedDelimiterX{\setst}[2]{\{}{\}}{#1 \,\delimsize|\, #2}
\DeclarePairedDelimiter{\brackets}{[}{]}
\DeclarePairedDelimiterX{\pfrac}[2]{(}{)}{\frac{#1}{#2}}
\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil}
\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor}
% Symbols and abbreviations.
\newcommand{\nats}{\mathbb{N}}
\newcommand{\ints}{\mathbb{Z}}
\newcommand{\rats}{\mathbb{Q}}
\newcommand{\reals}{\mathbb{R}}
\newcommand{\complexes}{\mathbb{C}}
\newcommand{\partialto}{\rightharpoonup}
% https://tex.stackexchange.com/a/74132
\newcommand{\defeq}{\stackrel{\mathclap{\mbox{\normalfont \tiny def}}}{=}}
% Misc.
\newcommand{\defword}[1]{\textbf{\textcolor{flatdenim}{#1}}}
% Tech report environment.
%
% If you're writing a paper and there's too much content, you might want to
% move some content out of the paper and into the technical report version of
% the paper. To do this, you can put the content in the techreport environment
% like this:
%
% This text will appear in the paper and tech report.
% \begin{techreport}
% This text will only appear in the tech report.
% \end{techreport}
%
% When the techreportenabled toggle is enabled, the tech report content will be
% shown. When the toggle is disabled, the tech report content will be hidden.
% Moreover, when the toggle is enabled, the tech report content will be shown
% with a red bar on its left margin to make it easier for readers to figure out
% what is new in the tech report.
\newtoggle{techreportenabled}
\toggletrue{techreportenabled}
\togglefalse{techreportenabled}

View file

@ -1,36 +0,0 @@
@article{ibaraki1993theory,
title={A theory of coteries: Mutual exclusion in distributed systems},
author={Ibaraki, Toshihide and Kameda, Tiko},
journal={IEEE Transactions on Parallel and Distributed Systems},
volume={4},
number={7},
pages={779--794},
year={1993},
publisher={IEEE}
}
@article{naor1998load,
title={The load, capacity, and availability of quorum systems},
author={Naor, Moni and Wool, Avishai},
journal={SIAM Journal on Computing},
volume={27},
number={2},
pages={423--447},
year={1998},
publisher={SIAM}
}
@article{neilsen1991general,
title={A general method to define quorums},
author={Neilsen, Mitchell and Mizuno, Masaaki and Raynal, Michel},
year={1991}
}
@article{vukolic2013origin,
title={The origin of quorum systems},
author={Vukoli{\'c}, Marko and others},
journal={Bulletin of EATCS},
volume={2},
number={101},
year={2013}
}

View file

@ -1,61 +0,0 @@
\begin{itemize}
\item
Recursive quorum systems are all non-dominated bicoteries. We can view the
tree as a way to generate an arbitrary set of read quorums. Then we just
bubble down dual to compute write quorums.
\item
The theory of coteries and decomposition has been very well studied. The
one thing that seems a little less studied is the relationship between load
and bicoteries. Can we find a nice way to find an optimal load bicoterie?
This is probably hard, but maybe something about bicoteries makes this
easier than for coteries.
\item
If we wanted to develop a library for bicoteries, we would like to (a)
allow people to form arbitrary bicoteries, (b) compute an optimal strategy
for a bicotier, (c) efficiently pick quorums based on the strategy, and (d)
efficiently determine if something is a superset of a quorum. We can do (a)
with a library of dual-able operators like or and and along with some
builtins for things like grids. (b) we can use LP with specializations. We
might have to do something smart to get ``good' strategies (e.g.,
balanced). For (d), we can just evaluate the tree or its dual or maybe use
something more efficient like BDDs? For (c) I'm not completely sure. For
some quorum systems, the number of quorums is exponential, so we wouldn't
want to represent them explicitly. Ideally we could also find an optimal
load bicoterie, but that's probably not going to happen. The library can
also help compute fault tolerance and maybe load under failure and whatnot.
How to compute fault tolerance with duplicates?
\item
Maybe we can run some practical experiments to show how important a good
bicoterie is. Maybe we'll find it's not that important.
\item
Is there anything smart about reconfiguring or changing coteries on the
fly? For example, grids are not good to go from 6 to 7 nodes. With
bicoteries, we probably want to adjust on the fly as the read and write
ratios change.
\item
Maybe we can introduce the idea that not all nodes have the same capacity.
Some have higher load than others. We could bake that into the nodes like,
a = Node("a", cap=1000).
\item
Maybe some nodes are also co-located, so the fault tolerance is a little
different. How can we compute fault tolerance with duplicates anyway?
\item
Just for fun, we could probably cross compile to javascript and show how to
subsume other quorum systems with our library. We should be able to subsume
all if we use duplicates.
\end{itemize}
\TODO[michael]{Prove that for every read-write quorum system, there exists a coterie with at least as good load.}
\TODO[michael]{The above shows that the optimal load quorum system is a non-dominated coterie. Maybe this is useful? We can generate every NDC?}
\TODO[michael]{Understand how domination relates to subsumption.}
\TODO[michael]{Understand dual-major, dual-minor, and self-dual.}
\TODO[michael]{Extend these notions to read-write quorums.}
\TODO[michael]{Enumerate all read-write quorums on four nodes and see the ones we can and can't subsume.}
\TODO[michael]{Prove that if I have the read quorums R, then the write quorums are bar(R).}

View file

@ -1,80 +0,0 @@
\section{Quorum Systems}
Given a set $X = \set{x_1, \ldots, x_n}$, a \defword{quorum system} over $X$ is
a set $Q = \set{q_1, \ldots, q_m}$ of subsets of $X$, called \defword{quorums},
such that every pair of quorums intersect. That is, for every $q_1, q_2 \in
Q$, $q_1 \cap q_2 \neq \emptyset$.
%
A quorum system $Q$ is a \defword{coterie} if there does not exist quorums
$q_1, q_2 \in Q$ such that $q_1 \subset q_2$. In other words, a coterie is a
quorum system that does not contain some quorum $q_1$ that is a strict subset
of some other quorum $q_2$.
%
Let $P, Q$ be two quorum systems over the same set $X$. $P$ \defword{dominates}
$Q$, denoted $P > Q$, if $P \neq Q$ and for every $q \in Q$, there exists some
$p \in P$ such that $p \subseteq q$. A quorum system $Q$ is \defword{dominated}
if there exists some quorum system $P$ that dominates it.
We can associate every quorum system $Q$ with a monotone boolean function
$f_Q$. For example, the majority quorum system $Q = \set{\set{a, b}, \set{b,
c}, \set{a, c}}$ corresponds to the function $f_Q = ab + bc + ac$. The prime
implicants of the boolean function correspond to the minimal sets of the quorum
system. We say $f \leq g$ if for every $\vec{x}$, $f(\vec{x}) \implies
g(\vec{x})$. In other words, $f \leq g$ if $\setst{\vec{x}}{g(\vec{x})}
\subseteq \setst{\vec{x}}{f(\vec{x})}$. Consider two quorum systems $Q_1$ and
$Q_2$, $Q_1$ dominates $Q_2$ if and only if $f_{Q_2} < f_{Q_1}$.
Let the dual $\dual{f}$ of $f$ be $\dual{f}(x) = \bar{f}(\bar{x})$. $\dual{f}$
is the function we get if we swap and with or. Note that $\dual{f}$ corresponds
to the sets that intersect every set in $f$. We say a monotone function $f$
is \defword{dual-minor} if $f \leq \dual{f}$, \defword{dual-major} if $f \geq
\dual{f}$, and \defword{self-dual} if $f = \dual{f}$. A function $f$
corresponds to a quorum system if and only if $f$ is dual-minor. A quorum
system $Q$ is non-dominated if and only if $f_Q$ is self-dual. Every
non-dominated coterie can be represented as a composition of the simple
majority function (with duplicates). Every coterie can be represented by a
composition of and, or, and majority. \cite{ibaraki1993theory} also talks about
when a function can be decomposed without duplicates as well as other things
involving decomposition. \cite{neilsen1991general} talks about composition as
well, and even includes examples for things like grids and trees.
Let $\sigma: Q \to [0, 1]$ be a discrete probability distribution over the
quorums of $Q$ (i.e., $\sum_{q \in Q} \sigma(q) = 1$). We call $\sigma$ a
\defword{strategy}. Intuitively, $\sigma$ is a strategy to pick quorums at
random. We have the following definitions.
\begin{align*}
l_\sigma(x) &\defeq \sum_{\setst{q \in Q}{x \in q}} \sigma(q) \\
L_\sigma(Q) &\defeq \max_{x \in X} l_\sigma(x) \\
L(Q) &\defeq \min_\sigma L_\sigma(Q)
\end{align*}
$l_\sigma(x)$ is the load on $x$ given some strategy $\sigma$. $L_\sigma(Q)$ is
the load on most loaded element $x$. $L(Q)$ is the \defword{load} of the best
possible strategy. Intuitively, the lower the load of a quorum system, the
higher the throughput it can support.
\begin{example}
Consider the majority quorum system $Q = \set{\set{a, b}, \set{a, c}, \set{b,
c}}$ on elements $X = \set{a, b, c}$. Let $\sigma(\set{a, b}) =
\sigma(\set{a, c}) = 0.5$ and $\sigma(\set{b, c}) = 0$.
\begin{align*}
l_\sigma(a) &= \sigma(\set{a, b}) + \sigma(\set{a, c}) = 0.5 + 0.5 = 1 \\
l_\sigma(b) &= \sigma(\set{a, b}) + \sigma(\set{b, c}) = 0.5 + 0 = 0.5 \\
l_\sigma(c) &= \sigma(\set{a, c}) + \sigma(\set{b, c}) = 0.5 + 0 = 0.5 \\
L_\sigma(Q) &= \max(1, 0.5, 0.5) = 1
\end{align*}
The load of $Q$ with respect to $\sigma$ is 1, but the load $L(Q)$ is not 1
because $\sigma$ is not an optimal strategy. If we instead choose
$\sigma_{\text{opt}}(-) = \frac{1}{3}$, the load is reduced to $\frac{2}{3}$
which is optimal.
\end{example}
\cite{naor1998load} shows how to use a linear program to compute load.
\cite{naor1998load} also proves that if a quorum system dominates another, it
has lower or equal load. This shows that there always is a non-dominated
coterie that has the lowest possible load. If we're trying to optimize for
load, this tells us that we limit ourselves to non-dominated coteries.
The \defword{resilience} or \defword{fault tolerance} of a quorum system $Q$ is
the largest number $f$ such that for every subset $F \subseteq X$ with $|F| =
f$, there still exists some quorum $q \in Q$ such that $q \cap F = \emptyset$.
Intuitively, a quorum system has fault tolerance $f$ if we can fail an
arbitrary set of $f$ elements and still have some quorum left.

View file

@ -1,50 +0,0 @@
\section{Read-Write Quorum Systems}
Given a set $X = \set{x_1, \ldots, x_n}$, a \defword{read-write quorum system}
over $X$ is a pair of sets $Q = (R, W)$ of subsets of $X$ such that every $r
\in R$ intersects every $w \in W$. The elements $r \in R$ are called
\defword{read quorums}, and the elements $w \in W$ are called \defword{write
quorums}. Read-write quorum systems are also called bicoteries.
%
$(R, W)$ is a coterie if both $R$ and $W$ are minimal. $(R_1, W_1)$ dominates
$(R_2, W_2)$ if $R_1$ dominates $R_2$ and $W_1$ dominates $W_2$. Again, we can
view a read-write quorum system $(R, W)$ as a pair of monotone functions $f_R$
and $f_W$. $(f_R, f_W)$ is a read-write quorum sytem if $f_R \leq \dual{f_W}$.
It is a non-dominated coterie if $f_R = \dual{f_W}$. Thus, to generate a
non-dominated bicoterie, let $f_R$ be an arbitrary set of quorums and let $f_W$
be $\dual{f_R}$.
Let $\sigma_R: R \to [0, 1]$ and $\sigma_W: W \to [0, 1]$ be a discrete
probability distribution over the read and write quorums of $Q$. We call
$\sigma$ a \defword{strategy}. Let $0 \leq p_r \leq 1$ be the probability of
performing a read and $p_w = 1 - p_r$ be the probability of performing a write.
We have the following definitions.
\begin{align*}
l_{\sigma,p_r,p_w}(x)
&\defeq p_r \cdot \parens*{\sum_{\setst{r \in R}{x \in r}} \sigma_R(r)} +
p_w \cdot \parens*{\sum_{\setst{w \in W}{x \in w}} \sigma_W(w)} \\
L_{\sigma,p_r,p_w}(Q) &\defeq \max_{x \in X} l_{\sigma,p_r,p_w}(x) \\
L_{p_r,p_w}(Q) &\defeq \min_\sigma L_{\sigma,p_r,p_w}(Q)
\end{align*}
$l_{\sigma,p_r,p_w}(x)$ is the load on $x$ given some strategy $\sigma$ and
some workload $p_r,p_w$. $L_{\sigma,p_r,p_w}(Q)$ is the load on most loaded
element $x$. $L{p_r,p_w}(Q)$ is the \defword{load} of the best possible
strategy.
The \defword{read resilience} or \defword{read fault tolerance} of a quorum
system $Q$ is the largest number $f_r$ such that for every subset $F \subseteq
X$ with $|F| = f_r$, there still exists some read quorum $r \in R$ such that $r
\cap F = \emptyset$.
%
The \defword{write resilience} or \defword{write fault tolerance} of a quorum
system $Q$ is the largest number $f_w$ such that for every subset $F \subseteq
X$ with $|F| = f_w$, there still exists some write quorum $w \in W$ such that $w
\cap F = \emptyset$.
%
The \defword{resilience} or \defword{fault tolerance} of a quorum system is the
minimum of its read resilience and write resilience. Intuitively, a quorum
system has read fault tolerance $f_r$ if we can fail an arbitrary set of $f_r$
elements and still have some read quorum left; a quorum system has write fault
tolerance $f_w$ if we can fail an arbitrary set of $f_w$ elements and still
have some write quorum left; and a quorum system has fault tolerance $f$ if we
can fail an arbitrary set of $f$ elements and still have some read quorum and
some write quorum left.