ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-poe
perl-poe
Working with archives
by Lanas other posts by this author
Nov 27 2006 9:17AM messages near this date
Re: when working with files under POE, shouldn't IO::AIO be used? | Flushing a FollowTail wheel.
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved