Browse Source

Merge pull request #95 from dominics/documentation

[doc] Start documenting Predis.

This PR takes care of the initial Sphinx structure and focuses on clustering as the first theme.
Daniele Alessandri 12 năm trước cách đây
mục cha
commit
31b1583a37
12 tập tin đã thay đổi với 718 bổ sung0 xóa
  1. 1 0
      .gitignore
  2. 153 0
      doc/Makefile
  3. 10 0
      doc/README.md
  4. 46 0
      doc/client.rst
  5. 200 0
      doc/clustering.rst
  6. 257 0
      doc/conf.py
  7. 11 0
      doc/glossary.rst
  8. 25 0
      doc/index.rst
  9. 7 0
      doc/license.rst
  10. 5 0
      doc/pipelining.rst
  11. 2 0
      doc/replication.rst
  12. 1 0
      doc/requirements.txt

+ 1 - 0
.gitignore

@@ -3,3 +3,4 @@
 phpunit.xml
 package.xml
 experiments/
+doc/_build

+ 153 - 0
doc/Makefile

@@ -0,0 +1,153 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+	-rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Predis.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Predis.qhc"
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/Predis"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Predis"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."

+ 10 - 0
doc/README.md

@@ -0,0 +1,10 @@
+# Predis documentation
+
+You'll need a recent version of Sphinx to build this documentation. Because Sphinx is a Python project,
+the build dependencies are listed in requirements.txt. You can install these with pip:
+
+```sh
+    pip install -r requirements.txt
+```
+
+To build the documentation, use make.

+ 46 - 0
doc/client.rst

