I’m interested in running a long process, I want to update the UI as soon as results start coming in and not wait for it to finish.
How would I go about this? I’ve read about Async controllers but they don’t seem to have anything built-in for this purpose.
Just save the results in the Application/Session object as the results come in and use polling from client side? I can think of several ways that could go wrong (like user closes page, and the object stays in Application object forever – need to manage expiration of these object myself, extra server-load for polling, etc).
Any thoughts?
Thank you
I was trying to solve something similar (reporting real-time progress from a long running server operation back to the client) recently and it turned out SignalR is a perfect fit for this situation.
Basically it is a library wrapping long-polling and Web Sockets, using (transparently) whatever is available on server and client.
I only have good experience with it so far.