Re: Django Channels redis backend more explicit errors

2022-02-04 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi! I think you've found the wrong mailing list for this post. This mailing list is for discussing the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely t

Django Channels redis backend more explicit errors

2022-02-04 Thread Miguel Rosales
Hi, I recently came across a situation my redis backend was improperly configured and I got this log. I thought the problem was related to a blocked port or something related to the container/image I was using because of the OSError: [Errno 22] Invalid argument, I think it would be more obvious

Re: Django Channels

2019-05-08 Thread Adam Johnson
This mailing list is for the development of Django itself, not for support using Django. Please use the django-users mailing list for that, or IRC #django on freenode, or a site like Stack Overflow. On Wed, 8 May 2019 at 11:33, Faizan Nazeer wrote: > how Django channels connect with andr

Django Channels

2019-05-08 Thread Faizan Nazeer
how Django channels connect with android mobile ... I want to send message on a browser and that message receive on the android application how channels work that -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django i

Re: Fix for Django Channels issue #962

2019-02-05 Thread Carlton Gibson
te: > > Hello, > > This is my first post here. I'd like to discuss some ways of fixing the > issue for Django Channels. <https://github.com/django/channels/issues/962> > Briefly > speaking, any test for Channels written with ChannelsLiveServerTestCase > freezes in

Fix for Django Channels issue #962

2019-02-05 Thread joonhyung . shin
Hello, This is my first post here. I'd like to discuss some ways of fixing the issue for Django Channels. <https://github.com/django/channels/issues/962> Briefly speaking, any test for Channels written with ChannelsLiveServerTestCase freezes in MacOS. As a Mac user, I wanted to fi

Re: Django Channels doesn’t conform to Django middleware specifications

2018-08-28 Thread Andrew Godwin
appears that for every inbound HTTP request, Channels initializes a >>> new AsgiHandler. In turn, this means that the entire middleware stack is >>> being loaded for every HTTP request. See below: >>> >>> >>> https://github.com/django/channels/blob/master/ch

Re: Django Channels doesn’t conform to Django middleware specifications

2018-08-28 Thread John Obelenus
>> new AsgiHandler. In turn, this means that the entire middleware stack is >> being loaded for every HTTP request. See below: >> >> https://github.com/django/channels/blob/master/channels/routing.py#L45-L62 >> >> https://github.com/django/channels/blob/master/chan

Re: Django Channels doesn’t conform to Django middleware specifications

2018-08-28 Thread John Obelenus
or every HTTP request. See below: > > https://github.com/django/channels/blob/master/channels/routing.py#L45-L62 > > https://github.com/django/channels/blob/master/channels/http.py#L157-L183 > > > This has two consequences: > >1. Channels is causing middleware to fall out of co

Django Channels doesn’t conform to Django middleware specifications

2018-08-27 Thread carl-philip . majgaard
middleware stack is being loaded for every HTTP request. See below: https://github.com/django/channels/blob/master/channels/routing.py#L45-L62 https://github.com/django/channels/blob/master/channels/http.py#L157-L183 This has two consequences: 1. Channels is causing middleware to fall out of

Re: django channels test authorization with live server

2018-07-13 Thread Andrew Godwin
Hi, this is the mailing list for the development of Django itself. I suspect you will instead want to ask a question like this to the django-users list! Andrew On Fri, Jul 13, 2018 at 5:37 AM Piotrek eF wrote: > Hello, > > Normally, when I launch runserver, and login to admin site, I can open j

django channels test authorization with live server

2018-07-13 Thread Piotrek eF
Hello, Normally, when I launch runserver, and login to admin site, I can open js console, connect to websocket server, and I'm authorized. I would like to realize such scenerio with pytest. Is there such possibility? -- You received this message because you are subscribed to the Google Groups

Re: Django channels advice

2018-05-24 Thread Jacob Kaplan-Moss
, May 24, 2018 at 9:35 AM, wrote: > Hi guys I need someone give me an advice, I wanna receive a post request > from an external API into a consumer of django channels, someone has done > this before? > > An example is localhost:8082 sends post request with an event on > request.bo

Django channels advice

2018-05-24 Thread j . romeroc97
Hi guys I need someone give me an advice, I wanna receive a post request from an external API into a consumer of django channels, someone has done this before? An example is localhost:8082 sends post request with an event on request.body I wanna receive this in my consumer as a json and show a

Re: Not Found "/lobby/" django-channels routing error

2018-04-04 Thread Adam Johnson
This mailing list is for the development of Django itself, not for support. Use the django-users mailing list for that, or IRC #django on freenode, or a site like Stack Overflow. On 4 April 2018 at 03:19, Mike Johnson Jr wrote: > *routing.py* > > *from channels import include, route* > *

Not Found "/lobby/" django-channels routing error

2018-04-04 Thread Mike Johnson Jr
*routing.py* *from channels import include, route* *from chat import consumers* *from . import game_consumers* *channel_routing = [* * #game routing* * route('websocket.connect', game_consumers.ws_connect_lobby, path=r"^/lobby/$"),* *route('websocket.receive', gam

Re: maximum number of connection using django-channels

2018-03-20 Thread Andrew Godwin
Hi John, It's impossible to give any accurate estimate of performance numbers as it depends so heavily on hardware. Instead, I can point out to you likely bottlenecks: - Each instance of Daphne can only terminate so many connections. I would hope this is above 1000 on any reasonable machine. - Ea

Re: maximum number of connection using django-channels

2018-03-20 Thread John Carrell
Can I please ask a clarifying question? You examples above ("if you had 1 clients...") spoke to clients sending the messages. I have a use case where the clients are never (at the moment) sending messages but rather listening for messages from the server. When the server has something to sa

Re: Sent messages in loop with Django Channels

2017-07-30 Thread Artem Malyshev
This question was answered in the Channels issue tracker: https://github.com/django/channels/issues/713 On Sunday, July 30, 2017 at 2:55:37 PM UTC+3, Александр Великий wrote: > > Hi, > > I'm trying to find the way to do the following thing: > > When I get websocket message

Sent messages in loop with Django Channels

2017-07-30 Thread Александр Великий
Hi, I'm trying to find the way to do the following thing: When I get websocket message from client, I want to send to this client the data every second. What is the best way to do this? I think having consumer that will make send calls in loop is blocking approach. Also I'd like to have the wa

Re: Django channels Group send stop working

2017-07-19 Thread Artem Malyshev
I need python process stdout with debug enabled. On Wednesday, July 19, 2017 at 7:36:45 PM UTC+3, Shubham Aggarwal wrote: > > I am working on ordering system and using django-channels for sending a > notification to an admin about the order has been placed and it works only > wit

Django channels Group send stop working

2017-07-19 Thread Shubham Aggarwal
I am working on ordering system and using django-channels for sending a notification to an admin about the order has been placed and it works only with 1-2 orders perfectly after that no notification. # consumers.py from channels import Group from channels.sessions import channel_session

Re: Websocket, django-channels - an existing connection was forcibly closed by the remote host

2017-06-25 Thread Andrew Godwin
orial: https://gearheart. > io/blog/creating-a-chat-with-django-channels/ > > Here's the full traceback: > > In [1]: import websocket > In [2]: ws = websocket.WebSocket() > In [3]: > ws.connect("ws://localhost:8000")

Websocket, django-channels - an existing connection was forcibly closed by the remote host

2017-06-25 Thread Mike Johnson Jr
So I'm getting the error as described in the title of this post. I'm following this tutorial: https://gearheart.io/blog/creating-a-chat-with-django-channels/ Here's the full traceback: In [1]: import websocket In [2]: ws = websocket.WebSocket() In [3]: ws.connect("

Re: Django Channels 503 Error (full queue)

2017-06-08 Thread James Bennett
For questions about using Django, please use the django-users mailing list. This list is for the development of Django itself. On Thu, Jun 8, 2017 at 12:21 PM, Matheus Fernandes < matheus.souza.fernan...@gmail.com> wrote: > Hi! > > It's the first time that I'm developing a real-time application.

Django Channels 503 Error (full queue)

2017-06-08 Thread Matheus Fernandes
Hi! It's the first time that I'm developing a real-time application... A few days ago the application received more accesses than the usual and started to return a 503 (full queue) error. How can I handle this error? For now I cleaned my redis instance ("redis-cli flushall") Thanks :) -- You

Re: maximum number of connection using django-channels

