CICAgent
From Igridrm
(link to Messaging ontology) |
|||
Line 25: | Line 25: | ||
|- | |- | ||
! Ontologies | ! Ontologies | ||
- | | Messaging | + | | [[Messaging Ontology|Messaging]] |
|- | |- | ||
! Example | ! Example |
Current revision as of 19:11, 2 May 2006
CICAgent is yellow pages agent storing grid resources represented by WorkerAgents. Resource adevertisements are stored in jena ontology model. For performance reasons jena's database persistence is used (currently MySQL database).
Contents |
Services
Resource Query Service
Service type | Resource Query Service |
---|---|
Description | Service allows querying of resources previously registered by WorkerAgents. Queries can be expressed in SPARQL or RDQL syntax. Querying mechanism can be easily extended to support other querying languages offered by jena ARQ module.
Depending on the query clause results are returned in different format:
|
Protocols | FIPA Request Protocol |
ACL | FIPA-ACL |
Content Languages | FIPA-SL0 |
Ontologies | Messaging |
Example |
(REQUEST :sender (agent-identifier :name tester@kameleon:1099/JADE :addresses (sequence http://kameleon:7778/acc ) :X-JADE-agent-classname gridrm.test.cic.CICTesterAgent) :receiver (set ( agent-identifier :name cic-agent@kameleon:1099/JADE :addresses (sequence http://kameleon:7778/acc )) ) :content "((action (agent-identifier :name cic-agent@kameleon:1099/JADE :addresses (sequence http://kameleon:7778/acc)) (CICQueryResource :resourceQuery (OntoQuery :ontoQuerySyntax http://jena.hpl.hp.com/2003/07/query/SPARQL :ontoQueryStr \\"PREFIX grid: <http://gridagents.sourceforge.net/Grid#> DESCRIBE ?res WHERE { ?res grid:cpuClockSpeedMhz ?cpu . FILTER (?cpu >= 1000)}\\"))))" :language fipa-sl0 :ontology Messaging :reply-by 20060501T145408274Z :protocol fipa-request :conversation-id C26811873_1146495245282) (INFORM :sender (agent-identifier :name cic-agent@kameleon:1099/JADE :addresses (sequence http://kameleon:7778/acc ) :X-JADE-agent-classname gridrm.agents.cic.CICAgent ) :receiver (set ( agent-identifier :name tester@kameleon:1099/JADE :addresses (sequence http://kameleon:7778/acc ) :X-JADE-agent-classname gridrm.test.cic.CICTesterAgent ) ) :content "((result (action (agent-identifier :name cic-agent@kameleon:1099/JADE :addresses (sequence http://kameleon:7778/acc)) (CICQueryResource :resourceQuery (OntoQuery :ontoQuerySyntax http://jena.hpl.hp.com/2003/07/query/SPARQL :ontoQueryStr \\"PREFIX grid: <http://gridagents.sourceforge.net/Grid#> DESCRIBE ?res WHERE { ?res grid:cpuClockSpeedMhz ?cpu . FILTER (?cpu >= 1000)}\\"))) (RdfGraphResult :rdfGraph (OntoData :ontoDataLang RDF/XML-ABBREV :ontoDataStr \\"<rdf:RDF xmlns:grid="http://gridagents.sourceforge.net/Grid#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <grid:UnitaryComputer rdf:about="jade://myLaptop@kameleon:1099/JADE"> <grid:cpuClockSpeedMhz rdf:datatype="http://www.w3.org/2001/XMLSchema#int"> 1500 </grid:cpuClockSpeedMhz> <rdf:type rdf:resource="http://gridagents.sourceforge.net/Grid#ComputerSystem"/> </grid:UnitaryComputer> </rdf:RDF>\\"))))" :reply-with tester@kameleon:1099/JADE1146495245939 :language fipa-sl0 :ontology Messaging :protocol fipa-request :conversation-id C26811873_1146495245282 ) |
FIPA DF Registration |
(service-description :name "igrid-rm-cic-service" :type "igrid-rm-cic-service-query-resource" :protocol (set "FIPA-Request") :ontology (set "Messaging") :language (set "FIPA-SL0") |
Resource Registration Service
to be written
Request handling
Each request to CICAgent involves operation on jena model which is stored in database. For performance reasons CICAgent does not perform those operations by itself. It delegates incoming requests to CICDbAgents. A CICDbAgent can perform one operation at a time. Hence CICAgent remembers which database agents are busy and marks them as locked. Once the result is returned from CICDbAgent again it is marked as unoccupied.
Simple request
Example of simple CIC request.
Multiple concurrent requests
This example shows how CICAgent handles larger traffic. There are 5 requests sent to cic-service. CICAgent has three database agents, thus it handles three requests. Once the requests are accomplished the other two are handled.
The CICAgent does not queues requests by itself. Requests are messages and are queued by jade platform in message datastore. CICAgent simply runs cyclic ActionRequestResponder behaviours. The number of these behaviours is equal to the number of CICAgents and hence it can only handle concurrenlty three requests.
The exact number of CICAgents is going to be precised by appropriate performance simulations.