View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Dana M. Diederich > IPC-Transit-1.132260 > IPC::Transit



Annotate this POD


View/Report Bugs
Module Version: 1.132260   Source   Latest Release: IPC-Transit-1.171860


IPC::Transit - A framework for high performance message passing


This module is wire incompatable with previous releases. The wire protocol in 0.4 and before was meant as a prototype and naive.

This is the final wire protocol.

The serialization is currently hard-coded to JSON.


  use strict;
  use IPC::Transit;
  IPC::Transit::send(qname => 'test', message => { a => 'b' });

  #...the same or a different process on the same machine
  my $message = IPC::Transit::receive(qname => 'test');

  #remote transit
  remote-transitd &  #run 'outgoing' transitd gateway
  IPC::Transit::send(qname => 'test', message => { a => 'b' }, destination => '');

  #On '':
  remote-transit-gateway &  #run 'incoming' transitd gateway
  my $message = IPC::Transit::receive(qname => 'test');


This queue framework has the following goals:

This queue framework has the following anti-goals:


send(qname => 'some_queue', message => $hashref, serializer => 'some serializer')

This sends $hashref to 'some_queue'. some_queue may be on the local box, or it may be in the same process space as the caller.

This call will block until the destination queue has enough space to handle the serialized message.

The serialize_with argument is optional, and defaults to Data::Dumper. Currently, we are using the module Data::Serializer::Raw; any serialization scheme that module supports can be used here.

NB: there is no need to define the serialization type in receive. It is automatically detected and utilized.

receive(qname => 'some_queue', nonblock => [0|1], override_local => [0|1])

This function fetches a hash reference from 'some_queue' and returns it. By default, it will block until a reference is available. Setting nonblock to a true value will cause this to return immediately with 'undef' is no messages are available.

override_local defaults to false; if set to true, the receive will always do a non-process local receive.

stat(qname => 'some_queue')

Returns various stats about the passed queue name, per IPC::Msg::stat:

 print Dumper IPC::Transit::stat(qname => 'test');
 $VAR1 = {
          'ctime' => 1335141770,
          'cuid' => 1000,
          'lrpid' => 0,
          'uid' => 1000,
          'lspid' => 0,
          'mode' => 438,
          'qnum' => 0,
          'cgid' => 1000,
          'rtime' => 0,
          'qbytes' => 16384,
          'stime' => 0,
          'gid' => 1000


Return an array of hash references, each containing the information obtained by the stat() call, one entry for each queue on the system.


A zillion other queueing systems.



much else


Patches, flames, opinions, enhancement ideas are all welcome.

I am not satisfied with not supporting Windows, but it is considered secondary. I am open to the possibility of adding abstractions for this kind of support as long as it doesn't greatly affect the primary goals.


Copyright (c) 2012, 2013 Dana M. Diederich. All Rights Reserved.


This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License (see


Dana M. Diederich <>

syntax highlighting: