RDF Agent
The RDFAgent is the program for the checking BioMOBY service description (also known as a services' signature)
between a Mobycentral Registry and the servers of the
various service providers.
Once a service provider has registered a service with a Mobycentral registry, they may feel the need to update the service or even remove the service. Since the current BioMOBY API prohibits the de-registration of services, a service provider would be stuck with out of date services. This is were the agent comes into the scenario. Everyday (or at a time of the registry administrators choosing), the agent goes through a list of all of the services that it knows about and checks to see whether or not they have been modified or removed. If any modification has occurred since the agents last visit, then the agent will attempt to record those changes with the registry. In addition, any additional services that the agent comes across are automatically registered (providing that they conform to the BioMOBY API).
The following is look at how the agent behaves given a URL to the service description (signature url) :
- Agent will attempt to find services that are described by the given URL. Assuming that some services are found,
- The agent will attempt to resolve the URL and download its contents.
Assuming that the contents are valid RDF/XML, the agent will load create an RDF model and compare the services that are located in the model with ones that it knows about. Any changes are recorded in the registry, as well, any new services are added to the registry. Missing services are removed.
- Sometimes the URL is unreachable. In this case, the agent will attempt to reach that URL a pre-specified number of times. If all attempts fail, then the services located at this URL are removed from the Mobycentral registry.
- The agent is capable of sending out email messages outlining what the agent has done to a service providers services.
The RDFagent allows you to register new services with the Mobycentral
Registry, delete and update the existing services by simply changing your RDF
file.
- Register new services
- Deregister a service
- Update a service
- Example of RDF agent call
Registration of new services
For registration of a new service into the Mobycentral registry you need to do one of the following:
- Using a pre-existing signatureURL,
- add the rdf representation of this service to a pre-existing RDF file, and
either
- perform a registerService with only one defined parameter "signatureURL",
all other parameters must be empty. (an example is here), or
- wait for the agent to discover the changes to your modified RDF document.
- Using a new signatureURL,
- add the rdf representation of this service to a pre-existing RDF file, and
- perform a registerService with only one defined parameter "signatureURL",
all other parameters must be empty. (an example is here).
Deregistration of services
For deletion of a service from the Mobycentral registry you need:
- to delete the rdf representation of this service from your RDF file, and either
- perform a registerService with only one defined parameter "signatureURL",
other parameters must be empty (an example is here), or
- wait for the agent to discover the changes to your modified RDF document.
Updating of services
For updating a service registered with the Mobycentral registry you need:
- to make changes in the rdf representation of this service in your RDF file, and either
- perform a registerService with only one defined parameter "signatureURL"; other parameters must be empty, or
- wait for the agent to discover the changes to your modified RDF document.
Example RDFagent call
In Perl:
use MOBY::Client::Central;
my $m = MOBY::Client::Central->new(
Registries => {
mobycentral => {
URL => 'http://moby.ucalgary.ca/moby/MOBY-Central.pl',
URI => 'http://moby.ucalgary.ca/MOBY/Central'}
}
);
$REG = $m->registerService(
serviceName => "",
serviceType => "",
authURI => "",
contactEmail => '',
description => "",
category => "",
URL => "",
signatureURL => "http://path-to/your/rdf_file.rdf",
);