Re:Show HN: Lua Meets Node.js – Luaw, Nonblocking HTTP Serve...
by raksoras on Friday February 27, 2015 @07:34PM
(#9122249)
Event driven, non blocking HTTP app server for Lua inspired by Node.js. Uses Lua coroutines in place of nested callbacks to simplify application code.
[ Parent
| on HN ]
Re:Show HN: Lua Meets Node.js – Luaw, Nonblocking HTTP Serve...
by proveanegative on Sunday March 01, 2015 @03:42AM
(#9126460)
Looks good at first glance but could you explain how this differs from https://github.com/luvit/luvit and similar projects?
Re:Show HN: Lua Meets Node.js – Luaw, Nonblocking HTTP Serve...
by raksoras on Sunday March 01, 2015 @02:06PM
(#9128409)
Luvit is an impressive project. However, as far as I can tell they still use Node.js style callbacks to handle asynchronous processing. IMHO Lua's coroutines are a natural match for event driven, async code and easier to use than nested callbacks. There are no callbacks in Luaw which makes writing nonblocking codes essentially as straight forward as blocking code. You never explicitly create coroutines or manage them in your code. Luaw automatically suspends HTTP request running in its own coroutine whenever read/write call is about to block and resumes it when the socket is ready for read/write