ruby_posix_mq.git  about / heads / tags
POSIX message queues for Ruby
$ git log --pretty=format:'%h %s (%cs)%d' v1.0.0 --
90b66d0 posix_mq 1.0.0 - kinder, gentler message queues (2011-03-01)
	(tag: v1.0.0)
c44a833 make methods that should be private, private (2011-03-01)
c885c2d remove unused tryinit function (2011-03-01)
d64ac26 POSIX_MQ#send returns +true+ on success (2011-03-01)
ae1acbc finalize try* interfaces (2011-03-01)
a589cb8 posix-mq-rb: always prefer write-in-full behavior (2011-02-27)
89c26cd fix warnings and enable them for tests (2011-02-27)
5af56c9 posix-mq-rb: use IO#binmode to get binary IOs (2011-02-27)
316a435 doc: note that the try* interfaces are not final (2011-02-27)
3308466 bump version to 0.8.0pre (2011-02-27)
	(tag: v0.8.0pre)
...

$ git cat-file blob v1.0.0:README
= posix_mq - POSIX Message Queues for Ruby

POSIX message queues allow local processes to exchange data in the form
of messages.  This API is distinct from that provided by System V
message queues, but provides similar functionality.

POSIX message queues may be implemented in the kernel for fast,
low-latency communication between processes on the same machine.
POSIX message queues are not intended to replace userspace,
network-aware message queue implementations.

== Features

* Supports message notifications via signals on all platforms

* Supports portable non-blocking operation.  Under Linux 2.6.6+ and
  FreeBSD 7.2+, POSIX_MQ objects may even be used with event
  notification mechanisms such as IO.select.

* Supports notifications via block execution in a separate thread
  on platforms that implement SIGEV_THREAD for mq_notify(3),
  currently only GNU/Linux.

* Optional timeouts may be applied to send and receive operations.

* Thread-safe blocking operations under Ruby 1.9, releases GVL
  before blocking operations.

* Works under Ruby 1.8, Ruby 1.9 and Rubinius 1.2

* Documented library API

* Includes a generic "posix-mq-rb" command-line tool with manpage.

* {EventMachine}[http://rubyeventmachine.com/] integration via
  {em-posixmq}[https://github.com/ibc/em-posixmq]

== Install

Operating system support (or library emulation) for POSIX message queues
is required.  Most modern GNU/Linux distributions support this
out-of-the-box.

If you're using a packaged Ruby distribution, make sure you have a C
compiler and the matching Ruby development libraries and headers.

If you plan on using the command-line client, a tarball installation
starts up faster and is recommended.  Just grab the tarball from:

http://bogomips.org/ruby_posix_mq/files/
Unpack it, and run "ruby setup.rb"

Otherwise, via RubyGems: gem install posix_mq

== Usage

The Linux mq_overview(7)
{manpage}[http://kernel.org/doc/man-pages/online/pages/man7/mq_overview.7.html]
provides a good overview of programming with POSIX message queues.

Under FreeBSD, you must load the
{mqueuefs(5)}[http://freebsd.org/cgi/man.cgi?query=mqueuefs]
kernel module before attempting to use POSIX message queues:

    kldload mqueuefs

Our API matches the POSIX C API closely, see the RDoc for full API
documentation.  Here is an example of a process communicating
with itself.  In practice, processes that send will be different
from processes that receive.

    require 'posix_mq'
    mq = POSIX_MQ.new("/foo", :rw)

    # hello world
    mq << "hello world"
    puts mq.receive.first # => should print "hello world"

    # non-blocking operation
    mq.nonblock = true
    begin
      mq.receive
    rescue Errno::EAGAIN
    end

    trap(:USR1) { puts mq.receive.first }
    mq.notify = :USR1
    mq.send "fire USR1 handler"
    # "fire USR1 handler" should be printed now

== Development

You can get the latest source via git from the following locations:

  git://bogomips.org/ruby_posix_mq.git
  git://repo.or.cz/ruby_posix_mq.git (mirror)

You may browse the code from the web and download the latest snapshot
tarballs here:

* http://bogomips.org/ruby_posix_mq.git (cgit)
* http://repo.or.cz/w/ruby_posix_mq.git (gitweb)

Inline patches (from "git format-patch") to the mailing list are
preferred because they allow code review and comments in the reply to
the patch.

We will adhere to mostly the same conventions for patch submissions as
git itself.  See the Documentation/SubmittingPatches document
distributed with git on on patch submission guidelines to follow.  Just
don't email the git mailing list or maintainer with Ruby posix_mq patches.

== Contact

All feedback (bug reports, user/development discussion, patches, pull
requests) go to the mailing list: mailto:ruby.posix.mq@librelist.com

Send patches (from "git format-patch") with "git send-email" and do not
send HTML email or attachments.  We are very responsive to email and you
will usually get a response within 24-72 hours.

== Mailing List Archives

In addition to the rsync-able archives provided by http://librelist.com/, we
are also mirrored to
{Gmane}[http://gmane.org/info.php?group=gmane.comp.lang.ruby.posix-mq.general]
and maintain our own mbox mirrors downloadable via HTTP.

* nntp://news.gmane.org/gmane.comp.lang.ruby.posix-mq.general
* http://bogomips.org/ruby_posix_mq/archives/

# heads (aka `branches'):
$ git for-each-ref --sort=-creatordate refs/heads \
	--format='%(HEAD) %(refname:short) %(subject) (%(creatordate:short))'
* master       Ruby posix_mq 2.4.1 (2018-01-30)
  pu           TypedData C-API conversion (2017-03-18)

# tags:
$ git for-each-ref --sort=-creatordate refs/tags \
	--format='%(refname:short) %(subject) (%(creatordate:short))'
v2.4.1       Ruby posix_mq 2.4.1 (2018-01-31) tar.gz
v2.4.0       Ruby posix_mq 2.4.0 (2017-03-20) tar.gz
v2.3.0       Ruby posix_mq 2.3.0 - updates for Ruby 2.3+ (2016-02-02) tar.gz
v2.2.0       Ruby posix_mq 2.2.0 - support FD adoption (2015-01-16) tar.gz
v2.1.0       posix_mq 2.1.0 - ensure compatibility with future Rubies (2014-02-15) tar.gz
v2.0.0       posix_mq 2.0.0 - a minor API change + FreeBSD fixes (2012-08-06) tar.gz
v1.0.0       posix_mq 1.0.0 - kinder, gentler message queues (2011-03-01) tar.gz
v0.8.0pre    posix_mq 0.8.0pre - kinder, gentler and less exceptional (2011-02-27) tar.gz
v0.7.0       posix_mq 0.7.0 - cleanups + portability fixes (2011-02-23) tar.gz
v0.6.0       posix_mq 0.6.0 - Rubinius support (2010-12-25) tar.gz
...

# associated public inboxes:
# (number on the left is used for dev purposes)
            https://yhbt.net/ruby-posix-mq

git clone https://yhbt.net/ruby_posix_mq.git