lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi Scott,

Sorry I didn't notice this thread earlier.  I'm the author of the
libev binding posted on github.  I would be pleased to accept patches
if you have a fork of the libev wrapper I wrote.  I was planning on
eventually getting around to doing all the watcher types, but I wanted
to be sure to give them sufficient testing and attention.  The libev
binding was also tricky to get right so that I had no memory leaks,
I'm already on the 3rd rewrite.  Note that Brian Downing just recently
added support for idle watchers, so it is an active project :-).

I'm also interested in the node.js project and what it could mean to
the Lua community.  In particular, I wrote a binding to the ry's
http-parser which is used by node.js.  My eventual goal is to create a
webserver that had a main event loop for processing requests, but then
used lua lanes for doing CPU intensive tasks.  There are probably
1,000's of webserver implementations, but the design criteria I'm
going for are:

  * Easy to debug, easy to profile.
  * Ability to sandbox (run potentially malicious code, set CPU limits).
  * Ability to optimize I/O when aggregating content from several
back-end services.
  * Ability to handle 1,000s of simultaneous idle requests (for
polling applications).
  * Ability to load multiple versions of the same library so that
software upgrades can be done on a per session basis.

I'm doing all of this for fun, not profit, which means I'm taking my time :-).

Cheers,
-Brian

On Mon, Sep 20, 2010 at 7:05 AM, Scott Vokes <vokes.s@gmail.com> wrote:
> On Fri, Sep 17, 2010 at 12:03 AM, sagasw <sagasw@gmail.com> wrote:
>> Now I have a question. Lua should be able to use in server too, and
>> could use libevent/libev as I know,
>> How about the performance that use Lua libevent compare with node.js?
>> Is it possible that port node.js to Lua? or just use node.js with Lua?
> I was working on a similar project (which I started before I was aware
> of node), but put it on the back burner for a while because I decided
> I'd rather just use Erlang for high-performance async servers and
> leave Lua to what it does best. :) (I'm also not a web developer - it
> was a side project that grew out of a distributed filesystem I'm
> working on.)
>
> I will probably get back to it sooner or later, though - I have a
> mostly-complete LPEG grammar for parsing HTML, a wrapper for libev
> (which includes almost all the watcher types, unlike the one on
> github), and separate backends for LuaSocket's select (doesn't scale
> well, but very portable and still quite fast) and the libev wrapper
> (not 100% complete yet). At the very least, I hope to get the libev
> wrapper posted soon.
>
> Scott
>
>



-- 
Brian Maher >> Glory to God <<