2017-03-02 Thread Andrew Godwin
Hi, There's more about how Channels works in the docs and in talks I've given, but the short version is: * Websockets go into a server called Daphne, which is written in Twisted and so can handle hundreds or potentially thousands of simultaneous connections open at once * Any event on a websocket

maximum number of connection using django-channels

2017-03-02 Thread Gopal
Hello everyone, I am using django=1.10.5 and channels==1.0.3 in my project. First i will give you little description about my project so that you all can understand my question properly. I am getting latitude and longitude of android device(first user) using websockes. So that android application

RabbitMQ channel layer for Django Channels

2017-01-13 Thread Artem Malyshev
Hi everyone, I'm happy to announce RabbitMQ channel layer for Django Channels! During last month an a half I'm developing this library and achieve some meaningful results. I hope you will find this library interesting and will give it a try. You can find released package on PyPI:

RabbitMQ channel layer for Django Channels

2017-01-13 Thread Artem Malyshev
Hi everyone, I'm happy to announce RabbitMQ channel layer for Django Channels! During last month an a half I'm developing this library and achieve some meaningful results. I hope you will find this library interesting and will give it a try. You can find released package on PyPI:

Re: Django Channels for Client - Server asynch connection

2016-10-16 Thread Andrew Godwin
Hi Armitpal, django-developers is for discussions about development on Django, Channels and other Django projects themselves, not the use of them. For general discussion we have an IRC channel at #django-channels on Freenode or django-us...@googlegroups.com; for specific requests or bugs you can

Django Channels for Client - Server asynch connection

2016-10-16 Thread Amirtpal
Hi Django folks, Just a couple of questions on using Django Channels a) Assuming I have remote and distributed clients(e.g. custom code deployed inside web applications) and I need that to maintain an asynch flow over https to our backend django server in the cloud, how could I use Django

Re: Django Channels Load Testing Results

2016-09-27 Thread Chris Foresman
Ok, but now we're talking about something that as far as I can tell, you can't even do with gunicorn. I agree WebSockets is a great reason to consider ASGI mode, but this still feels like an apples to oranges comparison. Or is the goal to somehow get Daphne + Django channels to work

Re: Django Channels Load Testing Results

2016-09-27 Thread Erik Cederstrand
Hi Robert, > Den 26. sep. 2016 kl. 03.03 skrev Robert Roskam : > > > The unit in the second graph is requests per minute, which is inconsistent > > since the first graph is requests per second. This also makes comparison > > difficult. Also, it doesn't actually show the requests per minute valu

Re: Django Channels Load Testing Results

2016-09-26 Thread ludovic coues
t; >>>> >> >>>> Hey Chris, >> >>>> >> >>>> The goal of these tests is to see how channels performs with normal >> >>>> HTTP >> >>>> traffic under heavy load with a control. In order to compare >> >>

Re: Django Channels Load Testing Results

2016-09-26 Thread Andrew Godwin
> >>>> traffic under heavy load with a control. In order to compare >> accurately, I >> >>>> tried to eliminate variances as much as possible. >> >>>> >> >>>> So yes, there was one worker for both Redis and IPC setups. I >> provided >> &

Re: Django Channels Load Testing Results

2016-09-26 Thread Chris Foresman
and IPC setups. I > provided > >>>> the supervisor configs, as I figured those would be helpful in > describing > >>>> exactly what commands were run on each system. > >>>> > >>>> Does that help bring some co

Re: Django Channels Load Testing Results

2016-09-26 Thread ludovic coues
>> Does that help bring some context? Or would you like for me to elaborate >>>> further on some point? >>>> >>>> Thanks, >>>> Robert >>>> >>>> >>>> On Monday, September 12, 2016 at 2:38:59 PM UTC-4, Chris Foresman

Re: Django Channels Load Testing Results

2016-09-26 Thread Chris Foresman
er on some point? >>> >>> Thanks, >>> Robert >>> >>> >>> On Monday, September 12, 2016 at 2:38:59 PM UTC-4, Chris Foresman wrote: >>>> >>>> Is this one worker each? I also don't really understand the implication >

Re: Django Channels Load Testing Results

