Optical spectroscopy and sensor technology for the continuous monitoring and quality control of liquids, solids and gases in industry and the environment