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. Thanks | ||||
add comment |
See lualibevent and lua-ev and also Lua Gem #27 | ||||
add comment |
A recent corresponding project is Luvit "(Lua + libUV + jIT = pure awesomesauce)". From the announcement:
| |||
add comment |
Looks like the following is exactly what I was looking for:LuaNode https://github.com/ignacio/LuaNode | |||
add comment |
You might want to take a look at Luvit or a gander at the Lua Github site. I think it takes the approach of implementing Node.js functionality right inside Lua. You write Lua code on the client side and on the server side. Here is a description of Luvit approach to doing Node.js functionality in Lua. | |||
add comment |
You might also have a look at luv: https://github.com/richardhundt/luv from the lua mailing list:
| |||
add comment |
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. | |||
add comment |
if i understood the question right, take a look at http://openresty.com/ | |||
add comment |
联系客服