lua-users home
lua-l archive

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


It was thus said that the Great Russell Haley once stated:
> 
> cqueues is *brilliant* and the lua-http modules are awesome. The caveat to
> using cqueues is the same as using any event engine: If you have an error,
> it happens opaquely in the engine and it can often tear the entire
> application down. 

 I wrote my own coroutine based network driver and a coroutine crashing
doesn't bring down the entire application---it just means that coroutine
crashed and stops working.  When that happens, I do log (using syslog) the
crash and a stack trace [1] so I can fix the error (and this is being used
at work---the application has not once just stopped running).

  Of course, a bug in the C code can cause the application to stop running,
but the less C code, the more likely it won't crash.

> That's why node.js production code ALWAYS needs a restart
> service.
> 
> But, if you're using lua-http for simple web requests or a webserver, it's
> very easy and straight foward, albeit a little low level.

  What's low level about it?  

  -spc

[1]	https://github.com/spc476/lua-conmanorg/blob/6ed67e856e713030cda4c775e202224c63ab9e8f/lua/nfl.lua#L202