Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,
I would like to know if anyone has any experience using Data::Queue::Persistence module. I am seeking knowledge with respect to creating a persistent queuing system, and this module was identified as a possibility. I would use a standard DB, but I don't want to install a full blown sql management solution in order to make the script run with much less needed on the system.

Any recommendations as to modules to use or methods are greatly welcomed.

Thanks!

Replies are listed 'Best First'.
Re: Data::Queue::Persistence experience
by choroba (Cardinal) on May 11, 2011 at 16:40 UTC
Re: Data::Queue::Persistence experience
by thargas (Deacon) on May 13, 2011 at 11:24 UTC
    Since you say that you would use a database but don't want to install a full-blown dbms, may I recommend sqlite? It's a database in a single file and DBD::SQLite comes with everything you need.
Re: Data::Queue::Persistence experience
by anonymized user 468275 (Curate) on May 13, 2011 at 16:39 UTC
    If o/s supports fifos, then they are better than using a database, e.g.
    package persque; sub new { bless { FIFO => shift()}; # must be given an existent fifo file or + creatable filename } sub install { # create persistent queue my $self = shift; mkfifo $self -> { FIFO } or die "$!: " . $self -> { FIFO } . "\n"; } sub enqueue { my $self = shift; my @items = @_; chomp @items; open $fh, '>' . $self -> { FIFO } or die "$!: " . $self -> { FIFO } . "\n"; print $fh (map { $_ . "\n" } @_); close $fh; } sub dequeue { my $self = shift; open $fh, $self -> { FIFO } or die "$!: " . $self -> { FIFO } . "\n"; my $r = <$fh>; close $fh; $r; } 1;

    One world, one people