@@ -0,0 +1,46 @@
+The `Predis\\Client` class
+--------------------------
+
+.. php:namespace:: Predis
+
+The `Client` class is the main class users interact with in Predis. The first
+thing you'll do to start communicating with Redis is instantiate a `Client`.
+
+Constructing a Client
+=====================
+
+The `Client` constructor takes two arguments. The first (``$parameters``) is a
+set of information about the Redis connection you'd like to make. The second
+(``$options``) is a set of options to configure the client.
+
+.. php:class:: Client
+
+   .. php:method:: __construct($parameters = null, $options = null)
+
+      Creates a new `Client` instance.
+
+      :param $parameters: Connection parameters
+      :param $options:    Client options
+
+
+Connection Parameters
+'''''''''''''''''''''
+
+These parameters are used to control the behaviour of the underlying connection
+to Redis. They can be specified using a URI string::
+
+   $client = new Predis\Client('tcp://127.0.0.1:6379?database=2')
+
+Or, using an associative array::
+
+   $client = new Predis\Client(array(
+       'scheme'   => 'tcp',
+       'host'     => '127.0.0.1',
+       'port'     => 6379,
+       'database' => 3
+   ));
+
+Client Options
+''''''''''''''
+
+

+ 200 - 0
doc/clustering.rst

@@ -0,0 +1,200 @@
+.. vim: set ts=3 sw=3 et :
+.. php:namespace:: Predis
+
+Clustering
+----------
+
+A "cluster" is a group of Redis servers that collectively provide a shared
+namespace. In a cluster, data is not shared between Redis instances; instead,
+each server is used to serve a portion of the keys.
+
+In broad terms, this is done by identifying the key part of each Predis command
+to be run on the clustered connection. This key is then used to distribute
+commands among the underlying connections.
+
+Clustering has obvious advantages. As you add Redis instances to your
+cluster, your available space increases. At the same time, commands should be
+distributed between the nodes, meaning each individual node has to service
+less requests.
+
+Configuring a Cluster
+=====================
+
+Recall that the `Client` constructor takes two types of argument: a
+set of connection parameters, and a set of options::
+
+   $client = new Predis\Client($connection, $options);
+
+You only need to do one thing differently to set up a clustered client:
+identify multiple connections. You can also, optionally, configure your cluster
+with the ``cluster`` client option.
+
+Configuring Multiple Connections
+''''''''''''''''''''''''''''''''
+
+Passing information about multiple connections is as simple as wrapping them
+all in an array::
+
+   $client = new Predis\Client(array(
+       array(
+           'host'     => '127.0.0.1',
+           'port'     => 6379,
+           'database' => 2,
+           'alias'    => 'first'
+       ),
+       array(
+           'host'     => '127.0.0.1',
+           'port'     => 6379,
+           'database' => 3,
+           'alias'    => 'second',
+       )
+   ), $options);
+
+You can still use the URI syntax to configure the connections::
+
+   $client = new Predis\Client(array(
+       'tcp://127.0.0.1:6370?alias=first&database=0',
+       'tcp://127.0.0.1:6370?alias=second&database=1'
+   ), $options);
+
+.. note::
+
+   When you want to pass information about multiple connections, Predis expects
+   you'll do so with a numeric array, indexed from 0. If you've removed
+   connections from your array (perhaps after catching a
+   `Predis\\CommunicationException`), you can use array_values() to reindex it.
+
+   If your connection array does not have a value at [0], Predis
+   will assume you're trying to configure a single connection with an
+   associative array.
+
+The ``cluster`` Client Option
+'''''''''''''''''''''''''''''
+.. php:namespace:: Predis\Connection
+
+You can optionally configure your client's clustering by using the ``cluster``
+client option. This option can take a few different types of value. It can take
+the special strings ``"predis"`` or ``"redis"`` to switch between the two
+built-in cluster connection classes `PredisCluster` and
+`RedisCluster` respectively::
+
+   $client = new Predis\Client(array(
+       // ...
+   ), array('cluster' => 'predis'));
+
+If the value is any other string, it's expected to be the fully qualified name
+of a class implementing `ClusterConnectionInterface`.
+
+Finally, you can also configure the option with a callable. This callable is
+expected to return an instance of `ClusterConnectionInterface`::
+
+   $client = new Predis\Client(array(
+       // ...
+   ), array(
+      'cluster' => function () {
+         return new Predis\Connection\PredisCluster();
+      }
+   ));
+
+
+Provided Connection Classes
+===========================
+
+PredisCluster
+'''''''''''''
+
+.. php:class:: PredisCluster
+
+   ``PredisCluster`` is a simple Predis-native clustered connection implementation.
+
+This form of clustered connection does *not* provide redundancy. If your
+application makes requests for 100 different keys, with the default
+distribution strategy these keys are likely to be spit across all the servers
+in your pool.
+
+Distribution Strategy
+:::::::::::::::::::::
+
+Exactly how keys are split across a cluster is specified by a
+:term:`distribution strategy`. There are two distribution strategy classes
+shipped with Predis. What they have in common is that they try to manage the
+task of adding and removing servers from the cluster cleverly. When a server is
+added or removed, the distribution strategy takes care of ensuring that as few
+keys as possible have to be moved between the remaining servers. When you
+remove a server from a clustered connection of ten servers, ideally you'd only
+like 10% of your keys to be newly missing.
+
+This is broadly known as "`consistent hashing`_".
+
+It's also worth noting what a distribution strategy doesn't do: it doesn't
+actually ensure availability of your data between different cluster
+configurations. Or, more accurately, it leaves this up to you.
+
+You might decide to take the naive approach: that if a node goes offline, it'll take a
+portion of your keyspace with it. This might not matter to your application,
+especially if you can recalculate the data you were storing, or if you're using
+your cluster as a cache.
+
+If this sort of availability does matter for your application, it's up to you
+to take care of it, using tools external to Predis. You may want to move data
+before taking a node offline, for instance, ensuring minimal disruption. The
+fact that you can customize or replace the distribution strategy should make
+integrating such tools with `PredisCluster` much easier. For example, you may
+want to use a `Predis\\Cluster\\Distribution\\KetamaPureRing` strategy,
+combined with `libketama`_-based tools.
+
+The distribution strategy for a `PredisCluster` must implement
+`Predis\\Cluster\\Distribution\\DistributionStrategyInterface`. You pass your
+strategy into the `PredisCluster` instance as the first argument, using a
+'cluster' client-option callback::
+
+   $client = new Predis\Client(array(
+       // ...
+   ), array(
+      'cluster' => function () {
+         $strategy = new Predis\Cluster\Distribution\KetamaPureRing();
+         return new Predis\Connection\PredisCluster($strategy);
+      }
+   ));
+
+.. _consistent hashing: https://en.wikipedia.org/wiki/Consistent_hashing
+.. _libketama:          https://github.com/RJ/ketama
+
+RedisCluster
+''''''''''''
+
+.. php:class:: RedisCluster
+
+   ``RedisCluster`` is a clustered connection implementation intended for use with
+   Redis Cluster.
+
+`Redis Cluster`_ is not yet finalized, but it already includes some
+pretty cool features. Nodes in a Redis Cluster arrangement configure
+themselves to deal with changes in availability. Once consequence of this is
+that a distribution strategy is unnecessary: nodes in this cluster type agree
+and decide themselves about which node is to serve a portion of the keyspace.
+
+.. _Redis Cluster: http://redis.io/topics/cluster-spec
+
+Disallowed Commands
+===================
+
+Some commands just don't make sense to run on a clustered connection. For
+example, the ``INFO`` command returns information about the server on which
+it's run, so running it on a cluster would be meaningless.
+
+If you try to run one of these commands, you'll get a
+`Predis\\NotSupportedException`.
+
+Running Commands on Nodes
+=========================
+
+`PredisCluster` and :php:class:`RedisCluster` both
+implement `\\IteratorAggregate`, so you can easily run commands against the
+individual Redis servers in a cluster::
+
+   $hosts = array();
+   foreach ($client->getConnection() as $shard) {
+       $hosts[] = $shard->info();
+   }
+

