Live data from Hacker News

Launching NginScript

nginx.com

21–30 of 131 posts

Re: Launching NginScript

#21

It's sad to see lua get slowly replaced by javascript.

Well, it's a popularity contest. Lua is certainly a great language, it's fast and it works well with C. I guess that nginx team thinks that js will bring more users therefore more business. If I were to develop a product and add a scriptable layer, i'd certainly use JavaScript. Even if it is not the best language out there, it's about growing an ecosystem.

Re: Launching NginScript

#22
I can't help but think this is a bad idea. Jamming more stuff into what is a great tool puts nginx on a slow path to a bloaty death.

Am I incorrect in assuming that you could implement your entire server-side js app now as an nginScript module? Do people think that is a good thing?

Not to mention that putting more interpreters and more end-user code into a system that has access to your service's private key might not be terribly wise.

I'm sure many people will tell me I'm wrong, and I guess I can see some benefit to simplifying configuration and perhaps deployment.

But there's a reason we've mostly moved away from deploying embedded PHP applications inside of mod_php.

Re: Launching NginScript

#24
This seems like massive overkill. Instead of adding a limited domain-specific language which is tuned to nginx's requirements, they've added the behemoth that is JavaScript, along with all its flaws. A turing-complete behemoth, at that.

Re: Launching NginScript

#25
post #21

It's sad to see lua get slowly replaced by javascript.

Well, it's a popularity contest. Lua is certainly a great language, it's fast and it works well with C. I guess that nginx team thinks that js will bring more users therefore more business. If I were to develop a product and add a scriptable layer, i'd certainly use JavaScript. Even if it is not the best language out there, it's about growing an ecosystem.

Ecosystem isn't the only thing to think about, but I agree that is almost certainly why they chose js.

Re: Launching NginScript

#26

Earlier quoted context omitted.

It is. But JavaScript is the new assembly language, all you need is a Lua to JS compiler or a whatever to JS compiler.

I genuinely can't tell whether you're joking.

Not joking, just dying a little inside.

Re: Launching NginScript

#28

I can't help but think this is a bad idea. Jamming more stuff into what is a great tool puts nginx on a slow path to a bloaty death. Am I incorrect in assuming that you could implement your entire server-side js app now as an nginScript module? Do people think that is a good thing? Not to mention that putting more interpreters and more end-user code into a system that has access to your service's private key might no…

There is already Lua support so this is just adding another language - thus if this is a bad idea, it is a continuation of an existing bad idea, rather that starting a new bad idea. If that makes a difference....

Re: Launching NginScript

#29
post #2

I've recently been leaning towards not using web servers like nginx or apache at all. There are non-blocking server platforms like node.js or vert.x that let you code your web server instead of configure it. I find that ou frequently hit a wall of opaque redirect rules that become unmaintainable for any complex project. Having your server written in testable code makes it more predictable. It looks like nginx is tryi…

For handling load we find nginx amazing, and we run it in front of an ExpressJS server on Node.JS. The combination is pretty phenomenal for high traffic production sites that ExpressJS can not handle alone.
Post reply on HN