Long-polling implementation