Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An example of ruote and ruote-amqp
Ruby
branch: master

This branch is 1 commit behind coffeeaddict:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
ping-pong-engine
ping
pong
README.rdoc

README.rdoc

Investigation into ruote, ruote-amqp and RabbitMQ

This is a personal investigation into all-of-the-above. Now that it somewhat done, it can serve as an example for others.

If it doesn't work

a) try to fix it by yourself and then notify us (or send a pull request) b) complain on the ruote mailing list (groups.google.com/group/openwferu-users) or c) complain in the ruote IRC channel (freenode.net #ruote)

Lessons learned

  • ruote is fairly complete, but the documentation isn't. Reading carefully through the available resources (google-groups, and other mailing lists) can be very useful.

  • ruote-amqp needs lot's more documentation

  • ruote-amqp set's a default queue for listening on the receiver but fails (for me anyway) to set a default reply_queue for participants

Prerequisites

rabbitmq

Or another AMQP enabled Message Queue system

bundler

The ping-pong-engine is set-up using this great piece of software

ruote

For the ping-pong-engine

ruote-amqp

For the sake of the investigation ;-)

daemon-kit

For ping and pong

(those 3 last are drawn thanks to bundler anyway)

Installing, etc.

You're on your own… But reading up on the prerequisites should give you all the info you need

Running the demo

# start the ping daemon
% cd ping
% bin/ping

# now start the pong daemon
% cd ../pong
% bin/pong

# and now, let's play a match
% cd ../ping-pong-engine
% ruby lib/main.rb

Parts

ping-pong-enginge/

The engine. It sets up a process-definition and a workitem and then plays ping with the 2 queue-listeners.

ping/

The pinging participant. It sets the state of the ruote workitem to “ping”.

pong/

The ponging participant. It sets the state of the ruote workitem to “pong”.

Hat-tips

A lot of information and knowledge came from studying these projects:

The setup of this project is largely similar to that of meego-boss.

The ruote-rails-example gave an understanding in connecting all the pieces as I tried to get it to work.

Something went wrong with that request. Please try again.