I’m polishing up Sigrid so I can write about it and (if anyone’s interested) release it; I switched the latest JXTA (2.3.7) in—it lives at the bottom level so that the grid nodes and clients can discover each other—and everything broke, don’t know why. I still think JXTA is the right answer down the road, but on impulse I cracked open Java in a Nutshell and Stevens’ Unix Network Programming, and poked around the online Java tutorials to read about datagrams and multicast. Damn, multicasting through the Java API sure seems easy. That same day I whacked together a couple hundred lines of code to do simple discovery, with aging even (so that you forget about things you haven’t heard from in a while) and tested it on a bunch of computers within easy reach; and it all seemed to Just Work. There are lots of useful-looking knobs on the side to deal with TTL and NIC selection and so, but the defaults seem well-chosen. As long as you’re prepared to deal with the fact that any given message might not get through, and to spend a couple of minutes here, it’s really not very taxing. I’m starting to wonder why you’d need any layers of abstraction at all. Question: Do Python/Ruby/Perl/Javascript have these coolio easy-to-use libraries too? [Update: Jason Briggs shows how to do it in Python (but it takes as much code as Java, that can’t be right.) Kevin Hamilton wrote to point out Spread, which seems to have multi-language support. Arkaitz Bitorika recommends zeroconf.]


author · Dad · software · colophon · rights
picture of the day
May 27, 2006
· Technology (85 fragments)
· · Internet (112 more)

By

I am an employee of Amazon.com, but the opinions expressed here are my own, and no other party necessarily agrees with them.

A full disclosure of my professional interests is on the author page.