A 'service' in Anno-J (often referred to as a fetcher) is is a small program that sits out on the web somewhere and responds to simple HTTP requests with sensible data. For example, a time fetcher might respond to the query: http://www.somesite.com/service?tellTime with a response of 09:30:00 AM. From the client's perspective, the fetcher's implementation details are irrelevant.
Anno-J is a client and it's important to realize that it does not store data: it is a REST-based, 100% server-side agnostic application. It is the responsibility of the data provider, not the client, to maintain, curate, secure, syndicate, and host his/her own data.
This section provides an example of how to create a server-side fetcher that provides Gene Model annotation data in response to simple HTTP GET requests (conveniently the same requests that an Anno-J GeneModels plugin uses). The example uses MySQL, PHP and Apache but does not depend upon these technologies.
This whole process may seem complicated at first, but it is simple once the core concepts are grasped. The bulk of fetcher scripts can be pushed out to centralized files for inclusion when necessary, thus reducing the final fetcher to only a few lines. In the gene models example presented in this section, the following PHP code is all I have to write to create a new service:
/** * Easy once you get the hang of it */ $table = 'browser.genes'; $title = 'Gene Models'; $info = 'Gene-model annotations for our favourite little weed.'; require_once 'Models.php'; //That's all folks