2016-09-25 Thread Robert Roskam
an wrote: >>> >>> Is this one worker each? I also don't really understand the implication >>> of the results. There's no context to explain the numbers nor if one result >>> is better than another. >>> >>> On Sunday, September 11, 2016 at

Re: Django Channels Load Testing Results

2016-09-25 Thread Robert Roskam
Hey Erik, You are absolutely correct! It was 500 rps. It's a typo. Very sorry! I'll fix it! To your other points, > At least for me, it took a

Re: Django Channels Load Testing Results

2016-09-25 Thread Robert Roskam
d the implication >>> of the results. There's no context to explain the numbers nor if one result >>> is better than another. >>> >>> On Sunday, September 11, 2016 at 7:46:52 AM UTC-5, Robert Roskam wrote: >>>> >>>> Hello All, >

Re: Django Channels Load Testing Results

2016-09-14 Thread Chris Foresman
wrote: >> >> Is this one worker each? I also don't really understand the implication >> of the results. There's no context to explain the numbers nor if one result >> is better than another. >> >> On Sunday, September 11, 2016 at 7:46:52 AM UTC-5, Robert Ros

Re: Django Channels Load Testing Results

2016-09-13 Thread Erik Cederstrand
> Den 13. sep. 2016 kl. 09.28 skrev Erik Cederstrand > : > > First of all, thanks for taking the time to actually do the measurements! > It's insightful and very much appreciated. > > [...]300K requests in 10 minutes is 500 rps, but the text says 500 rps. Which > is it?

Re: Django Channels Load Testing Results

2016-09-13 Thread Michael Manfre
> >> On Sunday, September 11, 2016 at 7:46:52 AM UTC-5, Robert Roskam wrote: >>> >>> Hello All, >>> >>> The following is an initial report of Django Channels performance. While >>> this is being shared in other media channels at this time, I

Re: Django Channels Load Testing Results

2016-09-13 Thread Erik Cederstrand
> Den 13. sep. 2016 kl. 03.41 skrev Robert Roskam : > > Hey Chris, > > The goal of these tests is to see how channels performs with normal HTTP > traffic under heavy load with a control. In order to compare accurately, I > tried to eliminate variances as much as possible. > > So yes, there w

Re: Django Channels Load Testing Results

2016-09-12 Thread Robert Roskam
gt; Hello All, >> >> The following is an initial report of Django Channels performance. While >> this is being shared in other media channels at this time, I fully expect >> to get some questions or clarifications from this group in particular, and >> I&#

Re: Django Channels Load Testing Results

2016-09-12 Thread Chris Foresman
ollowing is an initial report of Django Channels performance. While > this is being shared in other media channels at this time, I fully expect > to get some questions or clarifications from this group in particular, and > I'll be happy to add to that README anything to help describe t

Django Channels Load Testing Results

2016-09-11 Thread Robert Roskam
Hello All, The following is an initial report of Django Channels performance. While this is being shared in other media channels at this time, I fully expect to get some questions or clarifications from this group in particular, and I'll be happy to add to that README anything to help des

Re: Django Channels and WebSocket Routing and URL Parameters

2016-08-18 Thread Robert Roskam
Awesome! I was looking for this way back in early May and couldn't find it. Shame on me for not reading the docs. Robert Roskam On Thursday, August 18, 2016 at 1:12:26 PM UTC-4, Andrew Godwin wrote: > > Hi Robert, > > That blog post dates from before the URL/parameter matching in channels. > Yo

Re: Django Channels and WebSocket Routing and URL Parameters

