[Catalyst-dev] Catalyst test suite
Andy Grundman
andy at hybridized.org
Tue May 6 19:23:37 BST 2008
OK I can't really comment on doing that... in my mind a Catalyst app
should be portable to any engine, and not use POE things that would
require a specific engine. You might be better off writing a pure POE
app using one of the several POE HTTP servers.
On May 6, 2008, at 2:20 PM, Yuri Shtil wrote:
> I agree that if the scope of a Catalyst request is to include an
> action to finish, you are correct.
> However if the scope is to start an action, then an asynchronous
> events loop should help.
>
> For example in case of a database query, if the controller uses
> something like POE::Component::DBIAgent to send a query and return
> immediately, the Catalyst request will "complete" without waiting
> for the result. Granted the user will not see the "real" result
> right away, but this can be handled via refresh etc.
>
> Andy Grundman wrote:
>> The POE engine also has a blocking problem, a really big one in
>> fact, and is the reason I gave up on it. What you want to do is
>> currently not possible, a Catalyst request will generally block the
>> whole process until it's finished executing. The POE engine tried
>> to use some tricks to get around parts of the blocking, but the
>> core of your app code, and things such as database queries, are
>> still going to block.
>>
>> On May 6, 2008, at 1:49 PM, Yuri Shtil wrote:
>>
>>> I take it back.
>>>
>>> As I said, I want to be able to integrate a Catalyst engine into
>>> an events loop and was contemplating to write a new engine.
>>> I foresee a need for load balancing and since the fastcgi engine.
>>> However I wanted to start with something that is simple working
>>> and supported.
>>> I guess I would go with HTTP-POE in spite the fact it is not
>>> supported. The prefork engine will have the same blocking problem
>>> in each forked subprocess, I guess.
>>>
>>> Andy Grundman wrote:
>>>> Oh for some reason I thought you were writing a new engine. What
>>>> problems are you having with the FastCGI engine? There are
>>>> already test scripts for testing lighttpd and Apache 1/2 with
>>>> FastCGI.
>>>>
>>>> On May 6, 2008, at 1:30 PM, Yuri Shtil wrote:
>>>>
>>>>> Catalyst::Engine::FastCGI <http://www-homes.juniper.net/%7Eyuris/perldoc/lib/Catalyst/Engine/FastCGI.html
>>>>> >
>>>>>
>>>>> Andy Grundman wrote:
>>>>>> What sort of engine are you working on?
>>>>>>
>>>>>> On May 6, 2008, at 1:13 PM, Yuri Shtil wrote:
>>>>>>
>>>>>>> I guess my question then would be:
>>>>>>> - how do I handle actions that take a while to execute, for
>>>>>>> example if I need to talk to an another process that can take
>>>>>>> a while to respond, is there a way to integrate the Catalyst
>>>>>>> server into an external events loop be it POE, EV or something
>>>>>>> else.
>>>>>>>
>>>>>>> Andy Grundman wrote:
>>>>>>>> I guess we weren't testing the same thing... I was running t/
>>>>>>>> optional_http-server.t not the POE test. BTW, the POE engine
>>>>>>>> is no longer supported (by me anyway), it's been deprecated
>>>>>>>> in favor of the HTTP::Prefork engine.
>>>>>>
More information about the Catalyst-dev
mailing list