-re benchmarking and adjusting MAX_QUEUE_PER_PEER
[oweals/gnunet.git] / doc / gnunet-c-tutorial.tex
index ccd2afb8f6d9cb4c871f3c9d7ae36a4e9ea7ce5f..ee24b0ae43082a7e00cad5843a5f9db29591a536 100644 (file)
@@ -270,25 +270,29 @@ SERVERS = # prevent bootstrapping
 \subsection{Start a peer}
 Each GNUnet instance (called peer) has an identity (\textit{peer ID}) based on a
 cryptographic public private key pair. The peer ID is the printable hash of the
-public key. So before starting the peer, you may want to just generate the peer's private
-key using the command
+public key.
+
+GNUnet services are controlled by a master service the so called \textit{Automatic Restart Manager} (ARM).
+ARM starts, stops and even restarts services automatically or on demand when a client connects.
+You interact with the ARM service using the \lstinline|gnunet-arm| tool.
+GNUnet can then be started with \lstinline|gnunet-arm -s| and stopped with
+\lstinline|gnunet-arm -e|.  An additional service not automatically started
+can be started using \lstinline|gnunet-arm -i <service name>| and stopped
+using \lstinline|gnunet-arm -k <servicename>|.
+
+Once you have started your peer, you can use many other GNUnet commands
+to interact with it.  For example, you can run:
 \lstset{language=bash}
 \begin{lstlisting}
-$ gnunet-peerinfo -c ~/peer1.conf -s
+$ gnunet-peerinfo -s
 \end{lstlisting}
+to obtain the public key of your peer.
 You should see an output containing the peer ID similar to:
 \lstset{language=bash}
 \begin{lstlisting}
 I am peer `0PA02UVRKQTS2C .. JL5Q78F6H0B1ACPV1CJI59MEQUMQCC5G'.
 \end{lstlisting}
 
-GNUnet services are controlled by a master service the so called \textit{Automatic Restart Manager} (ARM).
-ARM starts, stops and even restarts services automatically or on demand when a client connects.
-You interact with the ARM service using the \lstinline|gnunet-arm| tool.
-GNUnet can then be started with \lstinline|gnunet-arm -s| and stopped with
-\lstinline|gnunet-arm -e|.  An additional service not automatically started
-can be started using \lstinline|gnunet-arm -i <service name>| and stopped
-using \lstinline|gnunet-arm -k <servicename>|.
 
 \subsection{Monitor a peer}
 In this section, we will monitor the behaviour of our peer's DHT service with respect to a
@@ -402,7 +406,7 @@ by you.
 If you want to use the \texttt{peerinfo} tool to connect your peers, you should:
 \begin{itemize}
 \itemsep0em
- \item{Remove {\tt hostlist} from {\tt DEFAULTSERVICES} (to not connect to the global GNUnet)}
+ \item{Set {\tt FORCESTART = NO} in section {\tt hostlist} (to not connect to the global GNUnet)}
  \item{Start both peers running {\tt gnunet-arm -c peer1.conf -s} and {\tt gnunet-arm -c peer2.conf -s}}
  \item{Get \texttt{HELLO} message of the first peer running {\tt gnunet-peerinfo -c peer1.conf -g}}
  \item{Give the output to the second peer by running {\tt gnunet-peerinfo -c peer2.conf -p '<output>'}}
@@ -1114,13 +1118,13 @@ disconnects (void *cls,
 
 \section{Storing peer-specific data using the PEERSTORE service}
 
-GNUnet's PEERSTORE service offers persistent peer-specific arbitrary data storage.
-Other GNUnet services can use the PEERSTORE API to store, retrieve and monitor data records.
+GNUnet's PEERSTORE service offers a persistorage for arbitrary peer-specific data.
+Other GNUnet services can use the PEERSTORE to store, retrieve and monitor data records.
 Each data record stored with PEERSTORE contains the following fields:
 
 \begin{itemize}
 \itemsep0em
-  \item subsystem: Name of the subsystem responsible for the record. 
+  \item subsystem: Name of the subsystem responsible for the record.
   \item peerid: Identity of the peer this record is related to.
   \item key: a key string identifying the record.
   \item value: binary record value.
@@ -1193,7 +1197,7 @@ iteration over values stored under any of the following key combinations:
 \end{itemize}
 
 The \lstinline|callback| function will be called once with each retrieved record and once
-more with a \lstinline|NULL| record to signify end of list.
+more with a \lstinline|NULL| record to signal the end of results.
 
 The \lstinline|GNUNET_PEERSTORE_iterate| function returns a handle to the iterate operation. This
 handle can be used to cancel the iterate operation only before the callback function is called with
@@ -1215,7 +1219,7 @@ GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h,
 
 Whenever a new record is stored under the given key combination, the \lstinline|callback| function
 will be called with this new record. This will continue until the connection to the PEERSTORE service
-is broken or the watch operation is cancelled:
+is broken or the watch operation is canceled:
 \begin{lstlisting}
 void
 GNUNET_PEERSTORE_watch_cancel (struct GNUNET_PEERSTORE_WatchContext *wc);