Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Introduction to XMPP and XMPP4R for Ruby Developers

By Peter Cooper / February 3, 2008

As Wikipedia says, XMPP is "an open, XML-inspired protocol for near-real-time, extensible instant messaging and presence information." It's used by Jabber, the Gizmo Project, Google Talk, Pidgin, Kopete, and all sorts of open source instant messaging applications. It can also be used by any applications you want to develop yourself to pass messages back and forth, for example.

XMPP support in Ruby comes, primarily, from the XMPP4R library (Jabber4R and Net::XMPP are both semi-abandoned), and Frank Lamontagne (of Ruby Fleebie) has written a two part tutorial / guide to using XMPP4R to integrate with Instant Messaging systems. The first part is a basic overview, and the second part is a basic demo of creating an XMPP client. Frank expects to continue the series on his blog.

You may also be interested in Jabber::Simple, a wrapper around XMPP4R by Blaine Cook that makes things even simpler. It hasn't been updated for a year, but reduces most operations, such as creating a client object, delivering a message, and receiving messages, to a single method call.

Comments

  1. Brad Pauly says:

    I wrote about sending xmpp messages with Rails and xmpp4r a while back.

    http://railsforum.com/viewtopic.php?id=1033

Other Posts to Enjoy

Twitter Mentions