GET /api/v2/video/59
HTTP 200 OK Vary: Accept Content-Type: text/html; charset=utf-8 Allow: GET, PUT, PATCH, HEAD, OPTIONS
{ "category": "DjangoCon 2010", "language": "English", "slug": "djangocon-2010--switching-addons-mozilla-org-from", "speakers": [ "Jeff Balogh" ], "tags": [ "casestudy", "djangocon", "djangocon2010" ], "id": 59, "state": 1, "title": "Switching from CakePHP to Django", "summary": "", "description": "Switching from CakePHP to Django\n\nPresented by Jeff Balogh\n\nIn January of 2010 Mozilla started switching (AMO) from\nCakePHP to Django. We see about 120 million web requests per month and 1.4\nmillion visitors per day. This talk will be a case study of scaling and\ndeploying a large website (and getting faster than PHP) with MySQL, memcached,\nvirtualenv, Celery, Hudson, Redis, MongoDB, and more.\n\nAbstract\n\nTo scale the backend of AMO, we rely heavily on caching in memcached (and soon\nRedis) to keep the load off our database, and multidb to spread the load we\ncan't dump off on cache. Our caching ranges from object and query caching, to\ntemplate fragment caching, up to full response caching. Frontend caching is\nexternal to Django and won't be covered. In addition, we work hard to measure\nand improve raw speed. Hitting indexes and keeping datasets small is critical,\nand the Django ecosystem has many great tools to help us profile.\n\nWe create development environments using pip and virtualenv, so we naturally\nstarted using that setup to deploy the site in production. We ran into issues\ncreating a reliable environment with this method; switching to a separate\nvendor repository solved our problems with only a small amount of added\neffort. We update and deploy new code at least once a week, and have to deal\nwith the additional complication of managing and interacting with parts of the\nPHP site that have not been ported over.\n\nApart from scaling and deployment, we've customized our application in ways\nthat could be interesting to other Django users:\n\n * Jinja is our templating engine (but we keep the admin working) \n * Babel helps us localize the site in over 30 languages \n * Sphinx (not the documentation tool) serves our search results \n * Celery and RabbitMQ help us do offline processing \n * Nose and Hudson help us get over 90% code coverage in tests \n\n", "quality_notes": "", "copyright_text": "Creative Commons Attribution-NonCommercial-ShareAlike 3.0", "embed": "<embed src=\"\" type=\"application/x-shockwave-flash\" width=\"480\" height=\"390\" allowscriptaccess=\"always\" allowfullscreen=\"true\"></embed>", "thumbnail_url": "", "duration": null, "video_ogv_length": 179163402, "video_ogv_url": "", "video_ogv_download_only": false, "video_mp4_length": null, "video_mp4_url": null, "video_mp4_download_only": false, "video_webm_length": null, "video_webm_url": null, "video_webm_download_only": false, "video_flv_length": null, "video_flv_url": null, "video_flv_download_only": false, "source_url": "", "whiteboard": "", "recorded": null, "added": "2012-02-23T04:20:00", "updated": "2014-04-08T20:28:25.925" }