[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Three levels of filtering
However you choose to denote the controlling expression, WSN currently provides for three levels of message filtering: Precondition, Topic and Selector. Topic has special status in that we define one possible syntax for it, namely WS-Topics, and in that we allow a NotificationProducer to advertise which topics it supports and whether this set may vary over time. The other two, as I understand it, are to be applied before and after topic filtering. That is, a notification that does not meet the precondition is (conceptually) never even produced, while a message that does not meet the selector is (conceptually) produced, sent on the appropriate topic, but never delivered to the consumer. I say "conceptually" because it's not clear to me how anyone could tell the difference. Precondition is not a global property. If I make one subscription with precondition "only on even-numbered Thursdays" and another that says "always", the notification will always need to be produced. Conversely, if there is only one active subscription on a topic and the selector is never met, there is never any need to produce the notification. Actually, I believe I've heard a slightly different interpretation of Precondition, Topic and Selector. Like the previous one, it isn't explicit in the WS-BN spec. I believe it came out of the Chicago F2F, but it may well be documented explicitly elsewhere: Precondition can be based on anything known to the producer. Topic information is carried on the message envelope, outside the payload proper. Selector operates on the message content (perhaps including the topic?). So for example, the precondition can be "only if it's raining in Topeka" even if the message itself carries no weather information. Strictly speaking, topic filtering could be subsumed by selector filtering, but calling it out explicitly allows for easier optimization and a better fit with existing messaging paradigms. The larger point here is that there is a plausible argument from Occam's razor that "filtering is filtering." I'm not saying I buy that, but I'd like a clear and convincing counterargument to explain why we have three different levels. As it stands, I believe there is a plausible argument for combining either Topic and Selector (both depend on the message context) or Precondition and Selector (Topic, with its special status, vs. everything else).
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]