Re: Django Async DEP

2019-06-08 Thread Andrew Godwin
On Sat, Jun 8, 2019 at 3:14 AM Pascal Chambon wrote: > Hello, > > There is something a little scary for me, in changing all the core of > Django to async, when this really helps only, imho, a tiny fraction of > users : websocket/long polling services, and reddit-like sites with > thousands+ hits

Re: Django Async DEP

2019-06-07 Thread Andrew Godwin
On Fri, Jun 7, 2019 at 9:19 AM John Obelenus wrote: > I wonder about the end-result payoff of this approach. In general, > Django/Python code is not going to be I/O bound, which is where > asynchronous approaches are going to get the bang for your buck. Even when > it comes to DB access—the DB

Re: Django Async DEP

2019-06-06 Thread Andrew Godwin
On Thu, Jun 6, 2019 at 3:20 PM Pkl wrote: > Hello, > > I'm a little late to the party, thanks for the big overview on this > complex matter. > > There are lots of thinks I still don't understand though, for example > regarding "what it unlocks". What asyncio structures would allow to run >

Re: Django Async DEP

2019-06-01 Thread Andrew Godwin
on writing up a funding plan for this, including various options for how we can pay people for their work. Andrew On Tue, May 14, 2019 at 2:55 AM Andrew Godwin wrote: > > > On Mon, May 13, 2019 at 4:31 AM Tobias Kunze wrote: > >> Hi Andrew (and everybody following the dis

Re: Django Async DEP

2019-05-14 Thread Andrew Godwin
On Mon, May 13, 2019 at 4:31 AM Tobias Kunze wrote: > Hi Andrew (and everybody following the discussion, of course), > > First off, thank you for your work here. DEP9 is an excellent technical > document, and it was as easy and pleasant to read as a document of this > scope and depth can be. > >

Re: DEP 0008 (Formatting using Black) is accepted

2019-05-10 Thread Andrew Godwin
w! Andrew On Friday, May 10, 2019 at 6:46:37 PM UTC-7, Andrew Godwin wrote: > > Hi everyone, > > The Technical Board has voted on DEP 0008 ( > https://github.com/django/deps/blob/master/accepted/0008-black.rst), > after the extensive discussion here and the updates done as a

DEP 0008 (Formatting using Black) is accepted

2019-05-10 Thread Andrew Godwin
Hi everyone, The Technical Board has voted on DEP 0008 ( https://github.com/django/deps/blob/master/accepted/0008-black.rst), after the extensive discussion here and the updates done as a result. The board voted in favour, and so I've moved the DEP into the accepted directory. One of the key

Re: Django Async DEP

2019-05-10 Thread Andrew Godwin
On Fri, May 10, 2019 at 3:51 AM Asif Saif Uddin wrote: > I have a separate question. Is it possible to get the django 3.0 asgi > things into a different package to use with django 2.2? > > Thanks for the great work. > > Unfortunately not - this is covered a little in the section in the DEP that

Re: Django Async DEP

2019-05-09 Thread Andrew Godwin
On Thu, May 9, 2019 at 2:44 PM KimSia Sim wrote: > I have a question that strays slightly away from the main topic. I have > looked at Tom's repos. Is it encode/databases > https://github.com/encode/databases that you're referring to? > > Or do you mean Tom's working on an async ORM that works

Re: Django Async DEP

2019-05-09 Thread Andrew Godwin
On Thu, May 9, 2019 at 2:15 PM Patryk Zawadzki wrote: > I don't think it makes a significant difference from a readability >> perspective in this example. It does have some advantages, though: >> >> - It could be easier to implement a sync version based on the async one, >> or vice-versa, if

Re: Django Async DEP

2019-05-09 Thread Andrew Godwin
> > I don't think it makes a significant difference from a readability > perspective in this example. It does have some advantages, though: > > - It could be easier to implement a sync version based on the async one, > or vice-versa, if each one has its own class. It will probably be more DRY. > -

Re: Django Async DEP

2019-05-09 Thread Andrew Godwin
On Thu, May 9, 2019 at 1:04 PM Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > Hello Andrew, > > Thanks for your work putting together this plan. Within our constraints, > it's a good plan. > > Regarding templating, I would say it isn't a priority because a developer > who knows

Re: Django Async DEP

2019-05-09 Thread Andrew Godwin
> Slightly off-topic but once we have an async ORM, making it synchronous is not impossible (I believe either Channels or Daphne already have shims that use a worker thread to spin the event loop until a future is fulfilled). This is in fact the proposed way to make the ORM work with both sync

Re: Django Async DEP

2019-05-09 Thread Andrew Godwin
I would agree with both of you - I think the most important thing is to get the view layer async-capable, as that then lets sites use any manner of asynchronous libraries that already exist to get experiments and unique things going. Tom Christie, for example, has already started work on an

Django Async DEP

2019-05-09 Thread Andrew Godwin
Hello everyone, While the ASGI patch (https://github.com/django/django/pull/11209) is maybe the first small step in a long road to async, it's the only real one we could do without a DEP as it purely pulls on existing specs and bugs. To that end, I have drafted a DEP (provisionally #0009),

Re: First ASGI pull request is ready for review

2019-05-01 Thread Andrew Godwin
where people might input. There’s >> massive interest.  >> >> Great work as ever Andrew. Thank you so much! >> >> C. >> >> On Wed, 1 May 2019 at 08:46, Andrew Godwin wrote: >> >>> >>> >>> On Tue, Apr 30, 2019 at 11:34 PM Mariu

Re: First ASGI pull request is ready for review

2019-05-01 Thread Andrew Godwin
On Tue, Apr 30, 2019 at 11:34 PM Mariusz Felisiak < felisiak.mari...@gmail.com> wrote: > Thanks for this patch. Can you add a trac ticket? also Can you give me & > Carlton few days for review? I should be able to do this somewhere in the > next week. > I can indeed. I wasn't sure if you wanted

Re: First ASGI pull request is ready for review

2019-04-30 Thread Andrew Godwin
So, it looks like most of the comments on this PR have happened and been resolved - unless anyone has any objections, I will merge it in after a couple more days (just in time for PyCon US). Andrew On Wed, Apr 24, 2019 at 1:50 PM Andrew Godwin wrote: > Hi everyone, > > Just wante

Re: A different approach for the auto-reloader

2019-04-30 Thread Andrew Godwin
>From my read this also looks like it would make the auto-reloader able to work a lot better with an async-capable server, so I would be in favour given that is likely in the future as well. Andrew On Tue, Apr 23, 2019 at 9:33 PM Ramiro Morales wrote: > Hi all, > > I had a stab at a somewhat

Re: Proposal to format Django using black

2019-04-30 Thread Andrew Godwin
Hi all, As per the DEP process, I have merged DEP 8, Formatting Code With Black, into the DEP repo as a draft. This doesn't mean it's decided yet - any DEP that meets quality requirements gets merged as a draft - but it means that we're one step closer to doing so. What follows is further

First ASGI pull request is ready for review

2019-04-24 Thread Andrew Godwin
Hi everyone, Just wanted to drop a note and say that the first pull request in the series needed to enable async in Django is now ready for review: https://github.com/django/django/pull/11209 This is a very minimal amount of work to get Django async-safe and understanding ASGI as an application

Re: Proposal to format Django using black

2019-04-14 Thread Andrew Godwin
We've used Black for the Channels/ASGI projects for about the last year, and I have nothing but good opinions on it from that perspective. It's made pull requests much easier to get formatted, because fixing it is just a case of running a single command (and if you do the right pre-commit hook,

Re: Post mortem on today's packaging error.

2019-02-11 Thread Andrew Godwin
I also ran into this several times while releasing Channels - several releases had the wrong files ship out in them due to Git weirdness. In the end, my solution was to build the release artifacts over on Travis to guarantee a fresh build environment each time, but I doubt that would work for

Re: Potential suspension of Channels development

2019-01-31 Thread Andrew Godwin
me try that, but I may turn that off if it turns out to be too much. Thanks all who came forward. I'm hopeful that things can be kept going! Andrew On Wed, Jan 30, 2019 at 2:18 PM Andrew Godwin wrote: > Just to update on this - nobody has individually come forward to help > full-time, th

Re: Potential suspension of Channels development

2019-01-30 Thread Andrew Godwin
the repos come Feb 1st, and barring positive confirmation someone else is going to actively take over I'll put up notices on all the projects that they are actively unmaintained apart from security issues. Andrew On Thu, Jan 17, 2019 at 10:06 AM Andrew Godwin wrote: > Hi all, > > I'

Re: Potential suspension of Channels development

2019-01-21 Thread Andrew Godwin
On Mon, Jan 21, 2019 at 4:34 AM Michael Martinez < writemichaelmarti...@gmail.com> wrote: > Hi Andrew > > To me, Websockets is the defining use case for using Django Channels. From > a user POV, saying that Channels is focused on the wrong problem > (websockets) is like saying Django is too

Re: Potential suspension of Channels development

2019-01-20 Thread Andrew Godwin
On Sat, Jan 19, 2019 at 12:13 PM Carlton Gibson wrote: > Hey Andrew. > > I've been thinking a lot about this. You clearly shouldn't be maintaining > Channels single-handedly indefinitely. > > I know Channels started out separately, but, it's time to think about > what, if anything of channels,

Re: Potential suspension of Channels development

2019-01-17 Thread Andrew Godwin
outline what's needed. Andrew On Thu, Jan 17, 2019 at 10:10 AM Nasir Hussain wrote: > Hi andrew, I can help in maintaining the projects. Kindly let me know what > are the next steps. > > Thanks > > On Thu, Jan 17, 2019, 11:07 PM Andrew Godwin >> Hi all, >> >>

Potential suspension of Channels development

2019-01-17 Thread Andrew Godwin
Hi all, I'm writing to you all to update you on the current situation of Channels and related libraries (channels-redis and Daphne) and potentially ask for help. I've been the sole maintainer of these projects for quite a while and it has become unsustainable - all of my energy is taken up

Re: Reactive frontend using Django templates?

2018-11-21 Thread Andrew Godwin
Hi Brylie, There are no such efforts at the moment - Django is still focused on being a backend language for the most part, and we don't really have any of the pieces in place to do dynamic template rendering. We're more focused on providing the fundamental components to let other people build

Re: Requiring sqlparse for sqlite introspection

2018-10-08 Thread Andrew Godwin
Adding sqlparse into the introspection code for SQLite specifically means it's going to be a runtime dependency for anything to do with migrations. I'm alright having that be the case, but I do think we should make sure the tests run with SQLite as otherwise a large section of the most

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

2018-08-28 Thread Andrew Godwin
entation, which states that middleware’s __init__() is only >>>called *once*, on server startup. >>>2. Any middleware which performs more-than-trivial work in its >>> __init__() causes massive latency on any incoming request. >>> >>> >>>

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

Re: WebSocket connection failed: error during WebSocket handshake: Unexpected response code: 200

2018-06-24 Thread Andrew Godwin
Hi - this mailing list is for the development of Django itself. You already posted on django-users (the right one) - please don’t double-post! I’ll get around to replying to that other one in a day or two. Andrew On Sun, 24 Jun 2018 at 18:36, wrote: > Hi I am deploying a website with a live

Re: A Django Async Roadmap

2018-06-09 Thread Andrew Godwin
On Fri, Jun 8, 2018 at 11:31 PM Josh Smeaton wrote: > > The only real concern I have at the moment is around your comments > regarding on demand foreign key traversal. If existing code running > synchronously is going to be impacted, that's going to be very difficult > for a lot of people. If

Re: A Django Async Roadmap

2018-06-08 Thread Andrew Godwin
Chaim: For references to get up to speed on async concepts, there's not a lot of great beginner-level stuff out there. I have a practical guide to async functionality at https://www.aeracode.org/2018/02/19/python-async-simplified/, but it's not great at going into detail on Web stuff and why it

Re: A Django Async Roadmap

2018-06-05 Thread Andrew Godwin
> > > I think getting rid of the related field references could be a big issue > here and cause a lot of headaches for existing applications. Could we do > this in a backwards compatible way at all? I wonder if PEP 567 > could help here, could we >

A Django Async Roadmap

2018-06-04 Thread Andrew Godwin
Hello everyone, For a while now I have been working on potential plans for making Django async-capable, and I finally have a plan I am reasonably happy with and which I think we can actually do. This proposed roadmap, in its great length, is here:

Re: Channels - Groups and discovery

2018-03-25 Thread Andrew Godwin
what might and might not be possible at each layer > before proposing any specific ideas. > > There's some fantastic stuff in channels though, and was fairly easy to > hook things together after reading the docs. I'm looking forward to using > it more. > > On Sunday, 25

Re: Channels - Groups and discovery

2018-03-24 Thread Andrew Godwin
Nobody else has suggested this particular approach yet, and while it would definitely make writing applications much more reliable, there's no particularly easy way to distribute an interface that I can think of (even the ASGI specification ends up being enforced on the receiver side, though

Re: Threads and requests with Channels 2.0

2018-03-20 Thread Andrew Godwin
Hi Jonathan, Daphne runs a single asyncio event loop in the main thread which services all protocol handling (low-level HTTP and websocket) and Channels-level async-native code (ASGI middleware, routing, async consumers). Any synchronous calls (e.g. methods on synchronous consumers) are queued up

Re: maximum number of connection using django-channels

2018-03-20 Thread Andrew Godwin
m working on convincing our team that we should change our > deployment model from its initial prototype but there is not a lot of > perceived value in that effort at the moment. > > Thanks! > > > On Thursday, March 2, 2017 at 11:26:18 AM UTC-6, Andrew Godwin wrote:

Re: Thoughts on diff-based migrations with django?

2018-02-20 Thread Andrew Godwin
Hi, This was an approach we deliberately avoided during development of the current migration system - it works poorly with diverging feature branches and requires that your developers have access to production schema at all times (and additionally that you don't have divergent

Re: binding framework third-party package for Channels 2

2018-02-17 Thread Andrew Godwin
Hi Daniel, It was something I was going to do myself once I had the time and the release support for 2.0 dies down, but if you want to take a crack at it, please do (I am more than happy to consult where I can). Andrew On Sat, Feb 17, 2018 at 1:13 PM, Daniel Gilge wrote: >

Re: Adding a tutorial for Channels

2018-02-05 Thread Andrew Godwin
I would very much welcome a narrative tutorial like the Django docs - I did not have the time to personally write and QA one before the 2.0 release, unfortunately. I'm happy to help out if you want to email me personally to discuss! Andrew On Sun, Feb 4, 2018 at 10:39 PM, David Foster

Re: Default to BigAutoField

2017-08-18 Thread Andrew Godwin
I don't see any other solutions that aren't settings doing spooky-action-at-a-distance to primary keys, and that's something I really don't want to see. Andrew > > On Thu, Aug 17, 2017 at 02:43:07PM -0700, Andrew Godwin wrote: > >> To elaborate on the solution we eventually came

Re: Default to BigAutoField

2017-08-17 Thread Andrew Godwin
To elaborate on the solution we eventually came up with - we default models to use a new BigAutoField that migrations will pick up on and generate migrations to alter columns to, but for safety reasons for those that don't read release notes, made the migration autodetector ask you if you want to

Re: Automatic prefetching in querysets

2017-08-17 Thread Andrew Godwin
Just some quick thoughts, as most of the points I would bring up have been discussed: - This should definitely be opt-in for the first release, it's too big a change to make opt-out straight away. - You should be able to turn it on/off per model, probably in Meta, not in a setting, and obviously

Re: Sending messages to the group does not work after a few minutes online

2017-08-05 Thread Andrew Godwin
It seems you send "close": True to the group when a connection comes in, which means that only one websocket at a time is going to be open in it (all others in the group will be disconnected when a new one connects) Andrew On Sun, Aug 6, 2017 at 9:48 AM, Luís Antonio De Marchi

Re: Rethinking ASGI & Channels

2017-07-23 Thread Andrew Godwin
On Fri, Jul 21, 2017 at 4:10 AM, Tom Christie wrote: > Hi Andrew, > > Thanks for writing that up so comprehensively! > > Definitely in favor of moving to a server:consumer interface - as you say > that doesn't preclude over-the-network from being one of the possible >

Re: Rethinking ASGI & Channels

2017-07-13 Thread Andrew Godwin
stantly. > > Probably this design shift will feet 2.0 release. > > I'll try to implement it in the separate channels branch after PyCon > Russia 2017. > > > On Wednesday, July 12, 2017 at 2:25:27 PM UTC+3, Andrew Godwin wrote: >> >> Hi all, >> >> After

Rethinking ASGI & Channels

2017-07-12 Thread Andrew Godwin
Hi all, After recent threads on ASGI and similar problems ( https://groups.google.com/forum/#!topic/django-developers/_314PGl3Ao0), and my own introspection about where we are almost two years in, there are some changes I would like to make to the overall way ASGI/Channels works, both to make

Re: About migrations

2017-07-07 Thread Andrew Godwin
There is already a run-before constraint you can add to migrations for exactly this purpose! It's called "run_before" and is in the same format as the dependencies IIRC. Andrew On Fri, Jul 7, 2017 at 6:36 PM, Carl Meyer wrote: > On 07/07/2017 05:09 AM, Patryk Zawadzki wrote:

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

2017-06-25 Thread Andrew Godwin
Please don't cross-post questions to both mailing lists. I will answer this on django-users after the weekend. Andrew On Sun, Jun 25, 2017 at 9:35 AM, Mike Johnson Jr wrote: > So I'm getting the error as described in the title of this post. > > I'm following this

Re: About migrations

2017-06-23 Thread Andrew Godwin
> > > > The advantages comes from db type independency, this is true, but in the > other side you're including the app layer dependency. > > Let's imagine that one of builtin field will change it's definition. > Running migrations on two different Django versions will produce two > different

Re: About migrations

2017-06-23 Thread Andrew Godwin
Hi Marcin, Some of these are problems, yes, but you have to understand they are tradeoffs and the alternative is, in my opinion, worse. > I believe that there exist some solution, which drops app layer dependency ands allow using custom fields I would love to see what this would be. I spent a

Re: On ASGI...

2017-06-23 Thread Andrew Godwin
> > > > If we end up with one format for channel names and messages that is > spread across two consumption forms (in-process async and cross-process > channel layers), I think that would still be a useful enough standard and > make a lot more people happy. > > Yes. I'm not sure if there aren't

Re: On ASGI...

2017-06-16 Thread Andrew Godwin
Right - as long as you make clients deal with reconnection (which obviously they should), then as long as your load-balancing has a way to shed connections from a sticky server by closing them then all should be fine. Honestly, I have always been annoyed at the no-local-context thing in channels;

Re: On ASGI...

2017-06-15 Thread Andrew Godwin
Ah, I see, you are assuming sticky sockets. That makes things a lot easier to architecture, but a whole lot harder to load-balance (you have to get your load-balancer to deliberately close sockets when a server is overloaded as many will not go away by themselves). Still, it makes scaling down a

Re: Consider making asgi_rabbitmq an official Django project.

2017-06-14 Thread Andrew Godwin
d be nice if channels has its own > technical team rather than giving the impression that the Django > maintainers are also stewarding all other official projects. > > [0] https://www.djangoproject.com/foundation/teams/ > > On Tuesday, June 13, 2017 at 9:22:30 PM UTC-4, Andrew Godwin

Re: Consider making asgi_rabbitmq an official Django project.

2017-06-13 Thread Andrew Godwin
ommit https://github.com/proofit404/asgi_rabbitmq/commit/ > 9add0b8fec10ff93f8a813838f4f8ad87fde7e1f > > Also, I found the second maintainer for the project, Andrii Soldatenko. > He is in the mail carbon copy. > > Any insights what to do next? > > Regards, Artem. > > On Su

Re: On ASGI...

2017-06-13 Thread Andrew Godwin
On Mon, Jun 12, 2017 at 10:53 PM, Tom Christie wrote: > > def handler(channel_layer, channel_name, message): > > Oh great! That's not a million miles away from what I'm working towards on > my side. > Are you planning to eventually introduce something like that as part of

Re: Consider making asgi_rabbitmq an official Django project.

2017-06-10 Thread Andrew Godwin
Hi Artem, I know we've discussed this privately but I want to put some things on the public list (and get at least one reply). My view is that it would be useful to have it maintained, but I do not personally have the spare time to help maintain it, so it would need at least one other person to

Re: On ASGI...

2017-06-10 Thread Andrew Godwin
On Fri, Jun 9, 2017 at 8:22 PM, Tom Christie wrote: > Figure I may as well show the sort of thing I'm thinking wrt. a more > constrained consumer callable interface... > > * A callable, taking two arguments, 'message' & 'channels' > * Message being JSON-serializable

Re: Default to BigAutoField

2017-06-10 Thread Andrew Godwin
As long as you changed the actual field that ended up under the "id" column, then yes, migrations should detect it and apply all the changes during an upgrade, including to foreign keys. Generic foreign keys are another problem, however, not to mention the prospect of how many migrations and

Re: On ASGI...

2017-06-08 Thread Andrew Godwin
On Thu, Jun 8, 2017 at 8:55 PM, Tom Christie wrote: > > Any interface like this would literally just be "this function gets > called with every event, but you can't listen for events on your own" > > Gotcha, yes. Although that wouldn't be the case with asyncio frameworks,

Re: On ASGI...

2017-06-08 Thread Andrew Godwin
On Wed, Jun 7, 2017 at 7:05 PM, Tom Christie wrote: > Making some more progress - https://github.com/tomchristie/uvicorn > I'll look into adding streaming HTTP request bodies next, and then into > adding a websocket protocol. > > I see that the consumer interface is part

Re: On ASGI...

2017-06-02 Thread Andrew Godwin
Right. I'll try and get a full async example up in channels-examples soon to show off how this might work; I did introduce a Worker class into the asgiref package last week as well, and the two things that you need to override on that are "the list of channels to listen to" and "handle this

Re: On ASGI...

2017-06-01 Thread Andrew Godwin
Thanks for the continued speedy research, Tom! Weighing in on the design of an ASGI-direct protocol, the main issue I've had at this point is not HTTP (as there's a single request message and the body stuff could be massaged in somehow), but WebSocket, where you have separate "connect", "receive"

Re: migration lock file implementation

2017-05-24 Thread Andrew Godwin
I am personally unsure about this - it's extra overhead for smaller Django sites, and something that larger teams could easily adopt themselves. I think it might make more sense as a third-party app that plugs in? Andrew On Wed, May 24, 2017 at 12:39 PM, wrote: > To elaborate

Re: Channels delay server in development enviromnent

2017-05-24 Thread Andrew Godwin
Hi Vaclav, This is because there's only so much we can pack into runserver; when you develop with Celery, for example, you would probably need to run Celery unless you turn ALWAYS_EAGER on (and then not actually see any potential race conditions). If you don't want to run Redis locally, you can

Re: Serving static files with Channels

2017-05-12 Thread Andrew Godwin
taticfiles > declares some keywords for templates those apps use. > > > > пятница, 12 мая 2017 г., 22:06:17 UTC+3 пользователь Andrew Godwin написал: >> >> Have you tried removing the staticfiles app from INSTALLED_APPS? I >> believe that will disable it even with runwo

Re: Serving static files with Channels

2017-05-12 Thread Andrew Godwin
Have you tried removing the staticfiles app from INSTALLED_APPS? I believe that will disable it even with runworker. Andrew On Fri, May 12, 2017 at 11:14 AM, Alexander Prokhorov wrote: > Dear Colleagues, in particular Andrew ;) > > I have a problem with making Channels

Re: Need to set socket options, for no breaking after a timeout

2017-05-12 Thread Andrew Godwin
Hi Victor, Socket handling for the TCP sockets is done by Twisted inside its TCP core, so you would have to look there to see what sort of options they set when opening a HTTP/WS connection handler. I personally have not seen too many issues with WebSocket timeouts, presumably as Daphne

Re: Changing how Channels/ASGI receives messages

2017-03-28 Thread Andrew Godwin
On Tue, Mar 28, 2017 at 10:39 AM, Oskar Hahn wrote: > Hi, > > I am not sure, if I understand your proposal correctly. Do you mean, the > asgi server has to listen only to one channel or do you mean it has to > listen to one channel of any channel-type? > > So with redis, do I

Re: Changing how Channels/ASGI receives messages

2017-03-28 Thread Andrew Godwin
I have added that in to the spec: http://channels.readthedocs.io/en/latest/asgi.html#capacity Andrew On Tue, Mar 28, 2017 at 9:54 AM, Artem Malyshev wrote: > Yes, I saw your changes after I wrote my previous email. > > Global capacity for process sounds reasonable.

Re: Changing how Channels/ASGI receives messages

2017-03-28 Thread Andrew Godwin
On Tue, Mar 28, 2017 at 6:27 AM, Artem Malyshev wrote: > Hi everyone, > > It can be huge improvement for asgi_rabbitmq layer. But I'm asking > you to keep this change in the experimental branch before I implement > it for RabbitMQ layer. More questions can came up in

Changing how Channels/ASGI receives messages

2017-03-27 Thread Andrew Godwin
Hi all, I wanted to ask your feedback on a proposed change I want to make to the ASGI spec for channel layers. In particular, my goal is to make it so that Daphne only has to receive() on a single channel at any time, massively simplifying the work it takes to poll for new messages and the

Re: How Channels and Daphne handle huge HTTP requests?

2017-03-19 Thread Andrew Godwin
Hi Alexander, I believe Daphne does not yet implement body_channel support for large HTTP requests, just the response version right now. It's on the roadmap, I just need to get round to adding it in. Until then, I would advise not using it for large uploads. Andrew On Sun, Mar 19, 2017 at 1:17

Re: Will asgi become a PEP like wsgi is ?

2017-03-13 Thread Andrew Godwin
Right, what James says here is pretty much my thoughts; it has been designed from the ground up not to be tied to Django, up to and including the fact that it's in separate packages; all the Django-specific stuff is in the "channels" package, while daphne, asgi_redis, asgiref etc. are useable by

Re: Gevent based ASGI server

2017-03-13 Thread Andrew Godwin
Hi John, You are talking about a lot of ideas I want to bring into the main redis transport (improved polling, connection handling, using the channel name local part for routing, etc.), which are separate from using gevent, really; would you be open for contributing this kind of stuff back to the

Re: Will asgi become a PEP like wsgi is ?

2017-03-12 Thread Andrew Godwin
Hi Sebastian, The proposal is certainly written like a PEP, and that is somewhat on purpose, but the scope and need for it are still a bit up in the air. In particular, ASGI currently specifies two parts: - An interface for talking to channel-based message queues and a set of guarantees and

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

Re: Channels: get IP address of client websocket

2017-02-17 Thread Andrew Godwin
It's in the connect message, as message['client']: http://channels.readthedocs.io/en/latest/asgi.html#connection Andrew On Fri, Feb 17, 2017 at 10:05 AM, Fabien Millerand wrote: > As far as I know I cannot get client websocket public IP address with > channels. > > I even

Re: Some thoughts about improving migration squashing

2017-02-15 Thread Andrew Godwin
> > > You're essentially speaking about 2 things here, in my opinion: > > 1. Adding a new feature for interactive squash > 2. Improving the MigrationOptimizer > > I certainly see a point for 2. Not sure how much for 1. Anyway, your > reasoning for 2 sounds great! I'd be more than happy if you want

Re: Marking flushed sessions as not modified

2017-01-24 Thread Andrew Godwin
g the condition in the > channel_session decorator to: if session.modified and not > session.is_empty(): would solve the issue? This seems similar to what the > SessionMiddleware does. > > On Monday, January 23, 2017 at 2:59:59 PM UTC-5, Andrew Godwin wrote: >> >> Here

Re: Marking flushed sessions as not modified

2017-01-23 Thread Andrew Godwin
. Andrew On Mon, Jan 23, 2017 at 11:57 AM, Tim Graham <timogra...@gmail.com> wrote: > I'm not sure offhand. Could you provide a link to the issue so we could > look at the details? > > > On Monday, January 23, 2017 at 1:45:48 PM UTC-5, Andrew Godwin wrote: >> >>

Marking flushed sessions as not modified

2017-01-23 Thread Andrew Godwin
An interesting bug has turned up in Channels where someone is trying to remove a session using .flush(), but our decorator sees that it's been modified and then re-saves it, thinking it needs to persist data. What are people's opinions on changing flush() to also set modified=False on sessions?

Re: Django Channel asgi specs - question on how to handle a websocket connection

2017-01-03 Thread Andrew Godwin
On Mon, Jan 2, 2017 at 1:10 PM, Oskar Hahn wrote: > Hi, > > this is a question on how to interpret the asgi specs of django channels: > > https://channels.readthedocs.io/en/latest/asgi.html > > If this is the wrong place to discuss it, then please point me to the > right place. >

Re: Rethinking migrations

2016-11-08 Thread Andrew Godwin
On Tue, Nov 8, 2016 at 12:34 PM, Patryk Zawadzki wrote: > I've just hit another problem related to custom fields. > > Currently migrations contain information about "rich" fields. If you use a > custom field type, the migration code will currently import your field type >

Re: Rethinking migrations

2016-11-05 Thread Andrew Godwin
Hello! I have opinions about this :) > Possible solution (or "how I'd build it today if there was no existing > code in Django core"): > > a. Make migrations part of the project and not individual apps. This takes > care of problem 3 above. > It also means it's impossible for apps to ship

Re: RFC: DEP 7 - dependency policy

2016-11-05 Thread Andrew Godwin
I think the "maturity" criteria are pretty sensible, though I am slightly concerned about the potential for a project to be effectively unmaintained even though there's someone's name on it who are active elsewhere. Do you think there's a sensible way we could outline a few checks for what it

Channels Update, November 2016

2016-11-05 Thread Andrew Godwin
Hi everyone, It's been almost a year since the Channels funding project started, and a little while since it became an official Django project, and it's been hard to know what the state of it is at times. I'm going to start doing monthly updates on how Channels is progressing and what's going

Re: A command to optimize a squashed migration?

2016-10-31 Thread Andrew Godwin
I would say that a command to re-optimise a single migration would be a good idea, especially since it needs no changes to the stored set of run migrations since it would theoretically do the same thing. Andrew On Mon, Oct 31, 2016 at 1:58 PM, Shai Berger wrote: > Hi, > >

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

Re: Django Channels Load Testing Results

2016-09-26 Thread Andrew Godwin
You might want to run a small site with WebSockets - there are a number of reasons to use ASGI mode, and it's important we make it scale down as well as up. Andrew On Mon, Sep 26, 2016 at 1:30 PM, Chris Foresman wrote: > Why would you be running a small website in ASGI mode

Re: Channels is now an official Django project!

2016-09-09 Thread Andrew Godwin
go grow in the next new direction too. Andrew > On Friday, September 9, 2016 at 11:58:41 AM UTC-4, Andrew Godwin wrote: >> >> I agree some discussion would be nice, but I tried several times to start >> some and was met with silence each time. Given the generally positive >&g

Re: Channels is now an official Django project!

2016-09-09 Thread Andrew Godwin
d have been nice to see > some enthusiasm from others about the merits of adopting it as an official > project. > > [0] https://groups.google.com/d/topic/django-developers/ > 24DGLVVRV_s/discussion > > On Friday, September 9, 2016 at 11:14:25 AM UTC-4, Andrew Godwin wrote: >

Re: Channels is now an official Django project!

2016-09-09 Thread Andrew Godwin
make > sense to do that in the future? > > > On Friday, September 9, 2016 at 10:58:24 AM UTC-4, Andrew Godwin wrote: >> >> Hi everyone, >> >> The Technical Board approved Channels as an official Django project as >> per DEP 7, and so the repositories have been move

Channels is now an official Django project!

2016-09-09 Thread Andrew Godwin
Hi everyone, The Technical Board approved Channels as an official Django project as per DEP 7, and so the repositories have been moved under the django/ project on GitHub, as well as a few other things the DEP requires, and improving the contribution guidelines and triaging tickets. You can read

  1   2   3   4   5   >