[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: HTTP long polling with Lua
- From: Josh Simmons <simmons.44@...>
- Date: Thu, 21 Jul 2011 09:27:29 +1000
On Thu, Jul 21, 2011 at 9:21 AM, Alexander Gladysh <agladysh@gmail.com> wrote:
> On Thu, Jul 21, 2011 at 03:18, Josh Simmons <simmons.44@gmail.com> wrote:
>> On Thu, Jul 21, 2011 at 9:15 AM, Alexander Gladysh <agladysh@gmail.com> wrote:
>>> 2011/7/21 Ignacio Burgueño <ignaciob@inconcertcc.com>:
>>>> Shameless plug...
>>>> LuaNode ?
>>>> https://github.com/ignacio/LuaNode
>
>>> Can you please give me a little hint on how to actually do long polling with it?
>
>> Tir supports long polling as default, there's no magic required.
>
> The actual question (for Tir, LuaNode, WSAPI or whatever framework):
>
> How to block a client "request handler" until we receive an event for
> that client (and until connection is broken) without blocking all
> other clients (and without busy loop etc.)?
>
> Alexander.
>
>
In Tir you yield to the dispatch engine. It the incoming data off the
zmq socket and resumes the appropriate client co-routine when
necessary.