GET /api/v2/video/377
HTTP 200 OK Vary: Accept Content-Type: text/html; charset=utf-8 Allow: GET, PUT, PATCH, HEAD, OPTIONS
{ "category": "PyCon US 2011", "language": "English", "slug": "pycon-2011--using-coroutines-to-create-efficient-", "speakers": [ "Matt Spitz" ], "tags": [ "coroutines", "gevent", "gunicorn", "highconcurrency", "libevent", "pycon", "pycon2011", "wsgi" ], "id": 377, "state": 1, "title": "Using Coroutines to Create Efficient, High-Concurrency Web Applications", "summary": "", "description": "Using Coroutines to Create Efficient, High-Concurrency Web Applications\n\nPresented by Matt Spitz\n\nCreating high-concurrency python web applications is inherently difficult for\na variety of reasons. In this talk, I'll discuss the various iterations of\napplication server paradigms we've used at meebo, the advantages/disadvantages\nof each approach, and why we've settled on a coroutine-based WSGI setup to\nhandle our high-concurrency web applications going forward.\n\nAbstract\n\nThere are a number of ways in which to create a web application in python.\nSome examples include a straight-up CGI scripts that run anew with each\nrequest, preforked Apache workers that each handle multiple requests, and\nusing an asynchronous web framework like Twisted.\n\nAt meebo, we've settled on using gunicorn, a lightweight WSGI server, which\nsupports gevent, a coroutine-based network library for python. Gevent\nmonkeypatches python's system modules to make network requests asynchronous\nusing an event loop based on libevent. This trick allows the developer to use\na simple blocking CGI as a non-blocking web application that can handle many\nconcurrent requests.\n\nI'll discuss our iteration process through these approaches to building web\napplications, why we ended up choosing gunicorn+gevent, the challenges this\nnew framework presents, and how we've dealt with them.\n\n", "quality_notes": "", "copyright_text": "Creative Commons Attribution-NonCommercial-ShareAlike 3.0", "embed": "", "thumbnail_url": "", "duration": null, "video_ogv_length": 195851560, "video_ogv_url": null, "video_ogv_download_only": false, "video_mp4_length": null, "video_mp4_url": "", "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": "2011-03-11", "added": "2012-02-23T04:20:00", "updated": "2014-04-08T20:28:28.058" }