Next: Interfacing JXTA and DIET
Up: The JXTA components
Previous: The SeD
Contents
The Multi-MAj
The Multi-MA is composed of all MAs running at the same time. The MA is
able to connect the clients to others running MAs. Thus, each client knows
only one MA, that is its access to the Multi-MA. Each MA publishes an
advertisement with a lifetime in order to avoid clients or other MA to
connect to a stopped MA. When it receives a request coming from a client, the
MA submits the problem description to DIET via the MA it has itself
launched. If the submission returns a DIET failure, the MA searches other
MAs. Then, it forwards the client's request to other MAs. SeD references
thus collected are merged and sent to the client.
The general algorithm of the MA is as follows:
- launch a new JXTA Peer,
- build an input pipe to listen to clients' requests or agents forwarded
requests,
- create an advertisement including its input pipe reference allowing
clients to connect to it back and publish it with a hardcoded lifetime,
- process each client or agent message by a thread :
- if the source of the message received is a client,
- call the MA with the packed problem and get SeD reference(s),
- if any, send it to the client, else search other MA, forward the
query to all other MAs discovered and send a response containing all SeD
references thus received to the client.
- if the source is an agent,
- call the MA on the problem received and get SeD references found
in its own DIET tree,
- propagate the request to the other MA(s) (in order to find the fastest
path to reach all the MAs on the network.
- send a response including SeD reference(s) to the MA from which it
received the request, and forward the responses from other MAs it has
reached first back to the MA that reached first this MA.
Next: Interfacing JXTA and DIET
Up: The JXTA components
Previous: The SeD
Contents
DIET Team. 2010-05-26