Skip to content

Commit 0d43a61

Browse files
committed
Documentation Pass
Reported-by: Matt Klinger
1 parent a496835 commit 0d43a61

20 files changed

+174
-175
lines changed

Diff for: doc/async-ops.tex

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
\chapter{Asynchronous Operations}
22
\label{chap:async-ops}
33

4-
Thus far, all HyperDex operations we've seen are {\em synchronous}, that is, the
5-
application calls the HyperDex operation and blocks until the operation is
6-
complete. HyperDex is very fast, but even so, clients may spend a non-trivial
4+
Thus far, all HyperDex operations we've seen are {\em synchronous}. That is,
5+
the application calls the HyperDex operation and blocks until the operation is
6+
complete. HyperDex is very fast. But even so, clients may spend a non-trivial
77
amount of time waiting on HyperDex operations. For each operation in HyperDex,
8-
there is an {\em asynchronous} variant that accomplishes the same task, but
9-
allows the client to perform other work while the operation completes.
8+
there is an {\em asynchronous} variant that accomplishes the same task, while
9+
allowing the client to perform other work during operation completion.
1010

1111
In this chapter, we'll look at the asynchronous operations HyperDex supports,
1212
and see different ways to use them to increase concurrency in the system.
@@ -70,7 +70,7 @@ \section{Asynchronous Operations}
7070
\label{sec:async-ops:ops}
7171

7272
Asynchronous operations permit applications to retrieve or modify multiple
73-
objects simultaneously and to perform local computation while doing the same.
73+
objects simultaneously, and to perform local computation while doing the same.
7474
In previous chapters, we submitted synchronous operations to the key-value
7575
store, where each client had just a single outstanding request, and waited
7676
patiently for that request to complete. In high-throughput applications,
@@ -186,7 +186,8 @@ \section{Asynchronous Operations}
186186

187187
Using the \code{loop()} method, it is possible to issue thousands of requests
188188
and then wait for each one in turn without having to serialize the round trips
189-
to the server.
189+
to the server. Each call to loop returns a \code{Deferred} object represents
190+
one outstanding operation.
190191

191192
\section{Potential Pitfalls}
192193
\label{sec:async-ops:pitfalls}

Diff for: doc/atomic-ops.tex

+9-5
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ \section{A Comprehensive Walk}
324324
'->some string<-'
325325
\end{pythoncode}
326326

327-
Lists provide atomic operations as well, to push new items on the left or the
327+
Atomic operations on lists allow the client to push new items on the left or
328328
right of the list:
329329

330330
\begin{pythoncode}
@@ -449,7 +449,8 @@ \section{A Comprehensive Walk}
449449
\end{pythoncode}
450450

451451
\subsection{Atomic Operations on Documents}
452-
Note that Hyperdex also supports atomic operations on documents. To do this, we first have to create a space that has a field of the type document.
452+
Note that Hyperdex also supports atomic operations on documents. To do this, we
453+
first have to create a space that has a field of the type document.
453454

