Implementation of Message Queue in Ruby