This project makes use of the multi-threaded distributed QuProlog
system. This enables one to easily build an distributed application in
which a Prolog program running on one host has calls in it that are remote
queries to Prolog programs running on other hosts. Each running program will
comprise an interface thread, that accepts the remote queries and forks off
a new thread to evaluate them.
The architecture consists of :
- a collection of asynchronous information sources (these contain the definitions
of various predicates);
- a Match-Maker process: this process keeps track of the information sites that register
with it on launching. The sites register the predicates they support;
- client processes: these will consult with the match-maker for possible sites
that can evaluate calls to predicates for which they do not have their own definitions;
alternatively, they can contact the information sites directly if they know about them.
The clients must use special meta calls in order to evaluate a call remotely;
ideally, the replies come back directly (timeout warning have to be included as a
safety measure).
Alternatively, the Match-Maker may handle the replies of the information
sites on behalf of the clients; this opens further possibilities in that the
client posts a request and the Match-Maker collects and keeps the answers
until the
client specifically ask for the results at a future moment in its computations
(truly asynchronous, as the client process can terminate and re-initiate again
at a later time).
References:
- The implementation concept and QuProlog are
described in the paper: "Multi-threading and Message Communication in
Qu-Prolog" down-loadable from here.
- Various types of communicating messages and KQML-style messages are
described in the paper:
"Programming internet distributed DAI applications in Qu-Prolog"
down-loadable from here.
It is advisable that takers of this project attend the first few lectures
of Course 474: "Multi-Agents Systems" in order to learn the fundamentals
about Qu-Prolog multi-threading and communications.