Exploiting event stream interpretation in publish-subscribe systems
Abstract
Publish-subscribe messaging middleware typically offers limited and low-level options for quality of service, such as best-effort delivery versus reliable delivery, or ordered versus unordered. We propose a new, high-level approach to specifying quality of service, in which the consumer specifies an event stream interpretation function that maps an event stream into a state that represents the consumer's semantics of the stream. Under this approach, the system may deliver either the subscribed event stream, or any alternative stream whose image under the interpretation function yields the same state. Event stream interpretation gives consumers the ability to more accurately specify the tolerable distortions of perfect message delivery, and gives middleware implementations the flexibility to use more efficient protocols for message delivery and failure recovery while preserving application safety. We introduce an event stream interpretation language. We illustrate its utility by applying it to the problem of optimistic delivery of unlogged and out-of-order messages. We show how a publish-subscribe system can take an event stream interpretation program supplied by a subscriber and, using techniques derived from compiler technology, analyze it to determine which messages can be delivered optimistically, and which recovery messages must be delivered when an unlogged or out-of-order message is detected.