Client / server code for handling histograms. The server: