Engineering Communication For Optical Communication: Comparison And Analysis Between APD And PIN Functionality