2017 © Pedro Peláez
 

library zeromq-php-helpers

Some helper classes to make it easier to work with ZeroMQ.

image

geevcookie/zeromq-php-helpers

Some helper classes to make it easier to work with ZeroMQ.

  • Monday, August 4, 2014
  • by geevcookie
  • Repository
  • 1 Watchers
  • 1 Stars
  • 639 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ZeroMQ PHP Helpers

A couple of helper classes to make it easier to work with ZeroMQ., (*1)

Notice

This is still in the very early stages of development. Use at own risk., (*2)

Installation

Add the following to your composer.json:, (*3)

{
    "require-dev": {
        "geevcookie/zeromq-php-helpers": "dev-master"
    }
}

Then run composer install --dev or composer update --dev., (*4)

Usage

Check the examples folder. Each of the files has to be run from the command line e.g:, (*5)

php examples/RequestReply/Broker.php

Examples

Below you will find quick breakdowns of the available examples:, (*6)

RequestReply

This example shows how you can have one broker managing the messages between multiple clients and multiple workers. The worker and the broker constantly send "heartbeat" messages between each other to ensure that the connection is still alive. When the client sends a message the broker receives it, finds the next worker, sends the message to the worker, receives the reply from the worker, and then sends it back to the original client. The client itself also has retry and timeout limits., (*7)

To see the example in action run the following commands:, (*8)

// First start the broker.
php examples/RequestReply/Broker.php

// Then start a worker or 2 or 3.
php examples/RequestReply/Worker.php

// Then run a client to see how the broker and the workers react.
php examples/RequestReply/Client.php

The Versions

04/08 2014

dev-master

9999999-dev

Some helper classes to make it easier to work with ZeroMQ.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Zander Janse van Rensburg

zeromq geevcookie