Real-Time Digital Signal Processing For Coherent Reception And Its Application To Optical Communications