Long-polling chat implementation