Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.543.906 Times

IPC::PubSub 0.22

  Date Added: July 14, 2010  |  Visits: 750

IPC::PubSub

Report Broken Link
Printer Friendly Version


Product Homepage
Download (73 downloads)



IPC::PubSub is Perl module for Interprocess Publish/Subscribe channels. SYNOPSIS # A new message bus with the DBM::Deep backend # (Other possible backends include Memcached and PlainHash) my $bus = IPC::PubSub->new(DBM_Deep => /tmp/pubsub.db); # A channel is any arbitrary string my $channel = #perl6; # Register a new publisher (you can publish to multiple channels) my $pub = $bus->new_publisher("#perl6", "#moose"); # Publish a message (may be a complex object) to those channels $pub->msg("This is a message"); # Register a new subscriber (you can subscribe to multiple channels) my $sub = $bus->new_subscriber("#moose"); # Publish an object to channels $pub->msg("This is another message"); # Set all subsequent messages from this publisher to expire in 30 seconds $pub->expiry(30); $pub->msg("This message will go away in 30 seconds"); # Simple get: Returns the messages sent since the previous get, # but only for the first channel. my @msgs = $sub->get; # Simple get, with an explicit channel key (must be among the ones # it initially subscribed to) my @moose_msgs = $sub->get("#moose"); # Complex get: Returns a hash reference from channels to array # references of [timestamp, message]. my $hash_ref = $sub->get_all; # Changing the list of channels we subscribe to $sub->subscribe(some-other-channel); $sub->unsubscribe(some-other-channel); # Changing the list of channels we publish to $pub->publish(some-other-channel); $pub->unpublish(some-other-channel); # Listing and checking if we are in a channel my @sub_channels = $sub->channels; my @pub_channels = $pub->channels; print "Sub is in #moose" if $sub->channels->{#moose}; print "Pub is in #moose" if $pub->channels->{#moose}; # Raw cache manipulation APIs (not advised; use ->modify instead) $bus->lock(channel); $bus->unlock(channel); my @timed_msgs = $bus->fetch(key1, key2, key3); $bus->store(key, value, time, 30); # Atomic updating of cache content; $_ is stored back on the # end of the callback. my $rv = $bus->modify(key => sub { delete $_->{foo} }); # Shorthand for $bus->modify(key => sub { $_ = val }); $bus->modify(key => val); # Shorthand for $bus->modify(key => sub { $_ }); $bus->modify(key); This module provides a simple API for publishing messages to channels and for subscribing to them. When a message is published on a channel, all subscribers currently in that channel will get it on their next get or get_all call. Currently, it offers three backends: DBM_Deep for on-disk storage, Memcached for possibly multi-host storage, and PlainHash for single-process storage. Please see the tests in t/ for this distribution, as well as "SYNOPSIS" above, for some usage examples; detailed documentation is not yet available..

Requirements: No special requirements
Platforms: Linux
Keyword: Channel Channels Dbm Interprocess Publish Ipc Ipcpubsub Key Libraries Message New Perl Module Programming Pubsub Sub-
Users rating: 0/10

License: Freeware Size: 19.46 KB
USER REVIEWS
More Reviews or Write Review


IPC::PUBSUB RELATED
Libraries  -  IPC::LDT 2.03
IPC::LDT is a Perl module that implements a length based IPC protocol. Interprocess communication often uses line (or record) oriented protocols. FTP, for example, usually is such a protocol: a client sends a command (e.g. "LS") which is...
13.31 KB  
Libraries  -  IPC::SharedCache 1.3
IPC::SharedCache is a Perl module to manage a cache in SysV IPC shared memory. SYNOPSIS use IPC::SharedCache; # the cache is accessed using a tied hash. tie %cache, IPC::SharedCache, ipc_key => AKEY, load_callback => &load,...
19.46 KB  
Libraries  -  IPC::Run 0.80
IPC::Run is a Perl module for system() and background procs w/ piping, redirs, ptys (Unix, Win32). Requirements:.
89.09 KB  
Libraries  -  Search::Dict 5.8.8
Search::Dict is a Perl module to search for key in dictionary file. SYNOPSIS use Search::Dict; look *FILEHANDLE, $key, $dict, $fold; use Search::Dict; look *FILEHANDLE, $params; Sets file position in FILEHANDLE to be first line greater...
12.2 MB  
Programming  -  CLIPC for Linux 0.2
CLIPC is an open-source Java library that gives developers interprocess communications (IPC) capabilities that may be absent or difficult to use in the Java distribution. In particular it provides the following:
92.16 KB  
Libraries  -  POE::Component::Amazon::S3 0.01
POE::Component::Amazon::S3 is a Perl module to work with Amazon S3 using POE. SYNOPSIS use POE qw(Component::Amazon::S3); POE::Component::Amazon::S3->spawn( alias => s3, aws_access_key_id => your S3 id, aws_secret_access_key => your S3...
20.48 KB  
Libraries  -  File::Sort 1.01
File::Sort is a Perl module to sort a file or merge sort multiple files. SYNOPSIS use File::Sort qw(sort_file); sort_file({ I => [qw(file_1 file_2)], o => file_new, k => 5.3,5.5rn, -t => | }); sort_file(file1, file1.sorted); This...
32.77 KB  
Libraries  -  OpenInteract2::TT2::Plugin 1.99_06
OpenInteract2::TT2::Plugin is a Perl module for custom OpenInteract functionality in templates. SYNOPSIS # Create the TT object with the OI plugin my $template = Template->new( PLUGINS => { OI => OpenInteract2::TT2::Plugin }, ... ); my (...
931.84 KB  
Libraries  -  HTTPD::GroupAdmin 1.66
HTTPD::GroupAdmin is a Perl module for the management of HTTP server group databases. SYNOPSIS use HTTPD::GroupAdmin (); This software is meant to provide a generic interface that hides the inconsistencies across HTTP server implementations...
112.64 KB  
Libraries  -  CGI::Builder::Auth::UserAdmin 0.06
CGI::Builder::Auth::UserAdmin is a Perl module for the management of HTTP server user databases. SYNOPSIS use CGI::Builder::Auth::UserAdmin (); Pay no attention to that man behind the curtain! Move along, nothing to see here! This module...
51.2 KB  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by freedesktop.org, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB  
Libraries  -  App::SimpleScan::Substitution::Line 2.02
App::SimpleScan::Substitution::Line is a line with optional fixed variable values. SYNOPSIS my $line = App::SimpleScan::Substitution::Line->new(" this "); # Use only this value when substituting " ". $line->fix(substituite =>...
54.27 KB