KQML over TCP/IP


Gerd Beuster (gb@uni-koblenz.de)
Wed, 1 Aug 2001 16:19:04 +0200


Hi,

I am working on a KQML implementation using TCP/IP as the
transportation layer. In doing so, I stumbled over a problem which is
solved in different ways in similar projects, but I can't really agree
to any of these solutions.

The Problem
===========

The obvious way to implement KQML on TCP/IP is to have each agent
listening to a port, and process queries arriving at it. The section
about Transport Assumptions in the KQML specification, available at
http://www.cs.umbc.edu/kqml/kqmlspec/subsection3.3.1.html, states the
requirement that 'when an agent receives a message, it knows from
which incoming link the message arrived'. In TCP/IP communication, the
information from which port the communication originated, although
available, is useless for the receiving agent. Ports are assigned
dynamically (i.e. randomly) for every message. Even if the receiving
agent knows from which port the communication originated, it does not
know how to send back messages, because the port on which the sending
agent is listening for connections is different to the one from which
it sent the message.

Solutions Provided by Other Projects
====================================

There are already several projects around which implement KQML over
TCP/IP, and each of them has a different way to solve this problem:

- Use an additional KQML-parameter like "location:" to communicate the
  host/port of the agent.

- Encode the location of the agent in the agent's name (":sender"
  parameter).

- Ask a dedicated facilitator agent who knows about the location of all
  agents. (Can be extended to DNS-like constructs.)

Although all of these solutions have their merits, I am hesitating to
use any of them for the identification of the sender of a message,
because they all do not comply to KQML standard. According to the
standard, a receiving agent must know the location of the sending
agent _without_ looking at the message's content. (I guess that's
actually the reason why the KQML specification does not define how the
(physical) location of another agent can be found out.)

My Solution
===========

Therefore, "pure" TCP/IP is not suited as a transport channel for KQML
messages. I would suggest to use another layer in between TCP/IP and
KQML. In this layer, the required location information and the KQML
message could be transported. The messages passed on this layer could
be most simple, e.g.:

<Sending agent host> <Sending agent port> <KQML message>

With this specification, an agent who wants to send a KQML message to
another agent, would open a TCP/IP connection to the receiving agents
host/port address, send its own hostname, send the port it is
listening to, and finally send the KQML message.

What do you think about this approach?

Cheers,
Gerd.

---
SEE <http://WWW.CS.UMBC.EDU/KQML/MAIL/> FOR LIST INFORMATION AND ARCHIVES.



This archive was generated by hypermail 2.0b3 on Wed Aug 01 2001 - 10:28:43 EDT