If the event source does not support the requested delivery mode, the request MUST fail, and the event source MAY generate a wse:DeliveryModeRequestedUnavailable fault indicating that the requested delivery mode is not supported.

Section 1.2 Delivery Modes describes the concept of modes:

In order to support this broad variety of event delivery requirements, this specification introduces an abstraction called a Delivery Mode. This concept is used as an extension point, so that event sources and event consumers may freely create new delivery mechanisms that are tailored to their specific requirements.

It is clear then, that the Mode attribute is a named extension point that is intended to indicate the use of Notification delivery mechanisms outside those defined by WS-Eventing (i.e. Push). The following sections provide various arguments against the use of the wse:Mode attribute and constitute the case for its removal and the removal of the wse:Delivery wrapper from the WS-Eventing specification. The arguments within this page relate to issues 6432 and 6692 in the W3C WS-RA Working Group.

Contents

1. Mode Violates WS-* Design Principles

One of the core architectural principles of WS-* is the idea of "decentralized composition". WS-* technologies and specifications can be developed independently to solve specific problems then combined as needed to provide solutions with synergistic properties. For example, one could combine WS-AtomicTransaction and WS-ReliableMessaging to create a solution that leveraged the automated transmission retry facilities of WS-RM to minimize the number transactions aborted due to network errors. The Mode attribute is an anti-pattern for this form of composition because every combination of technologies that it can support must be described a priori and assigned a unique URI.

2. Mode is Not Scalable

The value of the Mode attribute is a single URI. The use of any single value to express all the combinations of a number of different options is inherently non-scalable. For example, suppose there is an extension that defines a "Pause" operation that will temporarily halt the transmission of Notifications for a Subscription. Further suppose that there are two additional options to the basic Pause function; an auto-pause feature that pauses the Subscription after every N Notifications and a feature that requests that the Event Source persist any Notifications that were produced while the Subscription was paused. To cover all the combinations of this feature you would need 4 separate Mode URIs (pause, pause-with-auto-pause, pause-with-persist, and pause-with-persist-and-auto-pause). If you added another sub-feature or option you would need 8 Mode URIs.

Contrast this with the standard WS-* pattern of indicating extensions via discrete elements or attributes. The request to enable the "Pause" extension could be indicated via the presence of the "foo:Pause" element in the wse:Subscribe request. The "foo:Pause" element could be defined to include two optional boolean attributes, "autoPause" and "persist". This "foo:Pause" extension element could occur alongside other extension elements without the need to define unique URIs that describe such combinations.

3. Mode is Redundant

The use of a named element or attribute as an extension point does not impart any qualities beyond those that apply to "anonymous" extension points (i.e. those that are defined by the use of unnamed xs:any and xs:anyAttribute within XML Schema). For example, the following element:

The latter is, in fact, more efficient because extensions can simply be added to the ns:Foo element without the need for the surrounding ns:Extension element. The ns:Extension element doesn't provide any additional semantics, since any element that is not defined in the schema for ns:Foo is, by definition, an extension.

Implementations that consume the ns:Foo element must check two locations for the presence of extensions; both inside the optional ns:Extension element and at the end of the ns:Foo element (after the ns:SomeStuff element in cases where the ns:Extension is not present, or after the ns:Extension element in cases where it is). Checking two locations is less efficient and more error prone than checking a single location.

Developers that wish to extend the ns:Foo element must decide whether to add the extension as a child element of ns:Extension or of ns:Foo. If the specification for ns:Foo defines differences in the processing of extensions between these two points (e.g. differences in the behavior for non-understood extensions), such differences must be clearly described or it is likely that developers will pick the wrong point for their extension. A single extension point is more efficient in terms of both the developers time and the actual runtime costs.

It should be noted that the wse:Subscribe message is analogous to our final example above, except that wse:Subscribe has several more layers of extensibility including SOAP Headers, the wse:Subscribe element, the wse:Delivery element, the extensibility of the various wsa:EndpointReferences, and the Mode attribute. The following sections show how these multiple layers of extensibility could be removed in a manner that still allows the wse:Subscribe message to support the use cases that are supported by the Member Submission. We sill use the following definition of wse:Subscribe for these examples:

3.1 WSMAN PushWithAck

The WS-Management v1.0.0.a specification defines a WS-Eventing delivery mode extension called "PushWithAck". This extension is described as follows:

With this mode, each SOAP message has only one event, but each event is acknowledged before another may be sent. The service MUST queue all undelivered events for the subscription and only deliver each new event after the previous one has been acknowledged.

A request for a subscription with "PushWithAck" delivery mode might look like the following example:

In this example we chose to extend the wse:Subscribe request with a attribute of type xs:boolean. This is because there are no parameters or other modifiers for this extension; it is either on or off. If there where parameters such as the expected acknowledgment interval, etc. this extension would have taken the form of an added child-element within wse:Subscribe.

Note the use of the wsman:UseNotifyAcks SOAP Header. This header is used to conform to the extension semantics of the Mode attribute wherein extensions that are not understood must generate a fault and fail to create a subscription. There are cases in which the Subscriber may want to omit this header. We will cover such cases in a later section.

An even more literal translation of this extension might look like the following:

The above example actually preserves the use of the wse:Delivery element and it's @Mode attribute in their original, WS-Eventing 200603 namespace, but treats them as extensions in our proposed uniform extension model. The purpose of this is to allow existing implementation to support both WS-Eventing 1.0 and 200603 using a common codebase.

The above examples illustrate a literal translation of the semantics of the existing WS-Management 1.0 "PushWithAck" extension using the proposed uniform extension model. In general, the DMTF and other organizations should be encouraged to re-use existing web service standards where appropriate rather than inventing idiosyncratic alternatives for the same functionality. In this case this would entail the use of WS-ReliableMessaging to provide the acknowledgment framework and retry semantics. A Subscribe request that includes the indication that Notifications should be sent using WS-RM might look like the following:

Although this may look a bit intimidating, note that the majority of the extension material lies within the NotifyTo EPR. There is an implicit architecture underlying this in which there are separate, WS-RM components that can understand and parse this policy. The wsman:UseEPRPolicy serves as an indication to the Event Source that this Subscribe request contains policies within one or more of its EPRs. The semantics may be defined such that the Event Source must understand and be capable of complying with the contain policies or it must reject the Subscribe request (again, we're not trying to present a full-fledged design on the composition of WS-RM and WS-Eventing, we're just trying to show the kinds of extensions that are possible within our uniform model).

3.2 WSMAN Pull

The WS-Management v1.0.0.a specification defines a WS-Eventing delivery mode extension called "Pull". This extension is described as follows:

WS-Management defines a custom event delivery mode, "pull mode", which allows an event source to maintain a logical queue of event messages received by enumeration.

A request for a subscription with "Pull" delivery mode might look like the following example: