1.3 Overview
The Peer Content Caching and Retrieval: Retrieval Protocol (PCCRR) defines four request/response exchanges between a client and a server on top of an HTTP [RFC2616] transport: to query the supported version range of the server, to query the availability of specific content, and to retrieve specific content. The protocol assumes that the client identifies both the specific content it is looking for and the server it will contact. The discovery of the content information and the server address is outside the scope of the Retrieval Protocol. The request/response exchanges are:
Content Availability Request: The client initiates a query to the content server for the availability of the specified content. The server responds with the ranges (subsets or all) of the requested content it has. There are two types of content availability requests:
Segment Availability Request: The client initiates a query to the server for the availability of a set of segments of content. The server responds with the ranges (subsets or all) of the requested segments of content available in the server's local cache.
Block Availability Request: The client initiates a query to the server for the availability of a set of ranges of blocks within a single segment of content. The server responds with the ranges (subsets or all) of the requested block of content it has within the specified segment.
Content Retrieval Request: The client initiates a request to the server for the specified content. The server either replies with the requested content or with content of zero length when the requested content is not available.
Version Negotiation Request: The client initiates a request to the server to query the supported Retrieval Protocol version range. The server replies with its supported Retrieval Protocol version range.
The exchanges can be utilized in conjunction or independently, as described in the following examples:
The client can query the server for the availability of the content, identify what content the server has, and then retrieve only the available content from the server; or
The client can query the server for the availability of the content, identify what content the server has, and decide not to retrieve the content; or
The client can retrieve the content directly from the server without querying for the availability of the content first.
For all scenarios described earlier, the client can optionally query the server for its supported version range first before querying for content availability or retrieving blocks.
The Retrieval Protocol does not mandate the relationship between these exchanges, as shown in the examples. As a result, in the case where they are used in conjunction, the higher-layer applications invoking the Retrieval Protocol retain the availability list from the availability query, and use it to retrieve part or all of the available content in the subsequent retrieval request(s).
Peers within the Peer Content Caching and Retrieval Framework (or Framework) use the Retrieval Protocol in one of two ways, depending on whether they are in distributed mode, retrieving content from each other, or hosted cache mode, retrieving it only from a single preconfigured server. In the distributed mode case, a peer uses the framework's Discovery Protocol (see [MS-PCCRD]) to locate peers who have the desired content, and then initiates exchanges with the discovered peers to obtain the content. In hosted cache mode, a peer directly initiates exchanges with the hosted cache to obtain the desired content.