Passive And Active Bragg Gratings For Optical Networks