0

I'd like to know if there is a better way/pattern of doing what i have in mind.

I have a server side process that executes asyncronous tasks. Am planning to use celery for this. the asynchronous tasks themselves can have sub tasks.
Even though I need to review history of executed tasks and child tasks, I'm not planning to use the celery result backend, but just listen for the task_finished signals and update existing django models I'm using for logs as needed.

The question is around what is the way to report the status of these tasks to the user?

So in the web ui, there will be a widget/block of html somewhere where the tasks and their status are listed.
I need to display sub tasks grouped by parent tasks and individual sub task status. On the page, I'd just poll using jquery everytime a task was executed and on some interval.

My thought was to use Atom for this but according to the spec, their are strict rules around what the content element (link to spec) is allowed to hold. The specific concern is around how i would represent child tasks when using atom.

The other idea is just to use straight up json and parse accordingly.

Does anyone know of a better way/pattern to use for this?

Community
  • 1
  • 1
w--
  • 6,427
  • 12
  • 54
  • 92
  • Would you consider using a long lived http connection to push the status? – Victor 'Chris' Cabral Feb 07 '13 at 21:21
  • push is definitely preferable. I've never done a long lived http connection implementation before. Is this what you are recommending? http://stackoverflow.com/questions/4787530/does-django-have-a-way-to-open-a-http-long-poll-connection I'd like to reduce complexity of the stack by not introducing more server side components than i need, but it doesn't look like i can getaway from needing geventlets or comet if i do a long lived connection – w-- Feb 07 '13 at 21:50

0 Answers0