Home Papers Reports Projects Code Fragments Dissertations Presentations Posters Proposals Lectures given Course notes
<< 20. Examination 2002-2003: Error-free message replication & Multi-server client representation

21. Routing Project

Werner Van Belle1 - werner@yellowcouch.org, werner.van.belle@gmail.com

1- Programming Technology Lab (PROG) Department of Computer Science (DINF) Vrije Universiteit Brussel (VUB); Pleinlaan 2; 1050 Brussel; Belgium

Abstract :  This project implements a location transparent router. The project was used in 1998-1999 and 1999-2000

Reference:  Werner Van Belle; Routing Project;

We are currently working with mobile multi agent systems. Mobile multi agents are pieces of software which are able to move between hosts, thereby transferring code as well as data. You can think of agents as processes which provide a service to other processes/agents.

One aspect which we should take into account when dealing with mobility is the changing (or not changing) of names when an agent migrates. In standard networks we see a name change whenever a service moves to another machine. For example, when the sendmail daemon at igwe7.vub.ac.be moves to another place, lets say igwe8.vub.ac.be, he can only be reached at igwe8 and not anymore at igwe7. This name changing is unacceptable when dealing with mobile code and mobile agent systems.

For this purpose, we’ve written a router API which takes care of delivering data between agent systems, in a location independent fashion. The enduser of the API won’t know where a specific agent resides. It only knows the names of its communication partners.

The interface is defined as follows:

int (*acceptmessage)(char* from, char* to, char* data),
int (*acceptname)(char* from, char*to, char* data, char* name));

Initializes the router with the two acceptfunctions. AcceptMessage is called by the router subprogram whenever a message arives for this host. AcceptMessage should return the control flow as fast as possible. AcceptName is called whenever a name (an agent) moves to this host.

void _ROUTER_STEP_();

This function is called by the program at regular intervals. This function should check inoming connections, empty outgoing connections and return as fast as possible.

void _ROUTER_SENDMSG_(char* naar, char* from, char* content, int size);

This function sends a message from from to naar with content content. Content should be size big. The from and naar fields are agent identifiers in the way you want them.

void _ROUTER_MOVENAM_(char* wie, char* naar, char* content, int size);

This function moves a name wie from this place to another naar place. You can give additional data which follows the moving name.

For example, at place.a we give a set of commands:

_router_sendmsg_(“place.a/agent1”,”place.a/agent2”,<message content>,<message size>)

should send the given message to place.a/agent1, which is this moment local to place.a.

_router_movnam_(“place.a/agent1”,”place.b”,<code and data>, <agent size>)

should move the agent place.a/agent1 to place.b.

_router_sendmsg_(“place.a/agent1”,”place.a/agent2”,<message content>,<message size>)

should send the given message to place.a/agent1, which now resides at place.b

This might seem an easy problem, but it isn’t. At the same time we could have had a continuous talk between place.b/agentc and place.a/agent1. It is very clear that this communication session cannot be terminated. It can only be interrupted for a short period of time (while moving place.a/agent1) but afterwards the communication session should continue.

Your task:

Your task now is to design and implement a router library, which can be used as a router in mobile multi agent systems. The design should define a naming scheme which should be used when using the library. It defines how participating hosts are interconnected, how the message will flow and what kind of services are needed. The basic primitives (_router_sendmsg_, _router_movenam_) should be covered and no extra interfacing primitives are allowed, except extra initialization primitives.

The implementation of the router is completely yours. You can use low level C calls, CORBA, Java, Microsoft Message Queues or any other programs you find at your disposal. Whenever you write something it should run on windows and unix (linux).

At the end of the semester you will be asked to give a demonstration of your program library. Hereby you will be evaluated at the useability of the program. (Is the naming scheme well defined etc ?), the speed of packet delivery, the design of the code and how well it all fits together.