Node.js for lua?

By : Shahbaz

I've been playing around with node.js (nodejs) for the past few day and it is fantastic. As far as I can tell, lua doesn't have a similar integration of libev and libio which let's one avoid almost any blocking calls and interact with the network and the filesystem in an asynchronous manner.

I'm slowly porting my java implementation to nodejs, but I'm shocked that luajit is much faster than v8 JavaScript AND uses far less memory!

I imagine writing my server in such an environment (very fast and responsive, very low memory usage, very expressive) will improve my project immensly.

Being new to lua, I'm just not sure if such a thing exists. I'll appreciate any pointers.


By : Shahbaz


You should also check out Lapis. It's a very lightweight and fast framework for OpenResty:

I've really been enjoying it and predict it will have a bright future!

As you would expect with anything built to leverage OpenResty, it's benchmarks are insanely good:

The author of Lapis also wrote a CoffeeScript-like language for Lua called MoonScript which is quite nice:

You can get node.js style non-blocking IO with lua-handlers.

It even has an async. HTTP Client, which makes it really easy to start parallel HTTP requests. See the test_http_client.lua file as a example of the HTTP client interface.

if i understood the question right, take a look at

By : erbo

This video can help you solving your question :)
By: admin