[Catalyst-dev] Catalyst test suite

Matt S Trout dbix-class at trout.me.uk
Sat May 10 15:42:29 BST 2008


Yuri, for christ's sake stop top posting.

On Tue, May 06, 2008 at 11:20:38AM -0700, 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.

Something I experimented with with the POE engine was using a coro for
the request so when the Catalyst part needed to access the DBI or whatever
you'd suspend the coroutine until the POE::Component::EasyDBI[0] return
came back, which removes Andy's blocking problem.

[0] DBIAgent is ancient and not actively maintained

-- 
      Matt S Trout       Need help with your Catalyst or DBIx::Class project?
   Technical Director                    http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Want a managed development or deployment platform?
http://chainsawblues.vox.com/            http://www.shadowcat.co.uk/servers/



More information about the Catalyst-dev mailing list