[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua
- From: Javier Guerra Giraldez <javier@...>
- Date: Tue, 6 Dec 2011 12:01:29 -0500
On Tue, Dec 6, 2011 at 11:20 AM, Tim Caswell <tim@creationix.com> wrote:
> As far as interfacing with blocking C libraries (like database
> clients) libuv has a thread-pool made just for this.
great, didn't know that.
then i guess the common problem of Node.js applications where a single
blocking task hangs the whole server is only laziness to delegate
that task out of the common thread.
> It's used
> internally for filesystem operations since there are very few truly
> async filesystems in the world. It also exposes a generic API for
> wrapping blocking calls and putting them in the thread pool.
if Luvit re-exposes that API, it might be easier to have a background
thread to go on secondary loop. I've done similar contraptions with
HTT.
> This is
> not a good solution for anything network related. Threads are very
> expensive, especially the locking.
you'd be surprised... I know single-threaded servers can be really
high performance, but there are times where the best (and cheapest!)
solution is to keep a few locked threads.
--
Javier
- References:
- Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua, jiang yu
- Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua, Axel Kittenberger
- Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua, Daniel Aquino
- Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua, Tim Caswell
- Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua, Ross Bencina
- Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua, Daniel Aquino
- Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua, Dimiter 'malkia' Stanev
- Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua, Axel Kittenberger
- Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua, Javier Guerra Giraldez
- Re: [ANN] Luvit - Lua + UV + Jit = NodeJS re-implemented in Lua, Tim Caswell