FreeYourSoul / Fabko

Fabko : Free Agent Board Cooperative : A Agent/Blackboard library
Other
1 stars 0 forks source link

Define abstract interface for Agent / Peerboard #14

Open FreeYourSoul opened 1 year ago

FreeYourSoul commented 1 year ago

Is your feature request related to a problem? Please describe. Interface should be able to :

H4E commented 1 year ago

First thing is : How Agent communicate with PeerBoard.

H4E commented 1 year ago
concept policy_comunication = ...

auto agent = std::make_unique<Agent>(fabko::policy_comunication);
peerboardId = registerPeerBoard("My board");  /* Not done if an Agent is not a server node */ 
peerboardId = Agent.connect ("My board");     /* Can also be found on P2P network amd return a virtual board etc... */
agent.query (peerboardId, query);  
agent.add (peerboardId, capability );
agent.subscribe (peerboardId, capability, callback);
FreeYourSoul commented 1 year ago
auto agent = std::make_unique<Agent>(fabko::policy_comunication);
peerboardId = registerPeerBoard("My board");  /* Not done if an Agent is not a server node */ 
handler_connection = Agent.connect ("My board");     /* Can also be found on P2P network etc... */
agent.query (query);   // query all known peerboard
handler_connection.query(query); // query secific peerboard
handler_connection.add (capability ); // specific peeboard
handler_connection.subscribe (capability, callback); // do it on a specific peeboard
agent.subscribe (capability, callback); // do it on all known peerboard