Statistical Mechanics on random Structures