I query a few third party subsystems. Some take 20 seconds to return, another 5 seconds to return. I dont want the user hang on the waitscreen for 20 seconds and return partial results. (Caching results for better speed is not possible)

Is there a framework or even better a jquery extension which can help me doing this? I am looking for something which supports web sockets, but aswell a polling approach for older clients.

What is the best pattern to do this? I thaught about using Redis as Polling Server. Any better ideas?