The only threading is when you're using runserver - normally I'd suggest
this is a multi-process model instead.

In my view, they already are namespaced, as well; the communication/socket
channels live under django.wsgi and django.websocket prefixes, whereas the
custom ones don't (perhaps we could suggest that people prefix them with
their app name). I think enforcing separation beyond this isn't sensible if
the behaviour is going to be exactly the same anyway.

Andrew

On Thu, Jun 18, 2015 at 12:47 PM, BearXu <[email protected]> wrote:

> It might be a better idea to set the task-pool and intersocket--async into
> two namespaces. It would become confused if we put them together under the
> "Channel". Like in Java, Channel is like a wrapped-socket, but here in
> django-channel, it also means a task queue.
>
>
> On 17 June 2015 at 23:40, BearXu <[email protected]> wrote:
>
>> Sorry, I haven't read the source code. But I basically read the doc. Thus
>> in a multithreaded env, we will use Redis or something to implement the one
>> to one chat function, am I right?
>>
>> Thus people might be confused with the different channels' definitions.
>>
>> On 16 June 2015 at 08:51, Andrew Godwin <[email protected]> wrote:
>>
>>> The in-memory backend is not meant to enable any new functionality, just
>>> allow things to run in-place as it currently works - any cross-socket
>>> communication would be disabled in that mode. You can already see this in
>>> my beta code - trying to run the WebSocket or Worker processes in memory
>>> mode will just fail.
>>>
>>> Andrew
>>>
>>> On Tue, Jun 16, 2015 at 12:48 AM, BearXu <[email protected]> wrote:
>>>
>>>> Personally I don't agree with implementing the Channel using in-memory
>>>> mode first. Writing code to communicate among  sockets will become very
>>>> difficult for me(ordinary developer). If we see async in Django as a tool
>>>> instead of a coding style, I think Redis/NoSql/Database backend/ is good
>>>> enough as a first step.
>>>>
>>>> On 15 June 2015 at 03:25, Andrew Godwin <[email protected]> wrote:
>>>>
>>>>> Hello everyone,
>>>>>
>>>>> I've been formulating a plan to decouple Django from the
>>>>> request-response cycle for a couple of years now and after discussing it
>>>>> with some people at DjangoCon Europe I thought it was high time that I
>>>>> actually wrote it up, wrote some code, and solicited feedback.
>>>>>
>>>>> So here it is. The proposal is very long, and is in a Gist here:
>>>>> https://gist.github.com/andrewgodwin/b3f826a879eb84a70625
>>>>>
>>>>> As a top-level summary:
>>>>>
>>>>>  - Fully backwards-compatible
>>>>>  - No actual "in-process" async like asyncio/greenlets (apart from a
>>>>> couple of optional "interface server" modules where you can pick your 
>>>>> async
>>>>> implementation)
>>>>>  - New base unit of Django work is no longer the view, it is the
>>>>> channel consumer
>>>>>  - Supports WebSockets, long-polling, offsetting complex tasks outside
>>>>> views and more
>>>>>  - Code looks and works the same - since it'll be a worker model,
>>>>> there's no need to retrofit any core Django APIs for async stuff.
>>>>>
>>>>> To help write the proposal and also to help you understand it, I've
>>>>> semi-implemented the proposal over here as a third-party app:
>>>>> https://github.com/andrewgodwin/django-channels
>>>>>
>>>>> While the goal is to merge this into Django proper, prototyping and
>>>>> iterating outside is much faster and more accessible for everyone 
>>>>> involved,
>>>>> and the goal is to get it working on 1.7 and 1.8 (currently only 1.8).
>>>>>
>>>>> The basic chat example in the README of that project is up and running
>>>>> on this code (and the Redis channel backend) here:
>>>>> http://www.aeracode.org/chat/
>>>>>
>>>>> Any and all feedback is welcomed, in this thread is probably best.
>>>>> This is by no means a final plan, but I hope it will lead us towards
>>>>> something that will make Django much more suitable for a modern Web.
>>>>>
>>>>> (I'm about to get on a long flight to Tokyo, so I may not be
>>>>> immediately responsive! And my example might crash, it's only running the
>>>>> websocket server in screen!)
>>>>>
>>>>> Andrew
>>>>>
>>>>> --
>>>>> 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 http://groups.google.com/group/django-developers.
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/django-developers/CAFwN1upKYO7MxyuRigYphJfCqqj%2BKPp_uhBgymEK2oMtP%2BJMPA%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/django-developers/CAFwN1upKYO7MxyuRigYphJfCqqj%2BKPp_uhBgymEK2oMtP%2BJMPA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>
>>>>  --
>>>> 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 http://groups.google.com/group/django-developers.
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/django-developers/CAB%2B2MZygJ10J8_bPFkE8AR%3D1mQ%3D0KKWWvXvoHhnmKaVJzZFBGQ%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/django-developers/CAB%2B2MZygJ10J8_bPFkE8AR%3D1mQ%3D0KKWWvXvoHhnmKaVJzZFBGQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>  --
>>> 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 http://groups.google.com/group/django-developers.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/django-developers/CAFwN1urENRO2bFVVncpbF_Dymv0Z1PAVUJxHW7kOScubCg4sJg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/django-developers/CAFwN1urENRO2bFVVncpbF_Dymv0Z1PAVUJxHW7kOScubCg4sJg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>  --
> 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 http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAB%2B2MZy5je0f9-UpgaRduC0_hYHrW5w3egGMTbCBF9RUzT%2BVgA%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-developers/CAB%2B2MZy5je0f9-UpgaRduC0_hYHrW5w3egGMTbCBF9RUzT%2BVgA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAFwN1urD_6X0fOAVFp4q-cMCPQ_vTtZhFBX-EL%3D5RaTT_xbo1A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to