Re: How does POE speed up operation in reality?
Merijn Broeren <[email protected]>
| Newsgroups | gmane.comp.lang.perl.poe |
|---|---|
| Organization | Who, me organized? |
| Message-ID | <[email protected]> |
Quoting Roy M. ([email protected]): > > So far the POE::FTP components only allow me to connect to one ftp > server at a time, how can I get the same/similar speed as 8 concurrent > process?). > > In fact, this is a quite common multiple-producer and As per usual in these cases, there is a slight misunderstanding going on, where Rocco knows too much about POE to figure out what elementary knowledge you are missing. It's pretty simple POE, once you get your head around that it is cooperative multitasking of bundles of short events. So, POE::Component::FTP is one such bundle. Now, this bundle of events you can kick off multiple times, it will cooperate with all the other instances. As long as they are not CPU bound, and network task seldomly are, they will happily retrieve all network data "concurrently". So, just set up the component for each server, call poekernel->run and sit back. If you need to, then you can throttle back, having only 10 or 15 servers connected at the same time, adding one more for each finished transfer. Cheers, -- Merijn Broeren | We take risks, we know we take them. Therefore, when things | come out against us, we have no cause for complaint. | - Scott, last journal entry, march 1912