News for hackers. Stuff that matters.
Re:Crazy cool nginx.conf scripting and modules. by tigerthink on Sunday April 11, 2010 @06:26PM (#1257783)
Why would you do this? Use a proper web framework!
Re:Crazy cool nginx.conf scripting and modules. by patio11 on Sunday April 11, 2010 @10:34PM (#1258229)
If 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.
Re:Crazy cool nginx.conf scripting and modules. by dylanz on Sunday April 11, 2010 @07:19PM (#1257904)
The 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.
Re:Crazy cool nginx.conf scripting and modules. by MWinther on Sunday April 11, 2010 @10:12PM (#1258193)
Still, 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.
Re:Crazy cool nginx.conf scripting and modules. by agentzh on Tuesday April 13, 2010 @05:26AM (#1261469)
I 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.

Re:Crazy cool nginx.conf scripting and modules. by agentzh on Tuesday April 13, 2010 @05:20AM (#1261461)
Well, 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.

Re:Crazy cool nginx.conf scripting and modules. by agentzh on Tuesday April 13, 2010 @05:12AM (#1261453)
Why? 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 :)

Re:Crazy cool nginx.conf scripting and modules. by agentzh on Tuesday April 13, 2010 @05:15AM (#1261456)
And...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 ;)
Re:Crazy cool nginx.conf scripting and modules. by tigerthink on Thursday April 15, 2010 @06:35AM (#1267473)
OK, well it might be fast and powerful, but I don't much like how the code looks.