in reply to Re^3: POE::Component::RSSAggregator breaks LWP::Simple::get
in thread POE::Component::RSSAggregator breaks LWP::Simple::get

See I find this to be less and less true as POE develops. For example last year I wanted to hook a POE based IRC bot up to a web service. I didn't want to figure out how to make PoCo::Client::HTTP work when I knew I could get things off the ground quickly with LWP. So I wrote it with LWP, in a straight OO fashion and then used POE::Component::Generic to handle making it non-blocking for POE.

Perhaps I have an odd case where my issue is just simple enough to work, but increasingly POE is becoming a decent solution for non-blocking code. The results are in the Net::AIML dist.

In my experience threading/forking doesn't change the issues most people are going to have, it just means you have to re-write a bunch of wheels dealing with concurrency and blocking (literally POE::Wheel's in the case of forking) instead of learning the POE API for doing the same tasks. But then I'm obviously biased toward POE which had a stable API when I started writing concurrent code, where as threading didn't.

  • Comment on Re^4: POE::Component::RSSAggregator breaks LWP::Simple::get

Replies are listed 'Best First'.
Re^5: POE::Component::RSSAggregator breaks LWP::Simple::get
by BrowserUk (Patriarch) on Jan 19, 2007 at 17:52 UTC
Re^5: POE::Component::RSSAggregator breaks LWP::Simple::get
by perrin (Chancellor) on Jan 19, 2007 at 20:24 UTC

    POE::Component::Generic is an interesting module that I haven't seen before, and that could help a lot of people. I don't mean to knock the quality of POE's implementation. Forking a child process every time you want to do any I/O is still quite a paradigm shift though.

    Forked/threaded environments actually do completely eliminate this problem for most people, since the forking is done for them. Think CGI/FastCGI/mod_perl. You don't have to worry about killing the entire server with a thoughtless LWP call in those environments.