Ask HN: How do you handle possibly long running tasks in your web app?
I am building a web application where the user could kick off a task that could take seconds, minutes or hours. I don't define the tasks, the users do, so I won't know until they run it a few times. When a task is done, they can see a preview of the results and/or choose to download the entire result-set.
I always use polling for this because it's simple. By "polling", I do not mean "long polling"/comet. Basically, once my javascript knows that a task is running, it starts setting timeouts to ask the server if any pending tasks have notifications.
Websockets seem to be overkill for this because it's not an IM application or a game. So, what I want to know is - are there any better ways of handling this yet? Anything that integrates well with Angular (instead of coding up my own algorithm described above)?
Thanks!
1 comment
[ 4.8 ms ] story [ 7.4 ms ] thread