Cloud Element

A cloud element is an optional element of a channel. According to the RSS spec, a cloud specifies a web service that supports the rssCloud interface which can be implemented in HTTP-POST, XML-RPC or SOAP 1.1. Its purpose is to allow processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds.


<cloud domain="rpc.sys.com" port="80" path="/RPC2" 
	registerProcedure="myCloud.rssPleaseNotify" protocol="xml-rpc" />

In this example, to request notification on the channel it appears in, you would send an XML-RPC message to rpc.sys.com on port 80, with a path of /RPC2. The procedure to call is myCloud.rssPleaseNotify.

A workstation calls the cloud to register. The procedure takes five parameters: the name of the procedure that the cloud should call to notify the workstation of changes, the TCP port the workstation is listening on, the path to its responder, a string indicating which protocol to use (xml-rpc or soap, case-sensitive), and a list of urls of RSS files to be watched. The cloud can determine the IP address of the caller from the request. A workstation cannot make a registration call on behalf of another. The cloud returns true if it was able to do the registration, false otherwise.

When a subscribed-to channel changes the cloud calls back to the procedure named in the registration call with one parameter, the url of the channel that changed. At that point the workstation could read the channel, or notify other workstations that the channel has changed, clear a cache, send an email or do nothing. The workstation returns true.

By convention registrations expire after 25 hours. Workstations should register every 24 hours for each subscription to keep them current.

The five parameters (attributes) of a cloud can be obtained with the following DOMIT! RSS methods:


$element->getDomain();

$element->getPort();

$element->getPath();

$element->getRegisterProcedure();

$element->getProtocol();


Documentation generated by ClassyDoc, using the DOMIT! and SAXY parsers.
Please visit Engage Interactive to download free copies.