2016-08-18 Thread Andrew Godwin
Hi Robert, That blog post dates from before the URL/parameter matching in channels. You can now do things like this: chat_routing = [ route("websocket.connect", chat_connect, path=r"^/(?P[a-zA-Z0-9_]+)/$), route("websocket.disconnect", chat_disconnect), ] routing = [ # You can use a

Django Channels and WebSocket Routing and URL Parameters

2016-08-18 Thread Robert Roskam
It seems like passing parameters through routing for websockets should be something that we want, but I've been surprised that I've seen absolutely 0 comments or questions on this so far. What am I saying specifically? Let me show you from the popular article that jacobian wrote up on Heroku's

Re: My Take on Django Channels

2016-05-06 Thread Carl Meyer
Hi Andrew, Replying off-list just to say that I totally understand your frustration here, and I wish I weren't contributing to it :( I hope I'm managing to speak my mind without being an asshole about it, and I hope you'd tell me if I failed. Really glad Jacob stepped up on the DEP; I was thinkin

Re: My Take on Django Channels

2016-05-06 Thread Ryan Hiebert
> On May 6, 2016, at 7:21 AM, Mark Lavin wrote: > > Ryan, > > Sorry if you felt I was ignoring your reply to focus on the discussion with > Andrew. You both made a lot of the same points at about the same time but I > did want to touch on a couple things. I totally get it. Focus on the Jedi,

Re: My Take on Django Channels

2016-05-06 Thread Mark Lavin
Ryan, Sorry if you felt I was ignoring your reply to focus on the discussion with Andrew. You both made a lot of the same points at about the same time but I did want to touch on a couple things. On Thursday, May 5, 2016 at 4:21:59 PM UTC-4, Ryan Hiebert wrote: > > Thank you, Mark, for starting

Re: My Take on Django Channels

2016-05-06 Thread Mark Lavin
Yes I agree that we do want different things and have different goals. There is nothing wrong with coming to a state of respectful disagreement. I'm glad that some of the feedback could be helpful and I hope it can be incorporated into Channels. As for a DEP, that would be nice and I'd love to

Re: My Take on Django Channels

2016-05-05 Thread Andrew Godwin
On Thu, May 5, 2016 at 5:13 PM, Mark Lavin wrote: > Yes I agree with the value of a standardized way of communicating between > these processes and I listed that as a highlight of Channels, though it > quickly shifted into criticism. I think that's where we are crossing paths > with relation to K

Re: My Take on Django Channels

2016-05-05 Thread Andrew Godwin
On Thu, May 5, 2016 at 4:22 PM, Carl Meyer wrote: > > I've no desire either to aggravate your RSI or kick you in the teeth! I > understand the multiple competing pressures here and won't stand in the > way of a merge into 1.10 sans DEP if that still seems like the best path > forward to you. It's

Re: My Take on Django Channels

2016-05-05 Thread Jacob Kaplan-Moss
On Thu, May 5, 2016 at 7:22 PM, Carl Meyer wrote: > I think channels, multiple-template-engines, and > reworked-middleware (and migrations, for that matter) are all > rethinkings of long-standing core aspects of how Django works, which in > my mind makes them prime DEP candidates, > There seems

Re: My Take on Django Channels

2016-05-05 Thread Mark Lavin
Yes I agree with the value of a standardized way of communicating between these processes and I listed that as a highlight of Channels, though it quickly shifted into criticism. I think that's where we are crossing paths with relation to Kombu/AMQP as well. I find the messaging aspect of Channe

Re: My Take on Django Channels

2016-05-05 Thread Carl Meyer
On 05/05/2016 04:37 PM, Andrew Godwin wrote: > To be honest, I had entirely forgotten the DEP process existed until > this thread started up; I'm not sure what to blame this on, but as a > member of the tech board I haven't got an email about approving a DEP > since last October, so it's been a whi

Re: My Take on Django Channels

2016-05-05 Thread Andrew Godwin
On Thu, May 5, 2016 at 2:39 PM, Carl Meyer wrote: > Hi Andrew, > > On 05/05/2016 02:19 PM, Andrew Godwin wrote: > > I will put my hand up and say that this sidestepped the DEP process, and > > that's entirely my fault. It was not my intention; I've been working on > > this for over two years, and

Re: My Take on Django Channels

2016-05-05 Thread Andrew Godwin
On Thu, May 5, 2016 at 2:19 PM, Mark Lavin wrote: > Thank you for your comments and I have some brief replies. > > > If I'm understanding it correctly, groups are an emulated broadcast. I'm > saying it would be an advantage for it to use pub/sub but it does not. > You are correct; the reason Red

Re: My Take on Django Channels

2016-05-05 Thread Carl Meyer
Hi Andrew, On 05/05/2016 02:19 PM, Andrew Godwin wrote: > I will put my hand up and say that this sidestepped the DEP process, and > that's entirely my fault. It was not my intention; I've been working on > this for over two years, and only last year did I go public with my > semi-final design and

Re: My Take on Django Channels

2016-05-05 Thread Mark Lavin
Thank you for your comments and I have some brief replies. On Thursday, May 5, 2016 at 4:20:06 PM UTC-4, Andrew Godwin wrote: > > > > On Thu, May 5, 2016 at 12:34 PM, Mark Lavin > wrote: > > The main gains are (in my opinion): > - The same server process can serve both HTTP and WebSockets withou

Re: My Take on Django Channels

2016-05-05 Thread Mark Lavin
Andrew, I worked very hard to edit the tone of this message and I'm sorry if you felt anything in here was a personal attack. That certainly was not my intent. My natural speaking tendency leans toward hyperbole and I think there may have been places which got away from me here. Best, Mark O

Re: My Take on Django Channels

2016-05-05 Thread Ryan Hiebert
Thank you, Mark, for starting this discussion. I, too, found myself simply accepting that channels was the right way to go, despite having the same questions you do. I realize this shouldn't be, so I've chimed in on some of your comments. > On May 5, 2016, at 2:34 PM, Mark Lavin wrote: > > [s

Re: My Take on Django Channels

2016-05-05 Thread Andrew Godwin
On Thu, May 5, 2016 at 12:34 PM, Mark Lavin wrote: > After somewhat hijacking another thread > https://groups.google.com/d/msg/django-developers/t_zuh9ucSP4/eJ4TlEDMCAAJ > I thought it was best to start fresh and clearly spell out my feelings > about the Channels proposal. To start, this discussi

My Take on Django Channels

2016-05-05 Thread Mark Lavin
After somewhat hijacking another thread https://groups.google.com/d/msg/django-developers/t_zuh9ucSP4/eJ4TlEDMCAAJ I thought it was best to start fresh and clearly spell out my feelings about the Channels proposal. To start, this discussion of “Django needs a websocket story” reminds me very

Re: Feedback on Django Channels

2016-04-01 Thread Andrew Godwin
> > > Well, in that case I would consider defining the consumer as a required, > but > keyword (and keyword-only in Python3) argument, specified in the end by > convention. Putting it between the channel and channel parameters is ugly > IMO. > > It would be easy enough to change all the docs and ex

Re: Feedback on Django Channels

2016-04-01 Thread Shai Berger
On Saturday 02 April 2016 00:38:31 Andrew Godwin wrote: > On Fri, Apr 1, 2016 at 11:32 PM, Shai Berger wrote: > > Hi, > > > > Finally found the time to go through this discussion. > > > > The first note that comes to mind is: > > > > Although it has already been pointed out more than once that

Re: Feedback on Django Channels

2016-04-01 Thread Andrew Godwin
On Fri, Apr 1, 2016 at 11:32 PM, Shai Berger wrote: > Hi, > > Finally found the time to go through this discussion. > > The first note that comes to mind is: > > Although it has already been pointed out more than once that positional > arguments cannot follow keyword arguments, you both (Andrew a

Re: Feedback on Django Channels

2016-04-01 Thread Shai Berger
Hi, Finally found the time to go through this discussion. The first note that comes to mind is: Although it has already been pointed out more than once that positional arguments cannot follow keyword arguments, you both (Andrew and Vincent) keep giving examples such as # SYNTAX ERROR

Re: Feedback on Django Channels

2016-03-22 Thread Andrew Godwin
On Tue, Mar 22, 2016 at 4:04 PM, Michael Manfre wrote: > > If not provided out of the box, there needs to be a supported way of > wiring in encryption. The security/compliance person at my job stated that > only securing the transport was not good enough for our compliance > requirements when I w

Re: Feedback on Django Channels

2016-03-22 Thread Michael Manfre
On Tue, Mar 22, 2016 at 1:44 PM, Andrew Godwin wrote: > Indeed, we run Redis over TLS tunnels at work to fulfill this requirement, > so I know transport security is required, but at the same time reinventing > it might be more work than we need - would you trust our internal symmetric > encryptio

Re: Feedback on Django Channels

2016-03-22 Thread Andrew Godwin
Indeed, we run Redis over TLS tunnels at work to fulfill this requirement, so I know transport security is required, but at the same time reinventing it might be more work than we need - would you trust our internal symmetric encryption system, or go for TLS tunnels instead? Still, if we want to d

Re: Feedback on Django Channels

2016-03-22 Thread Donald Stufft
> On Mar 22, 2016, at 1:24 PM, Jacob Kaplan-Moss wrote: > > I do think encrypting the Redis channel layer is something we should offer: > Redis out of the box doesn't do transport-layer encryption, which is going to > make Channels a hard sell to anyone with any for of regulatory/compliance >

Re: Feedback on Django Channels

2016-03-22 Thread Jacob Kaplan-Moss
I do think encrypting the Redis channel layer is something we should offer: Redis out of the box doesn't do transport-layer encryption, which is going to make Channels a hard sell to anyone with any for of regulatory/compliance requirements. [1] I think probably Fernet [2] is the right way to do t

Re: Feedback on Django Channels

2016-03-21 Thread Andrew Godwin
The channel layer could indeed use SECRET_KEY, since it's loaded in via a Django codepath in both the protocol server and the worker server. It's better done as a channel layer feature rather than in Channels/Daphne directly, as then it requires no extra supporting code in anything else that does

Re: Feedback on Django Channels

2016-03-21 Thread Josh Smeaton
Assuming the frontend has access to DJANGO_SETTINGS_MODULE, couldn't it use the SECRET_KEY to encrypt the message before passing it to the message broker? On message receipt it could then use the SECRET_KEY to decrypt the message. It'd be nice if encryption were an option encoded within the mes

Re: Feedback on Django Channels

2016-03-21 Thread Andrew Godwin
On Mon, Mar 21, 2016 at 12:11 PM, Sean Brant wrote: > How does the new channels model handle requests with sensitive > information? Say you have a login view and the user is submitting a > username/password. Does the password get serialized into the message queue > as plain text? If so is that a

Re: Feedback on Django Channels

2016-03-21 Thread Andrew Godwin
On Mon, Mar 21, 2016 at 9:55 AM, David Evans wrote: > On the static files question, I'm about to release v3 of WhiteNoise ( > http://whitenoise.evans.io/en/latest/changelog.html) which provides the > option to integrate via Django middlware, rather than wsgi middleware. (It > uses the FileRespons

Re: Feedback on Django Channels

2016-03-21 Thread Sean Brant
How does the new channels model handle requests with sensitive information? Say you have a login view and the user is submitting a username/password. Does the password get serialized into the message queue as plain text? If so is that a security concern users should be aware of? Sean On Mon, Mar

Re: Feedback on Django Channels

2016-03-21 Thread David Evans
On the static files question, I'm about to release v3 of WhiteNoise (http://whitenoise.evans.io/en/latest/changelog.html) which provides the option to integrate via Django middlware, rather than wsgi middleware. (It uses the FileResponse class, which didn't exist when I first wrote WhiteNoise.)

Re: Feedback on Django Channels

2016-03-19 Thread Jacob Kaplan-Moss
On Thu, Mar 17, 2016 at 1:44 PM, Florian Apolloner wrote: > Yes, this seems like a major pain point, especially since the routing does > not scale if you add another app, ie you need to add a wrapper which then > dispatches to the individual connect routines. In a best case scenario I'd > just ha

Feedback on Django Channels

2016-03-19 Thread Jacob Kaplan-Moss
Hi folks (and especially Andrew): I've just completed writing an example Channels app [1] for an article about Channels [2]. Overall it was a super-pleasant experience: Channels seems pretty solid, the APIs make sense to me, and I couldn't be more excited about the new things this'll let me do! I

Re: Feedback on Django Channels

2016-03-19 Thread Andrew Godwin
You're right. Assume I put the keyword arguments at the end, sorry - the two positional arguments are the channel name and the consumer. On Fri, Mar 18, 2016 at 12:21 PM, Ryan Hiebert wrote: > > On Mar 18, 2016, at 9:58 AM, Andrew Godwin wrote: > > routing = [ > route("http.request", ViewCo

Re: Feedback on Django Channels

2016-03-19 Thread Andrew Godwin
I like most of it apart from the fact you can set a consumer to consume ANY channel, which seems incredibly dangerous - when a channel is wrongly consumed the only visible error is usually just a lack of response to the end client, and no two channels have messages that are similar in any useful wa

Re: Feedback on Django Channels

2016-03-19 Thread Andrew Godwin
Yes, my intent is that "path" is just a stand-in for "any string key in a message", thus you could route other ways (for example, `method` in http.request, though that's probably not super useful inside Django). Andrew On Sat, Mar 19, 2016 at 1:40 PM, Vincent wrote: > Andrew, > > Thanks for the

Re: Feedback on Django Channels

2016-03-19 Thread Vincent
Andrew, Ah, excellent. I just took a short break (too many LOC at work today), and while I was away I was thinking about all of this. Here's what I came up with: https://gist.github.com/orokusaki/17b4cf734b4d2f2af117 On Friday, March 18, 2016 at 3:57:38 PM UTC-4, Andrew Godwin wrote: > > > > O

Re: Feedback on Django Channels

2016-03-19 Thread Vincent
Andrew, Thanks for the explanation. (re: including based only on path, routing based on channel (and optionally path?)), I really really like that simplicity, the more I think about it. Expanding on that to include your prior examples, I'm assuming `path` is just incidental for http / websocke

Re: Feedback on Django Channels

2016-03-19 Thread Florian Apolloner
On Thursday, March 17, 2016 at 9:56:40 PM UTC+1, Jacob Kaplan-Moss wrote: > > I'd considered an API like this, and it's certainly clean and > straightforward. However, we've already got a URL routing library in > Django, so I think I'd like to try to find a way to re-use it for > websockets. I

Re: Feedback on Django Channels

2016-03-19 Thread Andrew Godwin
On Thu, Mar 17, 2016 at 1:41 PM, Jacob Kaplan-Moss wrote: > > > 1. Debugging errors: > > I found debugging errors that happen in a consumer to be *really* > difficult -- errors mostly presented as things just silently not working. > It took a ton of messing around with logging setups before I coul

Re: Feedback on Django Channels

2016-03-19 Thread James Pic
Perhaps it is a bit early for this but Is there anywhere origin is checked against ALLOWED_HOSTS ? Middleware support would be nice to but I guess you'll come to that when implementing user authentication. Keep up the great work ! -- You received this message because you are subscribed to the G

Re: Feedback on Django Channels

2016-03-19 Thread Andrew Godwin
Hi Vincent, I think you make some good points - in particular, I think includes are probably a necessity, as you say. However, I disagree we should let people have either channel->url or url->channel; I'd like us not to try and give people multiple ways to do things if we can help it, especially i

Re: Feedback on Django Channels

2016-03-19 Thread Vincent
Also note, I just copy-pasted the same SyntaxError (kwarg before arg). On Friday, March 18, 2016 at 3:40:22 PM UTC-4, Vincent wrote: > > Hey Andrew, > > Thanks for looking through all that, and for the reply. > > I like the simplicity of your updated examples. I started to make a > counter-exampl

Re: Feedback on Django Channels

2016-03-19 Thread Ryan Hiebert
> On Mar 18, 2016, at 9:58 AM, Andrew Godwin wrote: > > routing = [ > route("http.request", ViewConsumer), > route("websocket.connect", path="^chat/(?P[^/]+)/$", ChatConnect), > route("sms.receive", sender="+44(?P[0-9]+)$", > UkSmsConsumer), > include(path="^notifications", "not

Re: Feedback on Django Channels

2016-03-19 Thread Florian Apolloner
On Thursday, March 17, 2016 at 5:42:05 PM UTC+1, Jacob Kaplan-Moss wrote: > > Channels routes all WebSocket connections to a single set of consumers > (the `websocket.*` consumers). This means that if you want multiple > WebSocket URLs in a single app you need to manually parse the path. And, to

Re: Feedback on Django Channels

2016-03-19 Thread Vincent
Jacob, Florian, Andrew, I've spent the last 200 minutes thinking this through and writing, and here's what I've come up with: https://gist.github.com/orokusaki/c67d46965a4ebeb3035a Below are the full contents of that Gist (but I recommend the Gist for formatting). I also created https://githu

Re: Feedback on Django Channels

2016-03-18 Thread Vincent
Hey Andrew, Thanks for looking through all that, and for the reply. I like the simplicity of your updated examples. I started to make a counter-example to suggest that `include` be inside of a `route` (https://gist.github.com/orokusaki/c0c934013ee7911071ef). But then, as I thought through this

  1   2   >