The Torrent Suite™ Software API is implemented as conventional web service, where your client application sends and receive messages to access server functionality.
The following figure describes the client-server relationship and the layered implementation of the web service implemented by the server.
Your application is the client application in the client-server architecture, which can be further described as a service-oriented architecture. The client makes requests for information, or data or some service and the server responds to the request. The server makes system facilities available to your application as a service. Your application behaves very much like the web browser with which you are familiar, except that as a specialized program your application can do more than simply view the data.
Representational State Transfer (REST) is another architectural concept applied to data interchange between clients and servers. Using the communication methods inherent in the underlying HTTP protocol, clients make requests for resources resident on the server. Resources are usually database items but can be any service or functionality implemented by the server. These communication methods are the following:
Web developers should already be familiar with these methods.
Other characteristics that make REST the architecture of choice for the Torrent Suite API include:
The server makes resources and functionality available to client applications upon request.
Web application servers typically implement the Model-View-Controller architecture pattern. Simply, the server software implementation abstracts the backend database, or model, and presents a view of the data in a way that the application can access and use. The controller part of the pattern implements the business logic around the data.
This decomposition of web application server software is in widespread use and Django is used to implement an MVC-like pattern in Torrent Server.
Django is a web application framework that implements a RESTful API using the Tastypie framework.
Modern web-like services are typically implemented using the Model-View-Controller architectural pattern, which is similarly implemented by Django using the Python programming language.
The API operates on resources, which are addressable using a URI. The conventional notion of a web application resource is a database item but the API extends the notion to include the file system and plugins.
Resources that are not database entities, such as plugins, are not included in the REST API schema listing.
Torrent Server uses a PostgreSQL database for persistent backend data storage. PostgreSQL supports access to the data using standardized SQL.
Django integrates PostgreSQL as the model of an MVC framework and exports an SQL-like interface, using Tastypie, through the REST API.
The API can be used to download files, typically, analysis data and results files.
A number of database resources, such as results, have fields that link to results files. An application can use these links to reference and download files.
Plugins provide a mechanism for you to write code that can be run, automatically or manually, using a shell script after analysis pipeline processing completes. The plugin feature extends Torrent Server capabilities in an open-ended, flexible way.
The API provides methods to submit plugins to the job scheduler.