Event Probability Based Priority Filter for Efficient Event Matching
Event matching plays a critical role in content-based publish/subscribe system. Most traditional methods focus on existing subscriptions separation and combination. However, an event usually comes with certain probability distribution in each dimension. Thus taking both existing subscriptions and probable coming event into consideration can improve event matching time efficiency. Based on that, we put forward PF (Priority Filter), a highly efficient event matching algorithm. By building up a unified model with historical subscriptions for continuous and discrete attributes, we derive formulas to calculate each attribute’s filtering rate. Besides, in order to guarantee time efficiency both in matching, inserting, and deleting, a red-black tree regarded as a priority filter is built up on all attributes according to filtering rate. Experiments demonstrate that PF has a 30% faster speed compared to existing methods with acceptable insertion and deletion time and memory consumption.