launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #07154
[Merge] lp:~rvb/maas/frontend-bug-984728 into lp:maas
The proposal to merge lp:~rvb/maas/frontend-bug-984728 into lp:maas has been updated.
Description changed to:
This branch fixes the dev environment to make it able to use longpoll without breaking the debugging/auto-reload feature of Django's dev server.
Until now, Django was used as a proxy to txlongpoll (apache does that in production) and because the python dev server does not deal well with concurrent requests, the longpoll feature was disabled by default on a dev instance. This branch fixes that by introducing a lightweight server (nginx) that acts as a frontend to both txlongpoll and Django's dev server. This way, a longpoll request does not touch Django. This mimics what happens in production.
Why not use apache instead of nginx you might ask? Many reasons: nginx is much more lightweight and nginx is much more easy to configure as a simple process run by a user. But the main reason is that it would only have make sense to use apache if we could have reused the production's setup somehow (contrib/maas-http.conf). But it's not the case: the production uses wsgi and we want our dev frontend to be a simple proxy to Django's dev server (to be able to debug the server).
The only downside (apart from the additional [dev] dependency) is that when you run "make run" you get:
"""
0 errors found
Django version 1.3.1, using settings 'maas.demo'
Development server is running at http://0.0.0.0:5244/
Quit the server with CONTROL-C.
"""
And it you want to be able to use longpoll you have to go to http://0.0.0.0:5240/ (where the frontend server listens).
Also, once the follow-up branch (https://code.launchpad.net/~rvb/maas/longpoll-cleanup/+merge/102493) has landed, if you go directly to Django's dev server address (http://0.0.0.0:5244/) everything will "just work" but all the longpoll requests will result in a 404 and this will cause the longpoll js code to stop polling after ~5 failed attempts.
For more details, see:
https://code.launchpad.net/~rvb/maas/frontend-bug-984728/+merge/102494
--
https://code.launchpad.net/~rvb/maas/frontend-bug-984728/+merge/102494
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/frontend-bug-984728 into lp:maas.
References