Modular Design of Programmable Multi-Granular Optical Switching Node