Build Status Code Climate

zchannel

zchannel is a library that assists with InterProcess Communication, or IPC for short. It provides a high level and easy to use API for sending Ruby objects between processes that are running on the same machine and who have a parent-child relationship. A channel is implemented on top of an unbound UNIXSocket. Objects are serialized on write and deserialized on read using a serializer of your choice. The examples use the "Marshal" serializer, which is available without any extra dependencies.

Examples

1.

chan = ZChannel.unix Marshal
Process.wait fork { chan.send "Hello, world!" }
chan.recv # => "Hello, world!"

Requirements

Ruby 2.3 or later, then follow the Install instructions.

Install

  • Rubygems
$ gem install zchannel
  • Bundler
gem "zchannel", "~> 0.1"

License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.