The computation and enumeration of invariants of moduli spaces took a sudden turn with the conjecture of Witten that they could be combined into a formal series that solved the KdV hierarchy. This conjecture, subsequently proven by Kontsevich, was motivated by considerations of quantum gravity. It was followed by a series of developments in the same direction, notably in the computation of invariants for Hurwitz spaces and for Gromov-Witten invariants, for example in the work of Okounkov and Pandharipande, tying Gromov-Witten theory to the 2-Toda hierarchy. Kontsevich's proof involved a detour through the theory of random matrices, and subsequently Eynard and Orantin proposed a vast generalization of the technique, with a wide variety of implications. The questions have physical motivations, and has advanced with the rapid mixture of calculation and heuristic reasoning which characterizes theoretical physics; mathematicians have in many but not all cases provided proof, and, it is hoped, some understanding. The theory of integrable systems seems to lie at the heart of the subject, providing a thematic link. It is fair to say, though, that the way in which it happens is still ill-understood. Indeed, so far, it is more the tools, computational devices, and actual functions that appear, rather than flows and conserved quantities. It is hoped that recent physical input, again from the theory of quantum gravity, will help develop understanding.