Folks,
I'd like to make a POE process that archives/unarchives files
of popular formats mixes (tar bzip, tar gzip, tar) and I have a
difficulty at making a design decision.
For now I see that there are:
1) POE::Filter::Bzip2 (and the gzip counterpart)
2) POE:Session using Compress::Bzip2,
Compress::Zlib and Archive::Tar::Streamed
3) POE child process simply calling bzip2 from the system
4) POE:Session using Michael Schilli's Archive::Tar::Wrapper
Here are my thoughts:
Solution 4: Archive::Tar::Wrapper itself uses IPC::Run to
execute tar, gather output, etc... I'm a bit hesitant to wrap
this in a POE:Session as I fear this could be overkill when I
could use (with more work) solution 3 and build my own interface
to the system's tar (and bzip2, gzip) utilities.
Solution 2 could be interesting in that most of the utilities
provided for each kind of archive would already been written.
It'd then be a matter for the POE::Session to go along one of the
Child Processes from the Cookbook, receiving archive commands
from other POE Sessions and scheduling the appropriate child
processes to run.
For solution 1, I do not see any advantage of using a POE-based
interface when quite probably I'll be making one anyways.
Is any one of the solutions above hindering 'system flow' more
than another ? I mean, would one block the cooperative
multitasking that POE uses to the point of rendering the system
irresponsive when dealing with large archives ?
Or maybe you have a better idea ! ;-)
Cheers,
Al