  A linear error correcting code is a subspace of a finite-dimensional space
over a finite field with a fixed coordinate system. Such a code is said to be
locally recoverable with locality $r$ if, for every coordinate, its value at a
codeword can be deduced from the value of (certain) $r$ other coordinates of
the codeword. These codes have found many recent applications, e.g., to
distributed cloud storage. We will discuss the problem of constructing good
locally recoverable codes and present some constructions using algebraic
surfaces that improve previous constructions and sometimes provide codes that
are optimal in a precise sense. The main conceptual contribution of this paper
is to consider surfaces fibered over a curve in such a way that each recovery
set is constructed from points in a single fiber. This allows us to use the
geometry of the fiber to guarantee the local recoverability and use the global
geometry of the surface to get a hold on the standard parameters of our codes.
We look in detail at situations where the fibers are rational or elliptic
curves and provide many examples applying our methods.
