-
Notifications
You must be signed in to change notification settings - Fork 126
/
main.tex
271 lines (222 loc) · 7.61 KB
/
main.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
% For book printing, change to:
% \documentclass[11pt,twoside]{report}
\documentclass[11pt]{report}
\usepackage{suthesis-2e-mod}
%% draw grid on page, useful for debugging margins
%\usepackage{pagegrid}
%\pagegridsetup{top-left,step=.5in}
\usepackage{epsfig}
\usepackage[hyphens]{url}
\usepackage{paralist} % provides \compactitem
\usepackage{times} % use times font
\usepackage{comment} % provide \begin{comment}...\end{comment}
\usepackage{xcolor} % commands for changing colors
\usepackage{lastpage} % for total number of pages
\usepackage[normalem]{ulem} % for \sout{to strike out text}
\usepackage{stfloats} % something to do with placement of
% two-column tables
\usepackage{etoolbox} % for conditional toggles
\usepackage[pdfauthor={Diego Ongaro},
pdftitle={Consensus: Bridging Theory and Practice},
pdfsubject={Stanford University Ph.D. Dissertation},
pagebackref,colorlinks=true,
linkcolor=blue!50!black!90,
citecolor=blue!50!black!90,
urlcolor=blue!50!black!90,
bookmarks]{hyperref} % for clickable links in PDF
\usepackage{multicol}
\usepackage{tabularx} % for easier tables with wrapped text
\usepackage{tabulary} % for easier tables with wrapped text
\usepackage{relsize} % for \mathlarger
\usepackage{amssymb}
\usepackage{amsmath} % Needed to enable unnumbered equations (\begin{equation*})
\usepackage{placeins} % provides \FloatBarrier
\usepackage{siunitx} % typesetting units after numbers
\sisetup{range-phrase=--,
range-units=single,
binary-units,
input-decimal-markers=.,
group-separator={,},
group-minimum-digits=4}
\usepackage{mathptmx} % use times in math mode
\frenchspacing
\usepackage{caption}
% make links black for book printing
\ifbool{@twoside}{\hypersetup{hidelinks}}{}
% for subfigure environment, where refs look like Figure 9.8(c)
\usepackage[labelformat=simple]{subcaption}
\renewcommand\thesubfigure{(\alph{subfigure})}
\newcommand\mazieres{Mazi\`{e}res}
\title{Consensus: Bridging Theory and Practice}
\author{Diego Ongaro}
\principaladviser{John Ousterhout}
\firstreader{Mendel Rosenblum}
\secondreader{David \mazieres}
\submitdate{August 2014}
\def\thesiscopyrightpage{%
\urlstyle{same}
\null\vfill
\begin{center}
\large \copyright\ 2014 Diego Ongaro
\vspace{.75in}\\
\parbox{1.5in}{
\includegraphics[scale=1]{cc-by}
}
\parbox{3.5in}{
This work is licensed under the Creative Commons \\
Attribution 4.0 International License.\\
\url{http://creativecommons.org/licenses/by/4.0/}
}
\vspace{.75in}
\parbox{5.5in}{
This dissertation expands on a paper written by Diego Ongaro and John
Ousterhout entitled \emph{In Search of an Understandable Consensus
Algorithm}~\cite{raftatc}. Most of the paper's content is included in
some form in this dissertation. It is reproduced in this dissertation
and licensed under the Creative Commons Attribution license with
permission from John Ousterhout.
}
\vspace{1in}
This dissertation is distributed by Stanford University online:
\url{http://purl.stanford.edu/qr033xr6097}\\
The \LaTeX{} source files used to create this document are
available online:
\url{https://github.com/ongardie/dissertation/}
\end{center}
\vfill\newpage\urlstyle{tt}}
\long\def\signature#1{%
\begin{flushright}
\begin{minipage}{5in}
\parindent=0pt
I certify that I have read this dissertation and that, in my opinion,
it is fully adequate in scope and quality as a dissertation for the degree
of Doctor of Philosophy.
\par
\vspace{3ex}
\hbox to 5in{\hfil\begin{tabular}{@{}l@{}}\textbf{#1}\end{tabular}}
\end{minipage}
\end{flushright}}
\long\def\ucgssignature#1{%
\begin{flushright}
\begin{minipage}{5in}
\parindent=0pt
Approved for the Stanford University Committee on Graduate Studies.
\par
\vspace{3ex}
\hbox to 5in{\hfil\begin{tabular}{@{}l@{}}\textbf{#1}\end{tabular}}
\end{minipage}
\end{flushright}}
\def\signaturepage{%
\signature{John Ousterhout, Principal Adviser}
\vspace{.5in}
\signature{Mendel Rosenblum}
\vspace{.5in}
\signature{David \mazieres}
\vspace{.5in}
\ucgssignature{Patricia J. Gumport, Vice Provost for Graduate Education}
\vfill
\begin{center}
\emph{This signature page was generated electronically. An original signed
hard\\ copy of the signature page is on file in Stanford University
Archives.}
\end{center}
}
\newcommand\name{Raft}
\newcommand\red[1]{\textcolor{red}{#1}} % For newly proposed text
\newcommand\redstrike[1]{\red{\sout{#1}}} % To strike out text
\newcommand\blue[1]{\textcolor{blue}{XXX- #1}} % For comments
\newcommand{\Ex}{\mathop{\bf E\/}} % expected value
\hyphenation{LogCabin} % force no hyphens in 'LogCabin'
\hyphenation{RAMCloud} % force no hyphens in 'RAMCloud'
\hyphenation{LevelDB} % force no hyphens in 'LevelDB'
\hyphenation{Append-Entries} % break 'AppendEntries' between words
\hyphenation{Request-Vote} % break 'RequestVote' between words
% Adjust caption display: bold figure name, slight margins
\usepackage{caption}
\captionsetup{labelfont=bf, margin=10pt}
% Spacing between footnotes and text.
\setlength{\skip\footins}{6ex}
% Footnotes with no number.
\makeatletter
\def\blfootnoteindented{\xdef\@thefnmark{}\@footnotetext}
\newcommand\blfootnote[1]{\blfootnoteindented{\hspace{-2.1em} #1}}
\makeatother
% read environment variables
\usepackage{catchfile}
\newcommand{\getenv}[2][]{%
\CatchFileEdef{\temp}{"|kpsewhich --var-value #2"}{}%
\if\relax\detokenize{#1}\relax\temp\else\let#1\temp\fi}
% Trim margins if TRIM environment variable is set to "yes".
\getenv[\TRIM]{TRIM}
\edef\trimdef{{\TRIM}}
\expandafter\ifstrequal\trimdef{yes }{
\usepackage[paperwidth=6.6in, paperheight=9.35in, top=.75in, bottom=.5in, left=.3in, right=.3in]{geometry}
}{
}
% for proof
\usepackage{color}
\definecolor{boxshade}{gray}{0.85}
\usepackage{proof/tlatex}
\usepackage{amsthm}
\theoremstyle{definition}
\input{proof/defs.tex}
% drop capitalization on List of Tables, List of Figures
\renewcommand{\listfigurename}{List of figures}
\renewcommand{\listtablename}{List of tables}
\begin{document}
\beforepreface
\include{abstract/abstract}
\prefacesection{Preface}
Readers may want to refer to the Raft website~\cite{implementations} for
videos about Raft and an interactive visualization of Raft.
\include{ack/ack}
\afterpreface
% Do this \afterpreface to avoid breaking tex.
% Stash chapter names in \Chaptername
\let\Chaptermark\chaptermark
\renewcommand\chaptermark[1]{
\def\Chaptername{#1}\Chaptermark{#1}
}
\newcommand{\vcaption}[2][Figure]{
\caption[\Chaptername: #1]{#2}
}
% These terrible hacks make the chapter/appendix/bibliography name
% appear on odd-sided pages rather than the section name. I prefer this
% since some of my section names are too big to fit.
\makeatletter
\def\sectionmark#1{%
}
\def\Chaptermark#1{%
\markboth {\MakeUppercase{%
\ifnum \c@secnumdepth >\m@ne
\@chapapp\ \thechapter. \ %
\fi
#1}}{\MakeUppercase{%
\ifnum \c@secnumdepth >\m@ne
\@chapapp\ \thechapter. \ %
\fi
#1}}}%
\let\@mkboth\markboth
\makeatother
\newcommand\cold{$C_\text{old}$}
\newcommand\cnew{$C_\text{new}$}
\newcommand\cboth{$C_\text{old,new}$}
\include{intro/intro}
\include{motivation/motivation}
\include{basicraft/raft}
\include{membership/membership}
\include{compaction/compaction}
\include{clients/clients}
\include{userstudy/userstudy}
\include{correctness/correctness}
\include{leaderelection/leaderelection}
\include{performance/performance}
\include{related/related}
\include{conclusion/conclusion}
\appendix
\include{userstudymaterials/userstudyquizzes}
\include{proof/proof}
\label{end}
\bibliographystyle{acmcaps}
\bibliography{local}
\end{document}