  Jacobson theorem (Ref. \cite{jacobson}) shows that Einstein gravity may be
understood as a thermodynamical equation of state; a microscopic realization of
this result is however lacking. In this paper, we propose that this may be
achieved by assuming the spacetime geometry as a macroscopic system, whose
thermodynamical behavior is described by a statistical ensemble, whose
microscopic components are low-dimensional geometries. We show that this
picture is consistent with string theory by proposing a particular model for
the microscopic geometry, where the spacetime metric plays the role of an
ordinary thermodynamical potential in a special ensemble. In this scenario,
Einstein equation is indeed recovered as an equation of state, and the black
hole thermodynamics is reproduced in a thermodynamic limit (large length
scales). The model presented here is background-independent and, in particular,
it provides an alternative formulation of string theory.
