|
|
|
|
|
by slurgfest
5035 days ago
|
|
I'm no Ruby expert, but I think the massive performance penalties of Rails are mostly not in the Ruby interpreter itself. Rails is a huge project and it does a lot of work. It is possible that Ruby is impracticably slow in itself, I guess. Keeping things non-blocking and inside the Nginx event loop doesn't specifically mean you have to use Lua, does it? |
|
I'm neither a Lua expert nor an evangelist, but my clear impression is that Lua is much more suited to embedding in a web server than Ruby or Python. On the Lua website it is described as "a powerful, fast, lightweight, embeddable scripting language" - that's not a description I would ascribe to either Ruby or Python. I also know that Lua has a long history of being embedded in games, embedded systems and other servers like Redis. Perhaps somebody more experienced in Lua can help me out here though.
In this case there seems to be good evidence that Lua is the right tool for the job.
One minor point- in your first comment you talk about interpreted Lua code, but this is not accurate because Lua can be compiled down to byte code before being loaded into Nginx.
Finally - "Embedding Python in a web server is quite doable". I would be interested to read a blog post about your experiments in this area ;)