Remoting and long running processes
I have a use case where a client can initiate, thru a remote call, a long running process on the server. By long running, I mean something that can run for a few minutes (up to a couple of hours).
The user must be able to start the process, track its progress, cancel it if necessary.
It seems to me that the only way to get this is to make the client poll the server at uniform intervals, and spawn a separate thread on the server to perform the long running task. In the beginning I was thinking that the server should have sent back to the client "events" as in a classic "Observer" pattern, but it seems to be more trouble than it's worth.
Does anyone of you have some experience on such a use case? Any consideration, comment is appreciated.