pub/sub v/s observer pattern