Notification Patterns

Notify notifications are designed to be sent and received using the W3C Linked Data Notifications (LDN) standard. Payloads have a predictable structure, based primarily on Activity Streams 2.0, with some additional vocabularies included for particular properties.

Core Payload

All Notify payloads define an Activity Streams 2.0 activity, and include other properties from the Notify context. They may also, optionally, include other properties from other contexts. The following properties from Activity Streams 2.0 are used consistently in all the notification patterns:

  • The activity property must contain the following properties:
    • id: This must be a URI, and the use of URN:UUID is recommended. An HTTP URI may be used, but in such cases the URI should resolve to a useful resource.
    • type: This should be an array, and in any case must include one of the Activity Stream 2.0 Activity Types. It may (depending on the activity) also include a type from the Notify Activity Types vocabulary
    • origin: The originator of the activity, typically the service responsible for sending the notification.
    • target: The intended destination of the activity, typically the service which consumes the notification.
  • The activity property may (and often will) contain the following properties:
    • object: This should be a Web resource, generally the focus of the activity. Other object properties may appear in notifications, as properties of other properties. The activity itself should have zero or one object properties.
    • actor: Sometimes it is useful to identify the party or process that initiated the activity, in which case this initiator should be expressed as an actor.

The following notification patterns are defined to be widely reusable. Their re-use is illustrated in the example scenarios.

This group of patterns describes an offer activity, where one system offers one of its resources for some activity to be conducted by a second system.

Patterns

  • Offer of a resource to a service

This group of patterns describes the retraction of an offer activity.

Patterns

  • Retraction of an offer

This group of patterns is used to acknowledge an offer activity, indicating acceptance or otherwise.

Patterns

  • Acceptance of an offer
  • Rejection of an offer

This group of patterns is used to announce the outcome of an activity, sometimes (but not always) linking an original resource to a new, related resource.

Patterns

  • Announcement (standalone)
  • Announcement (in response to offer)