How to Setup Google Apps Chat SRV Records For iChat and xmpp4r-simple

I’ve registered several domains using Google Apps. Lately I’ve been fiddling with using Jabber with those domains, and I wanted to have a program be able to interact on IM using an account like tim@example.com. Furthermore, I wanted to have everything Just Work.

The place to start was with DNS. Google has a help page about how to setup your DNS so that your Google Apps accounts can be federated with other non-Google Jabber communities. The problem is that neither xmpp4r-simple nor iChat simply work if I use tim@example.com as my JID. Then I stumbled across this post that connected the dots for me.

Here’s a screenshot of how I setup my SRV records over at eNom:

DNS SRV records for XMPP federation and client setup.

After that, my simple chat listener worked:

require rubygems
require xmpp4r-simple

im = Jabber::Simple.new(tim@example.com, secret-password)
puts im.connected?
im.accept_subscriptions = true

while true
  sleep(5) unless im.received_messages?

  im.received_messages { |msg| puts msg.body if msg.type == :chat }
end

My little “bot” silently accepted new buddy requests, and printed out recent messages every 5 seconds.

UPDATE: Something’s amiss here, I think. I’ll update when I have more details. Guess not. I tried this out on another domain, and thought that things didn’t work right. But I was mistaken. Everything looks good.

iPhone: Using video more than I expected

When I first thought of getting and iPhone I never figured I’d use the video feature much. But it turns out that I was wrong.

My iPhone item count

I’ve found that things like Railscasts are both incredibly useful, and surprisingly readable on the 160 dpi screen. I’ve also just loaded up the Apple Video Tips to check them out.

These short kinds of video tutorials are great for short waits, and I like the way that video can illustrate the point quickly.

Oh — and having a kids movie like Finding Nemo on there can really help out when you end up waiting WAY longer than you expected somewhere JUST before nap time… :-)

Just one more way the iPhone has really changed the way I do many things — for the better.

Watch Out For Exploding Water

Odd as it may seem, the wife of one of the guys on my team got hit with some Exploding Water on Sunday morning. First degree burns on her face; glasses protected her eyes. Didn’t know nuking water in a Pyrex container could be so volatile under just the right conditions. Guess this gives you an excuse not to scrub your dishes too clean. :-)