454455
\begin{pythoncode}
455456
>>> a.add_space('''
@@ -468,8 +469,11 @@ \subsection{Atomic Operations on Documents}
468469
True
469470
\end{pythoncode}
470471

471-
We might now want to modify the information of this person without rewriting the whole document. For example, it might be Jane Doe's birthday and we want to increment the age.
472-
Fortunately, atomic operations also work on this kind of data. Hyperdex is able to add up two documents as long as the argument is a subset of the original data and only has numerical values.
472+
We might now want to modify this information of this person without rewriting
473+
the whole document. For example, it might be Jane Doe's birthday and we want to
474+
increment the age. Fortunately, atomic operations also work on this kind of
475+
data. HyperDex is able to increment integers within documents by providing the
476+
full path to the integer within the document.
473477

474478
\begin{pythoncode}
475479
>>> c.atomic_add('people', 'jane', {'info.age' : 1})
@@ -514,7 +518,7 @@ \subsection{Atomic Operations on Documents}
514518

515519

516520

517-
HyperDex's atomic operations are extensive and very expressive. And they are
521+
HyperDex's atomic operations are extensive and very expressive. They are
518522
guaranteed to be applied in the same order on all replicas, so the state of the
519523
object you are operating on is guaranteed to be the same, regardless of
520524
failovers.

Diff for: doc/backups.tex

+5-6
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,8 @@ \section{Simple Backup Strategies}
135135

136136
\section{Backup Efficiency}
137137

138-
HyperDex's backups are extremely efficient, because they leverage the structure
139-
of the on-disk format to take snapshots quickly, which may then be copied in the
140-
background.
138+
HyperDex's backups are extremely efficient, because its architecture enables
139+
quick snapshots, which may then be copied in the background.
141140

142141
HyperDex uses HyperLevelDB as its storage backend, which, in turn, constructs an
143142
LSM-tree on disk. The majority of data stored within HyperLevelDB is stored
@@ -190,7 +189,7 @@ \section{Advanced Backup Techniques}
190189
passing to the \code{--data} parameter of HyperDex's daemon.
191190

192191
In addition to the per-daemon state backups, the backup command above also
193-
creates a file in the curren directory called \code{my-backup.coordinator.bin}.
192+
creates a file in the current directory called \code{my-backup.coordinator.bin}.
194193
This file contains the coordinator's state, suitable for using to bootstrap a
195194
new coordinator cluster as shown above.
196195

@@ -232,8 +231,8 @@ \section{Incremental Backups with Rsync}
232231
into place and not copied over the network.
233232

234233
Assuming an existing backup exists in the directory
235-
\code{13036267341651542609-1},
236-
we can create an incremental backup in \code{13036267341651542609-2} by issuing:
234+
\code{13036267341651542609-1}, we can create an incremental backup in
235+
\code{13036267341651542609-2} by issuing:
237236

238237
\begin{consolecode}
239238
% rsync -a --delete --link-dest=13036267341651542609-1 -- \

Diff for: doc/c/client.tex

+11-11
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ \section{Hello World}
8484
transient problems with the cluster. Until the operation's id is returned from
8585
loop, the operation is still outstanding and incomplete.
8686

87-
The stored value is passed via \code{struct hyperdex\_client\_attribute} which
87+
The stored value is passed via \code{struct hyperdex\_client\_attribute}, which
8888
specifies both the value of the string "Hello World!" and that this value is, in
8989
fact, a string. All HyperDex datatypes are passed to HyperDex as bytestrings
9090
via this interface.
@@ -433,10 +433,10 @@ \subsection{Bytestring Format}
433433

434434
\paragraph{map(string, float) format}
435435

436-
Maps from strings to ints are formed by encoding the individual elements, where
437-
keys are prefixed by an unsigned 4-byte little endian integer indicating their
438-
length. The pairs of elements are stored in sorted order according to the first
439-
element of the pair (the map's key). For example:
436+
Maps from strings to floats are formed by encoding the individual elements,
437+
where keys are prefixed by an unsigned 4-byte little endian integer indicating
438+
their length. The pairs of elements are stored in sorted order according to the
439+
first element of the pair (the map's key). For example:
440440

441441
\begin{pythoncode}
442442
>>> encode_map_string_float({})
@@ -610,7 +610,7 @@ \subsection{Serialization API}
610610
\end{ccode}
611611
Encode \code{num} into memory allocated via \code{arena} and return
612612
the value via \code{value} and \code{value\_sz}. This function will fail and
613-
return -1 if there is insufficient memory available for encoding the nubmer.
613+
return -1 if there is insufficient memory available for encoding the number.
614614
All pointers returned by this function remain valid until \code{arena} is
615615
destroyed. The client should not attempt to free the returned copy.
616616

@@ -771,7 +771,7 @@ \subsection{Serialization API}
771771
\end{ccode}
772772
Set the key of the next pair to be inserted into \code{map} to the
773773
integer specified by \code{num}. This function will fail and return -1 if
774-
memory allocation fails, or the map does not nuse integers for keys.
774+
memory allocation fails, or the map does not use integers for keys.
775775

776776
\begin{ccode}
777777
int hyperdex_ds_map_insert_val_int(struct hyperdex_ds_map* map,
@@ -872,7 +872,7 @@ \subsection{Deserialization API}
872872
\end{ccode}
873873
Return the next string element in the list. This function will return
874874
1 if an element is returned, 0 if there are no elements to return, and -1 if the
875-
list of strings is malformed. The falue stored in \code{*str} is a pointer into
875+
list of strings is malformed. The value stored in \code{*str} is a pointer into
876876
the list of strings and should not be free'd by the application.
877877

878878
\begin{ccode}
@@ -1038,7 +1038,7 @@ \subsection{Memory Management Utilties}
10381038
\section{Attributes}
10391039
\label{sec:api:c:client:attributes}
10401040

1041-
In HyperDex, {\em attributes} specified named values that comprise an object.
1041+
In HyperDex, {\em attributes} specify named values that comprise an object.
10421042
For instance, in Chapter~\nameref{chap:quick-start}, the phonebook space has
10431043
attributes ``username'', ``first'', ``last'', and ``phone''. The C API
10441044
represents such attributes using \code{struct hyperdex\_client\_attribute}. The
@@ -1113,7 +1113,7 @@ \section{Predicates}
11131113
};
11141114
\end{ccode}
11151115

1116-
Note that this struct closely resembes \code{struct
1116+
Note that this struct closely resembles \code{struct
11171117
hyperdex\_client\_attribute}, with the addition of a field named
11181118
\code{predicate}. This field is an enum with the following values:
11191119

@@ -1256,7 +1256,7 @@ \section{Error Handling}
12561256

12571257
Local errors are always returned via the \code{enum
12581258
hyperdex\_client\_returncode*} pointer passed at the time the application
1259-
initated the operation. These errors may either result from the application
1259+
initiated the operation. These errors may either result from the application
12601260
returning a negative operation id, in which case the operation immediately
12611261
completes, or from the result of a successful \code{hyperdex\_client\_loop}
12621262
call. In either case, the error has no impact on the result of any other

Diff for: doc/client/fragments/cond_put.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Conditionally update an the object stored under \code{key} in \code{space}.
2-
Existing values will be overwitten with the values specified by \code{attrs}.
2+
Existing values will be overwritten with the values specified by \code{attrs}.
33
Values not specified by \code{attrs} will remain unchanged.
44
\input{\topdir/client/fragments/fail_if_not_found}
55

Diff for: doc/client/fragments/cond_put_or_create.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Conditionally update an the object stored under \code{key} in \code{space}.
2-
Existing values will be overwitten with the values specified by \code{attrs}.
2+
Existing values will be overwritten with the values specified by \code{attrs}.
33
Values not specified by \code{attrs} will remain unchanged. If the object
44
exists, this is equivalent to a \code{cond\_put}. If the object does not exist,
55
this is equivalent to a \code{put}

Diff for: doc/client/fragments/conditional.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
All checks are atomic with the write. HyperDex guarantees that no other
77
operation will come between validating the checks, and writing the new version
8-
of the object..
8+
of the object.

Diff for: doc/client/fragments/group_put.tex

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Update all objects stored in \code{space} that match \code{checks}. Existing
2-
values will be overwitten with the values specified by \code{attrs}. Values not
2+
values will be overwritten with the values specified by \code{attrs}. Values not
33
specified by \code{attrs} will remain unchanged.
44

55
\input{\topdir/client/fragments/group_operation}

Diff for: doc/data-types.tex

+8-9
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ \section{Floats}
161161
\section{Lists}
162162
\label{sec:data-types:lists}
163163

164-
Let's add support for friend requests using HyperDex lists the basis of the
164+
Let's add support for friend requests using HyperDex lists as the basis of the
165165
feature. For this we'll use the \code{pending\_requests} attribute in the
166166
\code{profiles} space.
167167

@@ -240,9 +240,9 @@ \section{Maps}
240240

241241
Lastly, our social networking system needs a means for allowing users to
242242
exchange messages. Let's demonstrate how we can accomplish this with the
243-
\code{unread\_messages} attribute. In this contrived example, we're going to use
244-
an object attribute as a map (aka dictionary) to map from a user name to a
245-
string that contains the message from that user, as follows:
243+
\code{unread\_messages} attribute. In this contrived example, the
244+
\code{unread\_messages} attribute is a map of usernames to unread messages from
245+
that user. For example:
246246

247247
\begin{pythoncode}
248248
>>> c.map_add('profiles', 'jsmith1',
@@ -257,7 +257,7 @@ \section{Maps}
257257

258258
HyperDex enables map contents to be modified in-place within the map. For
259259
example, if Brian sent another message to John, we could separate the messages
260-
with "|" and just append the new message:
260+
with ``\code{|}'' and just append the new message:
261261

262262
\begin{pythoncode}
263263
>>> c.map_string_append('profiles', 'jsmith1',
@@ -272,8 +272,7 @@ \section{Maps}
272272
operating on the values of the map.
273273

274274
For the sake of illustrating maps involving integers, let's imagine that we will
275-
use a map to keep track of the plus-one's and like/dislike's on John's status
276-
updates.
275+
use a map to keep track of the like/dislike's on John's status updates.
277276

278277
First, let's create some counters that will keep the net count of up and down
279278
votes corresponding to John's link posts, with ids "http://url1.com" and
@@ -287,7 +286,7 @@ \section{Maps}
287286
True
288287
\end{pythoncode}
289288

290-
So John's posts start out with a counter set to 1, as shown above.
289+
So, John's posts start out with a counter set to 1, as shown above.
291290

292291
Imagine that two other users, Jane and Elaine, upvote John's first link post, we
293292
would implement it like this:
@@ -340,7 +339,7 @@ \section{Timestamps}
340339
In this space, the key-space will be broken into one second intervals, and
341340
timestamps that fall within the same interval will be hashed to nearby to each
342341
other, while timestamps that map to different intervals will be hashed further
343-
apart in the key space.
342+
apart in the key space. Each object is stored under the \code{when} attribute.
344343

345344
The HyperDex timestamp type appears to our application as a normal Python
346345
\code{datetime.datetime} object, and will be converted to and from this type by

Diff for: doc/documents.tex

+2
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,5 @@ \section{Indexing Documents}
124124
This will instruct HyperDex to add the new index, and will index all existing
125125
data using the new index. You can add and remove indices at any time as your
126126
documents change.
127+
128+
HyperDex will automatically make use of the new index upon its creation.

Diff for: doc/installation.tex

+12-13
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
\chapter{Installing HyperDex}
22
\label{chap:installation}
33

4-
HyperDex provides multiple installation methods that provide easy access to
5-
HyperDex in a variety of environments. Those looking to play around with
6-
HyperDex and go through the tutorials may find it easiest to start with the
7-
quickstart Docker container. For Linux users, the easiest and most convenient
8-
way to install HyperDex is to use pre-compiled binary packages. Users of OS X
9-
have the option to install using Homebrew packages. Finally, HyperDex is also
10-
distributed as a set of tarballs so that power users may install HyperDex in a
11-
custom manner on their platform of choice.
4+
HyperDex provides multiple installation methods for a variety of environments.
5+
Those looking to play around with HyperDex and go through the tutorials may find
6+
it easiest to start with the quickstart Docker container. For Linux users, the
7+
easiest and most convenient way to install HyperDex is to use pre-compiled
8+
binary packages. OS X users have the option to install using Homebrew
9+
packages. Finally, HyperDex is also distributed as a set of tarballs so that
10+
power users may install HyperDex in a custom manner on their platform of choice.
1211

1312
\section{Quick Installation with Docker}
1413

@@ -50,8 +49,8 @@ \section{Quick Installation with Docker}
5049
\end{enumerate}
5150

5251
With this quickstart cluster, both the coordinator and daemon logs will be
53-
displayed on stdout. You can connect to the cluster at athe address and port
54-
listed, and can stop the cluster at any time using the command displayed on your
52+
displayed on stdout. You can connect to the cluster at the address and port
53+
listed and can stop the cluster at any time using the command displayed on your
5554
console. When you stop the cluster, the HyperDex cluster will be destroyed, and
5655
taken offline automatically. To fully clean up any disk space in use by the
5756
cluster, run \code{docker rm b6ae7c60c275}, where b6ae7c60c275 is the ID of your
@@ -156,7 +155,7 @@ \section{Installing From Source}
156155
\subsubsection{Changing the Installation Directory}
157156
\label{sec:installation:source:prefix}
158157

159-
By default HyperDex installs files in \texttt{/usr/local}. If you'd like to
158+
By default, HyperDex installs files in \texttt{/usr/local}. If you'd like to
160159
install HyperDex elsewhere, you can specify the installation prefix at configure
161160
time. For example, to install HyperDex in \texttt{/opt/hyperdex}:
162161

@@ -384,7 +383,7 @@ \section{Upgrading to 1.4}
384383
backup. This will upgrade the coordinator to 1.4, and the daemons will work
385384
with the old data directory.
386385

387-
Alternatively, take a backup, and restart the coordinator from the backed-up
386+
Alternatively take a backup, and restart the coordinator from the backed-up
388387
coordinator state on the same address. Then do a rolling restart of the
389388
daemons.
390389

@@ -400,7 +399,7 @@ \section{Upgrading to 1.3}
400399
backup. This will upgrade the coordinator to 1.3, and the daemons will work
401400
with the old data directory.
402401

403-
Alternatively, take a backup, and restart the coordinator from the backed-up
402+
Alternatively take a backup, and restart the coordinator from the backed-up
404403
coordinator state on the same address. Then do a rolling restart of the
405404
daemons.
406405

Diff for: doc/introduction.tex

+15-15
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ \section{Why HyperDex?}
1212

1313
\begin{description}
1414
\item[Performance:] HyperDex achieves lower latency and higher throughput than
15-
many other key-value stores. Deploy fewer machines to support your application,
16-
and save on operational costs.
15+
many other key-value stores. Support your application with fewer machines and
16+
save on operational costs.
1717

1818
\item[Consistency:] HyperDex provides strongly-consistent reads, writes, and
1919
atomic operations, making strong guarantees to your application. Other
@@ -81,10 +81,10 @@ \section{Help and Support}
8181
\label{sec:introduction:support}
8282

8383
If you run into trouble while working with HyperDex, don't panic! The HyperDex
84-
team have put together many support avenues to assist you with HyperDex. Many
85-
of the available resources are freely available online. When you need more
86-
support than that, the HyperDex team is on standby with commercial support
87-
options that ensure that you're never left in the dark.
84+
team have put together many support avenues to assist you. Many of the
85+
resources are available online for free. When you need more support than that,
86+
the HyperDex team is on standby with commercial support options that ensure that
87+
you're never left in the dark.
8888

8989
\subsection{Online and Free Resources}
9090
\label{sec:introduction:support:free}
@@ -97,11 +97,11 @@ \subsection{Online and Free Resources}
9797
and assistance. It serves as the canonical documentation of HyperDex and
9898
should be your first stop with any questions or problems.
9999
\item \href{https://groups.google.com/group/hyperdex-discuss}{HyperDex Mailing List}:
100-
This open mailing list is most users' first resource solving problems.
101-
Messages to the list are archived which makes it easy to search for
102-
solutions to your problem. If you don't find a solution in the archives,
103-
start a new thread with your question and the HyperDex developers will try
104-
to help answer your questions.
100+
This open mailing list is the first resource most users turn to when solving
101+
problems. Messages to the list are archived which makes it easy to search
102+
for solutions to your problem. If you don't find a solution in the
103+
archives, start a new thread with your question and the HyperDex developers
104+
will try to help answer your questions.
105105
\item \href{http://webchat.freenode.net/?channels=hyperdex\&uio=d4}{HyperDex IRC Channel}:
106106
The \texttt{\#hyperdex} IRC channel on Freenode is a great place to ask
107107
questions and interact with the HyperDex developers in real-time.
@@ -123,7 +123,7 @@ \subsection{Online and Free Resources}
123123
\subsection{Commercial Support}
124124
\label{sec:introduction:support:commercial}
125125

126-
The HyperDex team provides commercial support for HyperDex, which includes
127-
around-the-clock email support and consulting services. If you're in need of
128-
support, you can contact the HyperDex developers directly at {\em support}@{\em
129-
hyperdex.org}.
126+
Should you require more support, the HyperDex team is always on standby with
127+
commercial support options to ensure you're never left in the dark. If you're
128+
in need of support, you can contact the HyperDex developers directly at {\em
129+
support}@{\em hyperdex.org}.

0 commit comments

Comments
 (0)