[AoyW] Talking to the Web Server that Just Walked In
A peripatetic web server can't just tack up a sign on the nearest wall reading, "Hey, I'm the cool new site in this room! My IP of the moment is 192.168.0.101." So how do you talk to the web server running on your wi-fi handheld using a friend's laptop at the coffee shop? It's a case of "Don't call us, we'll call you—often".
A wandering web server has to sing "here-i-am" periodically on the local network. Potential clients have to listen for that tune, which will come across on an agreed port. However, contemporary browsers aren't prepared to listen for anything except responses to requests they've posted to known servers.
Fortunately, the solution is trivial. All we need is a faceless desktop app, with an icon by the taskbar clock, that tunes in that port, taking down the info for any web server that chants. When you want to talk to one of them, you click the icon to view the list of singing servers, and hit the one you aim to chat up. That starts a browser for the server in question.
Our current airWRX prototype uses this technique inside its client component, though now I wish we'd separated it out as described above, so anyone could grab and reuse it in their own projects. (That wouldn't be much work, so if interested, drop an email to airWRX->networkimprov+net.) The server singer can be implemented in a one-line pearl script, or a brief C program that runs from the command prompt or in its own thread in a larger app.
You'd think that this scheme would already be specified somewhere, for instance Apple's Bonjour protocols for ad hoc IP networking. But as far as I can tell, it assumes that services are lethargic beasts, whereas clients flit about; the fleas must seek the dogs. In the case of a web server running on your laptop or wi-fi handheld, it's the ephemeral animal. If clients constantly call "are-you-there" looking for newly arrived or departed servers, a room full of clients would waste a lot of the available bandwidth. It's more logical to have the servers do the talking.
3 Comments:
olivetti research labs had a prototype back in the day where your vnc session would follow you around from room to room. the site is now dead, but i found this paper: http://scholar.google.com/scholar?num=100&hl=en&lr=&c2coff=1&client=firefox-a&q=cache:h4goTsY06U8J:www.uk.research.att.com/pub/docs/att/tr.98.1.pdf+orl+vnc+research
I think your assumptions about Bonjour/Rendezvous are wrong. All clients just listen for announcements from servers, so in fact mobile servers do well in that situation (announcing themselves every few seconds).
I thought I saw a client query mechanism in the Bonjour spec, to which servers respond. I'll look again...
Post a Comment
<< Home