+ 257 - 0
doc/conf.py

@@ -0,0 +1,257 @@
+# -*- coding: utf-8 -*-
+#
+# Predis documentation build configuration file, created by
+# sphinx-quickstart on Fri Dec 14 06:45:47 2012.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+from __future__ import with_statement
+
+import sys, os
+import sphinx.highlighting, pygments.lexers
+
+# Highlight PHP code without <?php
+sphinx.highlighting.lexers['php'] = pygments.lexers.PhpLexer(startinline = True)
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.insert(0, os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.todo', 'sphinxcontrib.phpdomain']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'Predis'
+copyright = u'2012, Predis contributors'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+version = 'dev'
+release = version
+
+with open('../VERSION') as f:
+    release = f.readline().strip()
+    version = release[0:3]
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+default_role = 'php:class'
+
+# Default highlight language
+highlight_language = 'php'
+
+# Primary domain, too :-)
+primary_domain = 'php'
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'Predis'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', 'Predis.tex', u'Predis Documentation',
+   u'Predis contributors', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output --------------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    ('index', 'predis', u'Predis Documentation',
+     [u'Predis contributors'], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output ------------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  ('index', 'Predis', u'Predis Documentation',
+   u'Predis contributors', 'Predis', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'

+ 11 - 0
doc/glossary.rst

@@ -0,0 +1,11 @@
+.. vim: set ts=3 sw=3 et :
+
+Glossary
+--------
+
+.. glossary::
+   :sorted:
+
+   distribution strategy
+      In a clustered connection, the distribution strategy determines which
+      subconnection a command is sent.

+ 25 - 0
doc/index.rst

@@ -0,0 +1,25 @@
+Predis
+======
+
+Release:
+  |release|
+
+Welcome to the end-user Predis documentation.
+
+.. toctree::
+   :maxdepth: 2
+
+   client
+   pipelining
+   clustering
+   replication
+   glossary
+   license
+
+Indices and tables
+''''''''''''''''''
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+

+ 7 - 0
doc/license.rst

@@ -0,0 +1,7 @@
+License
+-------
+
+Predis is released under an MIT/BSD style license, along with this
+documentation. You'll find the license file within :file:`/LICENSE` of the source.
+
+    .. include:: ../LICENSE

+ 5 - 0
doc/pipelining.rst

@@ -0,0 +1,5 @@
+Pipelining
+----------
+
+Why Pipeline?
+=============

+ 2 - 0
doc/replication.rst

@@ -0,0 +1,2 @@
+Replication
+-----------

+ 1 - 0
doc/requirements.txt

@@ -0,0 +1 @@
+sphinxcontrib-phpdomain