lua-users home
lua-l archive

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


On Thu, Dec 1, 2011 at 3:01 PM, Javier Guerra Giraldez
<javier@guerrag.com> wrote:
> On Thu, Dec 1, 2011 at 12:03 PM, Fabien <fleutot+lua@gmail.com> wrote:
>> Coroutines. Look at any non-trivial node.js program, it's an awful mess of
>> nested callbacks; very hard to read, impossible to maintain. Coroutines fix
>> that, and that's a killer feature by itself.
>
> this.
>
> callbacks-driven pseudomultitasking isn't anything new; it was the
> only way to get good responsiveness in classic MacOS. it was used only
> for slow I/O for a reason: it's _ugly_
>
> current node.js proponents say that it's not so bad, or that you only
> have to shift your reasoning process.  still, there are lots of people
> (and growing) that find it unmaintable for anything non-trivial.
>
> coroutines do fix that; up to a point.  as the Copas (and Xavante)
> experience teach us, you have to be careful not to stall too long
> without I/O (to give a chance to the scheduler to yield).  besides
> that, it's just as if you had multiprocessing without the overhead.
>
> BTW, how would Luvit compare with Xavante with a limited number of
> connections?  i guess that over a hundred or so, any event-driven
> scheme surpasses the select()-based Copas, but below that, it's not so
> certain.
>
> There are also some event-library bindings, and i thing some of them
> included a Copas replacement that allowed you to run Xavante.... how's
> luvit different from that?

Could also be interesting to compare it with https://github.com/ignacio/LuaNode

>
> --
> Javier
>



-- 
--------------------------------------------------------------
EmmanuelOga.com - Software Developer