Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: POE::Component::RSSAggregator breaks LWP::Simple::get

by perrin (Chancellor)
on Jan 19, 2007 at 15:34 UTC ( [id://595468]=note: print w/replies, xml ) Need Help??


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

I feel the same way. I'm always amazed when people casually suggest using POE, or a similar non-blocking I/O scheme. It makes trivial things difficult. That's why the forking/threading approach is so popular: you can ignore these issues most of the time.
  • Comment on Re^3: POE::Component::RSSAggregator breaks LWP::Simple::get

Replies are listed 'Best First'.
Re^4: POE::Component::RSSAggregator breaks LWP::Simple::get
by perigrin (Sexton) on Jan 19, 2007 at 17:45 UTC

    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.

      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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://595468]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found