Instructions
============

Dependencies
------------

- Ubuntu

If you're using Ubuntu, you can add these sources.list entries, depending
on the version you use:

# Hardy Heron
deb http://ppa.launchpad.net/txamqpteam/ubuntu hardy main
deb-src http://ppa.launchpad.net/txamqpteam/ubuntu hardy main

or

# Intrepid Ibex
deb http://ppa.launchpad.net/txamqpteam/ubuntu intrepid main
deb-src http://ppa.launchpad.net/txamqpteam/ubuntu intrepid main

Finally, you'll need the python-thrift package:

$ sudo apt-get install python-thrift

- General

1. Download Thrift source code [1]
2. Check if it contains support for Twisted, you'll need revision 749795 or
greater.
3. Compile Thrift with suppport for Python.
4. Install Thrift.

Running
-------

1. Generate Thrift Python services:
    $ thrift --gen py:twisted shared.thrift
    $ thrift --gen py:twisted tutorial.thrift
2. Start a server:
    $ python server.py host port vhost username password path_to_spec
    Note that you can start as many servers as you want at the same time.
    Incoming requests will be round-robined and the servers load will be
    balanced automatically.
3. Start a client:
    $ python client.py host port vhost username password path_to_spec

Where:
- host: The host where the AMQP broker is located.
- port: The port where the AMQP broker listens on.
- vhost: The virtual host (depending on your broker configuration, default
    in most cases is '/').
- username: The username to log in to the broker (default in most cases
    is 'guest').
- password: The username to log in to the broker (default in most cases
    is 'guest').
- path_to_spec: The path to the AMQP spec that you want to use. Keep in mind
    that depending on the broker you use, you will need a different spec:
    - RabbitMQ 1.5.3: $TXAMQP_PATH/src/specs/rabbitmq/amqp0-8.stripped.xml
    - OpenAMQ 1.3c5: $TXAMQP_PATH/src/specs/standard/amqp0-9.xml
    - Qpid M3 (Java): $TXAMQP_PATH/src/specs/qpid/amqp.0-8.xml

1 - http://incubator.apache.org/thrift/
