title: django: celery vs channels vs in-view
body: <p>Assume a button on my page which when clicked fires off an ajax request to my api endpoint which then fetches data from a 3rd party site. Let's say this task takes around 2-5 seconds with a timeout at 5 seconds. What's the ideal way to do this:</p>
  
  <ol>
  <li>celery task.delay() in the api endpoint and return a url to poll every x intervals for the result.</li>
  <li>just do it in the view</li>
  </ol>
  
  <p>All tutorials I've seen suggest the celery way, but that seems like a lot of machinery/overhead for a simple request with minimal processing. Is there some generally accepted threshold (seconds till completion, etc..) in which one would choose one over the other?</p>
  
  <p>Then there is django-channels which seems like it would be ideal for this. But, on first glance, the distinguishing line between channels workers and celery tasks seems blurred. Can I replace celery with the channels workers and just use that for the above stated task? Would channels also handle my longer running tasks? What would be the advantages/drawbacks with channels (either with celery or replacing celery)?</p>
  
  <p>Finally, which of the 3 (celery/channels/in-view) would be the recommended approach to the example scenario given?</p>