--
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 django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
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/bbeea75a-1026-42f1-9cb4-56be0c8a08b2%40googlegroups.com.
--
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 django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
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/299ede52-6ae4-46d3-8667-40e7fa6a89a6%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-developers/3pTMfHa8SFE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
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/D5557CBB-03D8-4DB2-AAFA-B4063E227D8A%40polytechnique.org.
http://channels.readthedocs.org/en/latest/concepts.html#conceptsAnd, 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.
Channels is indeed a replacement for Celery if you're OK with not having delays, retry, or the other advanced options Celery has - Channels just requires an event to respond to, and this can be triggered by the user during a view much like a Celery task.
But yes, channels deliberately has an at-most-once delivery style, which will work for operations that aren't critical, or if people build their own retry logic (but at that point, maybe use Celery).
Andrew
>If I get it right -- Curtis' description is spot-on; some tasks will
>still
>need Celery, Channels will take care of many others.
For me it's more a question of "is a client directly involved".
--
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 django-develop...@googlegroups.com.
To post to this group, send email to django-d...@googlegroups.com.
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/1d6526d3-dd55-4719-b1ba-4804d4eb2dff%40googlegroups.com.
Hi Andrew,Thanks for the detailed response. I'm glad to hear you have tried a few different ways to implement this, and having read through your reply, and the channels docs again, I have more questions :-)Your point about asynchronous code introducing needless complexity is very well founded, its one of the reasons I like Actor Model Concurrency over other concurrency models, it scales well computationally, and *mentally*, as a programmer, I am trying break down my real world goals into discrete steps of computations, comparisons, iterations and by combining these steps, I construct my program. Actor Model Concurrency, is no more complicated than saying "This step can be done without affecting anything else thats going on", which makes the 'actor/task' much easier to introduce to existing synchronous code than most other concurrency methods.
One thing that sticks with me as I think about the current channels design, relates to the idea I've raised in another discussion ( https://groups.google.com/forum/#!topic/django-developers/-BOsuVdPFXc ).If I put my architect hat on and think about the future a bit, a 'more' actor based design to channels might simplify later additional async work. Since all the websocket stuff is new, I'll stick to the existing HTTP cycle in this example. In version 1 a 'vanilla' Django task/actor would be a full HTTP request response cycle, like how Django and WSGI currently work. Our Django task is effectively our WSGI task, much like Pulsar Pulse. If all of Django is contained inside our new task/worker/supervisor Actor layer, then it becomes fairly trivial to do things like create separate request handler, database query, and template rendering task/actors and chain their calls. Since in the previously linked to discussion thread, I'm talking about decoupling the ORM from the 'upper' layers of Django, its hard to not also think what opportunities that would open up for async efforts. How do you see the architecture of Django channels accommodating such improvements in future? At the moment your focused on keeping things compatible and avoiding the need for any of the existing synchronous Django code to change, is this introducing any design tradeoffs that you are aware of with regards to hypothetical future developments?
Django Channels feels like it contains a possible asynchronous replacement for signals but is 'holding back', many cases where I can see myself using a channel, I'm using them with a signal handler, can you elaborate a bit on your thoughts here? I assume its a compatibility decision, but is there more to it than just that?
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/a827b7de-d873-4f31-b153-1fa39f88386e%40googlegroups.com.
Once again I have to thank you for taking the time to keep replying. These longer explanations are proving very helpful (at least to me) in understanding Django Channels. :-)I definitely understand the compatibility reasons, I'm also pleased to see that signalling via a channel will be as simple as I had hoped, at least simple as long as we put aside compatibility issues with Django's built in signals. I'd still be pleased with only the ability to make my custom signals asynchronous.
Digging into the implementation details, you've sparked my curiosity. For some reason the simplicity of the having just send() and receive_many() didn't fully dawn on me until now. Once I've made progress with my decoupling, I think I'll have to try experiment with cleaving the major parts of the entire request/response cycle into a chain of asynchronous actors.
I'll likely test how hard it is to 'wrap' each part of the cycle in a way that allows it to be called by synchronously or asynchronous code. I'd like to avoid creating "yet another async django, that isnt really django anymore", keep the existing synchronous code pathway seems like a good start at a "useful experiment".
As for 'could you call the end result Django'... I think "Django" is whatever we make of it ;-)I don't see why we wont still call the combination of all the parts, the ecosystem of compatible libraries, etc, "Django", regardless of how much we might change between now and far future versions like 4.0 or 9.0.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/cdf23837-6d82-418a-a034-aec2b6d2b1c2%40googlegroups.com.