Writing

Software, technology, sysadmin war stories, and more. Feed
Sunday, October 7, 2012

Giving the illusion of uninterrupted connectivity for chats

Here's something I've yet to see in a chat client for ordinary computers: support for "make before break" for connections to your chat service(s). I'm talking about bringing up a new TCP connection before tearing down the old one. Why is this important? I'll give you a scenario.

I have a laptop which sits on my desk some of the time, but not always. When it's on my desk, it's plugged into my Ethernet since I experience unacceptable jitter when I ssh in over its wireless link. If you're wondering why I scoot over six inches and use another machine on the same desk to ssh back in, read that old post. It might explain a bit of it.

Anyway, I don't always stay at my desk. I move around. Sitting down all day is a recipe for all sorts of badness, so I have a bunch of other places where I can use it. None of them have Ethernet cabling, so at that point, I'm relying on my wireless network. This is okay because I'm obviously not using ssh back into the box at that point.

The problem is that my chat connections always bounce when I do this. Even though my machine is fundamentally connected to the same network two different ways, one hard-wired and one over 802.11(mumble), the connection is bound to a local address. When that interface goes down, that address goes with it, and my connection dies.

I'm actually okay with these connections resetting. I don't need full-blown mobile IP gunk just for my own local home network. What I would like is for Adium to reach out and stand up another XMPP connection which is forcibly bound to my wireless adapter before I unplug the Ethernet cable. That way, at least there'd be some chance of maintaining a conversation with someone as I get up to walk around. As it is now, I have to purposely take myself offline and then back online to minimize the delay caused by it having to realize the link is gone.

XMPP (aka Jabber) itself can handle multiple logins from the same person, so it shouldn't be a big deal to say "okay, this is me with a higher priority now" on the new link to start scooping up incoming traffic. If you do it properly, none of your conversations should be affected, and nobody will realize you've started wandering around.

This sort of thing is probably already being addressed by better programs which run on devices with cellular data connections. If you start a connection on the user's home wireless network and then they walk out their front door and down the street, at some point, you have to switch over. The question is: can they do it seamlessly? I've seen a few programs which lose their minds if I start them up on my phone while still in range of my home network and then walk away. Sure, they eventually figure it out, but it can be a frustrating couple of minutes in the middle.

This is one place where having the Mac OS be a teeny bit more like iOS might actually be a good thing.