Most secreted and membrane proteins are synthesized on the ER membrane by ribosomes docked on the translocons. As they pass through the translocons, nascent peptide chains are scanned by two ER-embedded and translocon-associated molecular machines, the oligosaccharyltransferase (OST) complex and the protein mannosyltransferease complex (PMT), for protein N-glycosylation and protein O-mannosylation, respectively. OST is an eight-subunit membrane complex that transfers the oligosaccharide (OS) from the carrier Dol-PP-OS to the Asn-Xaa-Ser/Thr sequon of a nascent polypeptide. And PMT such as the Pmt1-Pmt2 heterodimer or the Pmt4-Pmt4 homodimer transfers a mannose (Man) from the carrier Dol-P-Man to Ser/Thr of a nascent polypeptide. OST is a member of the glycosyltransferase family (GT) 66 and PMT of the GT39 family, both enzyme complexes are inverting transferases with the GT-C structural fold. In my presentation, I will describe the structures and the catalytic mechanisms of the two membrane complexes and provide structural evidences supporting the hypothesis that PMT and OST are evolutionarily related.