>From my point of view the major non-functional difference is the interaction >with a client in *some way*. While a celery task runs without any form of >client, a channels method would mostly do that. Picture the following example:
A user uploads an image. This could happen through the common request-response cycle. When the upload is done the server creates a celery task to generate a bunch of thumbnails and returns a http response. At this point the image is already available online but the thumbnails aren't. Every client could start a websocket connection through channels to get notified once a thumbnail is available. This notification is send through a server side callback called by the celery task. /Markus On December 16, 2015 2:45:49 PM GMT+10:30, Curtis Maloney <[email protected]> wrote: >On 16/12/15 12:05, Ben Liyanage wrote: >> And, beyond that, there are plenty of non-critical tasks that >> applications could easily offload until after a response has been >> sent - like saving things into a cache or thumbnailing >> newly-uploaded images. >> >> http://channels.readthedocs.org/en/latest/concepts.html#concepts >> >> I mean this example sounds like celery to me. You don't want an >image >> to maybe have a thumbnail generated. And you have no return value to >> the client when the thumbnail is generated. > >There are certainly some cases, AIUI, where channels can obviate the >need for Celery... like sending emails, or thumbnailing uploaded image, > >and so on. > >However, given the different reliability profiles, there's still room >for both. > >-- >Curtis -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/6037EBAB-C6F1-4A22-A632-A89812B53A4B%40markusholtermann.eu. For more options, visit https://groups.google.com/d/optout.
