John Ziman wrote a book called Public Knowledge: The Social Dimension of Science in the late 60's. I just read it. It is quite dated, and I am not sure what motivated me to actually read it, but hey. . .I did. Anyway, it was an interesting take on what the nature of scientific communities are. What is science, in essence. His answer is that science is a search for a consensus. The enterprise of science is all about the community of scientists looking to hit agreement on specific issues. He spends time defending this thesis with reference to the educational institutions of science, the communication institutions, and the scientific authorities.
The book is quite dated, and really only makes a lot of sense if seen in the context of the early days of the sociology of science, when people were trying to figure out how to look at the institutions of science in a formal way. The debates really have not gotten all that much more sophisticated since Ziman, but if you are interested in that sort of stuff there are still a few chapters in there worth reading.