It is well known that most topological spaces can be studied via their algebra of continuous real-valued (or complex-valued) functions. For instance, in the setting of compact Hausdorff spaces, there is a complete dictionary between topological properties of the space $X$ and corresponding algebraic properties of the algebra $C(X)=C(X,\mathbb{R})$, and two such spaces $X$ and $Y$ are homeomorphic if and only if their algebras $C(X)$ and $C(Y)$ are isomorphic. A similar theory is available in the locally compact Hausdorff case, by replacing $C(X)$ with the algebra of real-valued functions on $X$ which vanish at infinity. Furthermore, these algebras are precisely all the commutative C-algebras (at least if you take complex-valued functions). Thus if one wishes to study locally compact Hausdorff spaces, he might as well study commutative C-algebras.
Is there an analogous algebraic approach to the theory of "nice" metric spaces (e.g. compact, locally compact, connected, etc.)? More specifically, is there a natural function space one can attach to every nice metric space which essentially contains all data about the metric space, up to isometry?
I'll welcome any references related to this question.