Skip to content

coffeeaddict/ruote-amqp-ping-pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An example of ruote and ruote-amqp

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages