This specification is currently a draft under development.

Subscription Event Protocol

The CloudOS Subscription Event Protocol provides an event based model for managing subscriptions between Personal Clouds. The current implementation of the protocol will create a symmetric relationship between both Personal Clouds. In addition, the target Personal Cloud will automatically create (approve) the subscription request from the originating Personal Cloud. In other words there is no user approval required. Optional user approval is the next major feature that will be added to the Subscription Event Protocol specification. In order to used the Subscription Event Protocol the CloudOS ruleset must be installed in the Personal Cloud for both the originating and target.

Subscribe

The system:subscribe event is used to create a Personal Channel between two Personal Clouds.

During the processing of creating the Personal Channels between the two Personal Clouds callback events are raised within each respective Personal Cloud. These events are raised to enable the developer to take additional actions when the Personal Channels are actually created.
The eventChannel attribute is the Personal Channel token for the remote Personal Cloud, while the backChannel is the Personal Channel token for the current Personal Cloud.

Unsubscribe

The system:unsubscribe event is used to remove the Personal Channels between two Personal Clouds.

The backChannel attribute uniquely identifies the Personal Channel within the Personal Cloud, and provided to the target Personal Cloud for raising events into the current Personal Cloud. The backChannel is one of the attributes provided by the subscriptionList() function.
During the processing of removing the Personal Channels bewteen the two Personal Clouds callback events are raised within each respective Personal Cloud. These events are raised to enable the developer to take additional actions when the Personal Channels are actually being removed.
The eventChannel attribute is the Personal Channel token for the remote Personal Cloud, while the backChannel is the Personal Channel token for the current Personal Cloud

Subscription List

subscriptionList(namespace, relationship)