Abstract
WebFilter is a high-performance publish-subscribe system designed to handle massive scales of XML data. By converting XPath subscriptions into clustered internal representations, it can match incoming documents against one million user interests at a rate of 70 documents per second on modest hardware. This paper presents the architecture of WebFilter, highlighting its use of elementary events and a novel clustering strategy to achieve sub-linear matching time.
Introduction
In the early 2000s, the explosion of internet and mobile communication created a need for "selective information dissemination." Users required specific updates, such as notifications for real estate listings meeting precise criteria. Standard message-oriented middleware at the time relied on simple (attribute, value) pairs, which lacked the expressiveness needed for complex data. XML offered a much richer, hierarchical way to describe data, but filtering it was computationally expensive. Existing systems struggled to scale when thousands or millions of users submitted complex queries using XPath against high-velocity XML streams.
System Architecture
WebFilter bridges the gap between expressive queries and high throughput using several key techniques integrated into a cohesive architecture. The system is designed to handle two main inputs: XML documents (publications) and XPath expressions (subscriptions).
The system processes XML documents by breaking them down into "elementary events." These events describe the structure of a path, including elements, relative positions, attributes, and values. Simultaneously, XPath expressions are compiled into an optimized internal format by the XPath-Expr. Parser.
The core innovation is the Subscription Clustering strategy. Rather than checking every single subscription for every incoming document, WebFilter groups subscriptions that share similar elementary events. When a document arrives, the XML Document Parser generates events that are passed to the predicate matching stage. The system then only evaluates the clusters relevant to the specific paths and values present in that document. This approach drastically reduces the search space, enabling sub-linear matching time relative to the number of subscriptions.
The implementation uses a hybrid approach: the core filtering engine is written in C for maximum performance, while the user interface and notification management are handled in Java, providing a balance between speed and ease of integration.
Experimental Evaluation
The authors evaluated WebFilter using the XFilter benchmark, a standard for XML filtering, and the Newspaper Association of America (NAA) Classified Advertising Standards DTD to simulate real-world ad dissemination.
Key results include:
- Massive Scalability: The system successfully managed 1,000,000 XPath expressions simultaneously.
- High Throughput: On an i686 500MHz workstation, it processed 70 XML documents per second.
- Efficiency: The average XML document in tests had a depth of 4.4 and 26.3 elements, demonstrating the system's ability to handle complex data structures without performance degradation.
Discussion and Conclusion
WebFilter demonstrates that hierarchical filtering and intelligent indexing are key to scaling XML dissemination. By treating documents as trees and indexing subscriptions based on events, the system achieves significant performance leaps over flat attribute-value systems. Furthermore, WebFilter supports dynamic updates, allowing subscriptions to be inserted, updated, or deleted while the system is running—a critical feature for real-world applications like stock tickers or news alerts.
While highly effective, the current implementation focuses on a subset of XPath. Future work could explore horizontal scaling across distributed environments and optimization for wireless environments with intermittent connectivity and low bandwidth.
Summary updated