Getting Started

AlphaRPC is a library for performing remote procedure calls from PHP. It uses ZeroMQ to communicate with the different parts.

Installing ZeroMQ and php-zmq

To get AlphaRPC working, you first need to install libzmq (the ZeroMQ library) and php-zmq (the PHP extension). screen is used to start all the handlers at once.

On Debian Wheezy

sudo apt-get install libzmq-dev php-pear php5-dev screen
sudo pear channel-discover
sudo pecl install
sudo /bin/sh -c 'echo > /etc/php5/conf.d/zmq.ini'

On Ubuntu 14.04

sudo apt-get install libzmq3-dev libzmq3 php5-dev php-pear pkg-config
sudo pecl install zmq-beta
sudo /bin/sh -c 'echo > /etc/php5/mods-available/zmq.ini'
sudo php5enmod zmq

Install Composer

AlphaRPC uses composer for its dependency management.

Installing AlphaRPC and Composer

Installing AlphaRPC is easy: just clone the repository and run composer.

git clone
cd alpharpc
curl -sS | php
./composer.phar install

Starting AlphaRPC

For now, we start AlphaRPC in some screen sessions. In production, we recommend you to use something like supervisor.


First request

If all went well, AlphaRPC is running now. To perform the first request, run:


To provide your own text to be reversed, add it to the command:

examples/client-reverse.php 'hello world'


Now you have a working AlphaRPC installation. You are ready to perform some common tasks: