Phoenix.pm: Dynamic code loads under POE.

Scott Walters scott at illogics.org
Mon Nov 10 20:23:33 CST 2003


Try Coro. You don't have to give up your call stack when you're 
done servicing a request (nor are you forced to retail all of it
in inaccessable limbo as you re-enter the event handler). I've been
thinking of doing a presentation on Coro, if I ever get around to
rewriting my Gnutella server (ugh, v0.6 is twice as long as the
v0.4 specs). Right now it uses its own event inner loop (about
40 lines) with lots and lots of closures. It preserves lexical
data this way, but loses the stack in the process, which is one
better than a naive event handler. Rewritten to use Coro,
each seperate client connection can have, and maintain, its
own stack, with its own function nesting, its own state machines, dispatch
tables, subroutines to expect in and out of band protocol data...
without having to redispatch everytime a fragment of data comes in,
and keeping all of the intermediate state.

And shouldn't you be able to post something yourself on a Wiki anyway?

-scott

On  0, Bill Nash <billn at billn.net> wrote:
> 
> 
> In actual Perl related news, rcaputo posted my long overdue write up on
> dynamic code reloading within live POE processes:
> 
> http://poe.perl.org/?POE_Cookbook/Dynamic_Loading
> 
> Discuss. =)
> 
> - billn
> 
> 



More information about the Phoenix-pm mailing list