On May 3, 2009, at 01:25, Roy M. wrote:

total bandwidth needed for all ftp sessions = 10KB x 300 files x 50 = 146MB

as you can see, bandwidth (giga), disk, cpu should not be a problem to
handle 146MB of data in 1 hour of time.

so I am thinking 2 solutions:

1. Use thread (e.g. 8 concurrent process as my CPU is quad core SMP)
to parallel the worker to ftp servers.
2. Investigate other solutions such as POE and that's why I am asking here:

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?).

Without having looked at the FTP component, I would either assume (a) that the component supports multiple connections, or (b) you would instantiate the component once per connection. You should consult the component's author directly if he doesn't respond on the mailing list.

In fact, this is a quite common multiple-producer and
multiple-consumer pattern in muilt-threading theory. But so far the
POE example only allow me to do thing in a event-driven way, but not a
way to handle this  pattern, or something I have missed?


I don't understand the question. Do you mean to imply that an event- driven program cannot consume data from multiple producers?

--
Rocco Caputo - rcap...@pobox.com

Reply via email to