News for hackers. Stuff that matters.
Re:Node.js Versus LUA "Hello World" HTTP Server Showdown by Tichy on Wednesday October 13, 2010 @03:56AM (#1786470)
Is there a framework for writing asynchronous servers with Lua?
Re:Node.js Versus LUA "Hello World" HTTP Server Showdown by silentbicycle on Wednesday October 13, 2010 @08:12AM (#1786836)
Working on it. Libev-based. It's a spare-time project of mine. I have the "portable but not particularly scalable" pure Lua and luasocket backend done (for easy development + light deployment on Windows), working on the error handling in the libev backend now.

Much of the complexity comes from error handling, not just the async IO. Erlang gets that right, too. I don't know how much error handling node.js does. (I plan on checking it out eventually, since my framework will be compared to it.)

I don't have a time frame yet. I'm also working on a compiler and a bunch of other stuff, and I'm really not a web developer, so it's been a fairly low priority.

Re:Node.js Versus LUA "Hello World" HTTP Server Showdown by moonpolysoft on Wednesday October 13, 2010 @04:15AM (#1786501)
Re:Node.js Versus LUA "Hello World" HTTP Server Showdown by silentbicycle on Wednesday October 13, 2010 @08:38AM (#1786871)
I don't think that's what Tichy meant. That's just a wrapper library to make error handling easier in a coroutine-based event loop.

If you're not worried about being "web scale", it's not hard to write an async socket server using luasocket's sockets for nonblocking TCP IO and luasocket.select for scanning for active connections. It gets bogged down once you have > 100 or so idle connections (the usual trade-offs with select apply), but it's easy to write, very portable, and (on x86) LuaJIT is amazingly fast. Contact me if you want example code.

I've been working on an actual framework for async servers (libev-based), but haven't had much free time lately.