5 ms·
Why would you do this? Use a proper web framework!
by tigerthink 16y ago
Why would you do this? Use a proper web framework!
- dylanz 16y agoThe examples are there to show you what you can do from a flexible piece of software like Nginx. It could have nothing to do with the web tier.
- MWinther 16y agoStill, it would be interesting with connections to real-life applications. I was hoping to figure out a few practical ways of using more of my nginx spare cycles. I'm sure there's a ton of cool stuff one could actually use this for, but I'm none the wiser after the presentation.
- agentzh 16y agoWell, we're building our business (some data products in Taobao.com) atop this kind of nginx-based technology ;) We'll also make extensive use of AJAX, Flash, and Jemplate in this context. To be clearer, this is not a project just for fun, but rather, a serious company project that is allowed to be opensourced.
- agentzh 16y agoI must add that, the stuffs shown in these slides are just our "level 1 scripting". There will be level 2 and level 3, so as to support more sophisticated business logic in our data platform. Level 2 will be ngx_lua scripting which provides Erlang-style transparent non-blocking I/O support and access to the whole nginx infrastructure and all the level 1 scripting goodies. Level 3 will be...well...Perl 6, JavaScript, and PHP scripting atop the ngx_lua VM (by the corresponding X -> Lua compiler). grin We'll eventually get there.
- patio11 16y agoIf you're running a web scale operation then the ability to talk to memcached directly from nginx lets you do something like "Grab the page out of memcached if it is already there, if not, pass request to application server.", totally avoiding the application server and database for a huge portion of your "dynamic" requests. Given the relative costs of two roundtrips to memcached and e.g. going through the entire Rails stack, that is a bit of a win.
- agentzh 16y agoWhy? Just because our db-backed web app have to handle tens of millions of requests each day on one or two plain simple servers ;) Well, I didn't give any benchmark numbers in my slides. It's by intention. Just go ahead and find out how fast it can be :)
- agentzh 16y agoAnd...also, to tell the secret, nginx itself is a web framework. And it's a very powerful one and we're still pushing it ahead ;)
- tigerthink 16y agoOK, well it might be fast and powerful, but I don't much like how the code looks.