Distributed Systems Week part VI: Mobile Agents

A kind of distributed systems you don’t hear that much about anymore, are mobile agents. Mobile agents are little programs that jump from machine to machine and collect data from those machines and other agents they meet. Your first thought may be “Hey, that’s what worms and virusses do, right?” and that’s kind of true. The difference is that mobile agents’ purpose in life isn’t to kill off your machine.

A couple of years back there was a Dutch company that made software which I think was called Trillian (not to confuse with the IM client we have these days). When you started it, you saw a kind of sandbox with weird looking round creatures in it. When you clicked one of them you could tell them what they should look for. Once you had given them their assignment you throwed them out of the box, out to the internet. After a couple of hours, days or even weeks, depending on what you told the creature, it would return with the results it had found. What the creature would do is gather information from different sources, search engines, websites, but they would also run in on other people’s sandboxes and go talk to creatures there. They’d query the other creatures to ask if they had found anything useful on the subject. When the creature returned you could see what it had found and rate it. These rating could then be shared with other creatures to improve the results. The company that made it had big plans. In the future they saw mobile agents do shopping, looking around for a fridge and once they were perfected even buy it for their owner. But for some reason Trillian never really took off. I tried to look for it on the internet, but couldn’t find any sign of it. It could be that I remembered the name wrong, though.

On first sight this might sound like some you’d do with a peer to peer network and that’s partly true. The difference is that it’s not just data that’s sent between the different clients, it’s executable code. With peer to peer clients you can only do things that each P2P client supports, like searching for audio or video files. If you send executable code instead it can do a lot more than that.

There’s a Microsoft project called “Terrarium”:http://www.windowsforms.net/Applications/application.aspx?PageID=30&tabindex=8. The idea is that each “player” designs their own creature. These creatures consist of pieces of .NET code (C#, VB.NET) that are compiled to a .dll. The code describes how the creatures should behave and what they look like. The creatures are then sent out to other people running the Terrarium client (using P2P technology), so you can see other’s creatures running across your screen. The creatures might kill each other or live in peace, it all depends on how you programmed it.

“Are you crazy?! Running random people’s code on my machine, just like that?” Sure, it sounds dangerous. Who tells you that such an agent doesn’t format your hard drive? That’s why agents are executed in a sandbox (yeah, and that’s also how Trillian visualized it). A sandbox is a kind of protected and controlled execution environment. It’s like with Java applets. Java applets can do some things, they can do calculations and what not, but they can not get files from your hard drive or do a DoS attack on other servers. The virtual machine they run in limits what they can do. Mobile agents run in such a protected environment.

But as I said, you don’t hear a lot about mobile agents anymore. It’s a pitty, I really liked the idea. While looking around a bit I found that at “Dartmouth”:http://agent.cs.dartmouth.edu has a mobile agents research group, but the website hasn’t been updated since 2002. While “looking at Amazon”:http://www.amazon.com/exec/obidos/search-handle-form/002-4240633-3095226 I could find books about them, but they weren’t too recent either. Maybe it’s just a dead technology.

And this concludes the Distributed Systems Week. I hope you enjoyed it.