Discussion:
[jade-develop] About Get DFAgent Messages from other Computer
CarinadGuo
2014-08-12 01:10:45 UTC
Permalink
Dear Expert,

Here I want to solve with something like, I start Agents from two
platforms on 2 computers, say C1, C2. If Agents on C1 has registered some
kind of service on the DF and after that Agents on C2 needs to get agents on
C1 with the help of DF on C1, how can I do that with JAVA Codes? Thank you
very much.



Make it Clearer: Agent(on platform1) -> (ServiceType:ST1) register on
DF (Platform1)

Agent(on Platform2) ->(Search Agent with Service
Type(ST1)) with the help of DF(on Platform1) (remote search)



Best Wishes,

Carinad Guo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140812/6a960c8f/attachment.html>
Caire Giovanni
2014-08-15 12:58:01 UTC
Permalink
Hi,

DFAgentDescription template = .... fill the DFDescription template normally
AID remoteDF = new AID("df at Platform1", AID.ISGUID);
remoteDF.addAddresses("transport address of Platform1");
DFAgentDescription[] results = DFService.search(this, remoteDF, template, null);

This of course assumes you know a priori who the remote DF is and which transport address the remote platform has.
A more sophisticated and flexible approach is to federate the DFs of the two platforms. Federation is an administration action that can be done by means of the DF GUI.
All agents register and search with the local (default) DF only. Searches however are propagated to the federated DF(s) and therefore agents living in Platform1 (registered with DF of Platform1) can be found by agents living in Platform2 (searching on DF of Platform2) transparently.
The only difference when searching is that a depth of 1 must be specified in the SearchConstraints specified when searching, otherwise searches are not propagated to federated DF(s)

Bye,

Giovanni

Da: jade-develop [mailto:jade-develop-bounces at avalon.tilab.com] Per conto di CarinadGuo
Inviato: martedì 12 agosto 2014 03:11
A: jade-develop at avalon.tilab.com
Oggetto: [jade-develop] About Get DFAgent Messages from other Computer

Dear Expert,
Here I want to solve with something like, I start Agents from two platforms on 2 computers, say C1, C2. If Agents on C1 has registered some kind of service on the DF and after that Agents on C2 needs to get agents on C1 with the help of DF on C1, how can I do that with JAVA Codes? Thank you very much.

Make it Clearer: Agent(on platform1) -> (ServiceType:ST1) register on DF (Platform1)
Agent(on Platform2) ->(Search Agent with Service Type(ST1)) with the help of DF(on Platform1) (remote search)

Best Wishes,
Carinad Guo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jade.tilab.com/pipermail/jade-develop/attachments/20140815/c7207463/attachment.html>
Loading...