Forks-Queue =========== Forks::Queue - queue object that can be shared across processes A simple shared queue API for interprocess communication. This is useful for boss/worker models for performing several related tasks in parallel processes, or for creating persistent queues that can be shared by unrelated processes that may not even be running at the same time. This distribution comes with three implementations -- using flat files, shared memory, and SQLite databases -- for a simple and shared queue API for sharing information across different processes. SYNOPSIS use Forks::Queue; $q = Forks::Queue->new( impl => ... ); # File, Shmem, or SQLite $q->put(42); # put simple items onto the queue $q->put( { foo => 123, bar => \%ENV } ); # or bigger data structures ... $q->end; # indicates that no more jobs will be added $item = $q->get; # retrieve item, possibly after a fork @upto5_items = $q->get(5); # retrieve several items $item = $q->peek; # retrieve without removing from queue $remaining = $q->pending; INSTALLATION To install this module, run the following commands: perl Makefile.PL make make test make install DEPENDENCIES The JSON module is required for Forks::Queue and all its implementations. DBD::SQLite module and sqlite libraries are required for the Forks::Queue::SQLite implementation. Forks::Queue::Shmem will not work on systems that don't have a /dev/shm shared memory virtual filesystem. SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc Forks::Queue You can also look for information at: RT, CPAN's request tracker (report bugs here) http://rt.cpan.org/NoAuth/Bugs.html?Dist=Forks-Queue AnnoCPAN, Annotated CPAN documentation http://annocpan.org/dist/Forks-Queue CPAN Ratings http://cpanratings.perl.org/d/Forks-Queue Search CPAN http://search.cpan.org/dist/Forks-Queue/ LICENSE AND COPYRIGHT Copyright (C) 2017 Marty O'Brien This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. ================================================================== Net-Objwrap =========== Net::Objwrap - pure perl mechanism for sharing objects and unblessed references across processes, including processes on different hosts In one script (the "server script"), you would call the Net::Objwrap::wrap function with a configuration file name and a list of one or more objects/references to share. The wrap function will start a server and write connection info to the named configuration file. In another script ("client script"), even a script running on a different system, you would call the Net::Objwrap::unwrap function, passing it the configuration file from the server script. The unwrap function will connect to the server script's server and return a list of "proxy" objects. When you interact with the proxy objects -- accessing data, calling methods on them -- the proxy object communicates with the server and performs the desired operation on the object in the server's script. The server can return results of the operation, if any, to the client script. The server can interact with multiple clients. SYNOPSIS # "server script" on host1 use Net::Objwrap 'wrap'; use Foo::Bar; my $hash1 = { abc => 123, def => [ 456, { ghi => "jkl" }, "mno" ] }; my $foo1 = Foo::Bar->new(42); wrap('server.cfg', $hash1, $foo1); ... # "client script", could be on a different host use Net::Objwrap 'unwrap'; my ($hash2,$foo2) = unwrap('server.cfg'); print $hash2->{abc}; # "123" $hash2->{def}[2] = "pqr"; # updates $hash1 on host1 $foo2->bar(19); # invokes $foo1->bar(19) on host1 INSTALLATION Net::Objwrap is currently bundled with the Forks::Queue distribution, which uses this distribution to support a queue that can be manipulated from several machines simultaneously without less worries about the notorious synchronization issues with network filesystems. DEPENDENCIES There are no non-core dependencies for Net::Objwrap SUPPORT AND DOCUMENTATION After installing, you can find documentation for this module with the perldoc command. perldoc Net::Objwrap It is anticipated that Net::Objwrap will eventually be released as a separate distribution. For now, issues in Net-Objwrap should be raised with the Forks-Queue distribution. You can look for information at: RT, CPAN's request tracker (report bugs here) http://rt.cpan.org/NoAuth/Bugs.html?Dist=Forks-Queue AnnoCPAN, Annotated CPAN documentation http://annocpan.org/dist/Forks-Queue CPAN Ratings http://cpanratings.perl.org/d/Forks-Queue Search CPAN http://search.cpan.org/dist/Forks-Queue/ LICENSE AND COPYRIGHT Copyright (C) 2017 Marty O'Brien This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information.