In the traditional client/server computing model, which is used in RPC and RMI, ... In this paper, we present RUBDES which is a distributed event- ... Model [2], which encapsulates events from the platform's Graphical User Interface.
RUBDES: A Rule Based Distributed Event System Ozgur Koray Sahingoz1 and Nadia Erdogan2 1
Air Force Academy, Computer Engineering Department, Yesilyurt, Istanbul, TURKEY, RVDKLQJR]#KKRHGXWU 2 Istanbul Technical University, Electrical-Electronics Faculty, Computer Engineering Department, Ayazaga, 80626, Istanbul, TURKEY HUGRJDQ#FVLWXHGXWU
$EVWUDFW ,Q WKH ODVW \HDUV HYHQWEDVHG FRPPXQLFDWLRQ SDUDGLJP KDV EHHQ ODUJHO\ VWXGLHG DQG FRQVLGHUHG DV D SURPLVLQJ DSSURDFK WR GHYHORS WKH FRPPXQLFDWLRQ LQIUDVWUXFWXUH RI GLVWULEXWHG V\VWHPV 58%'(6 5XOH %DVHG 'LVWULEXWHG(YHQW6\VWHP LV D GLVWULEXWHGHYHQW V\VWHP WKDW DOORZV WKH XVH RI FRPSRVLWHHYHQWVLQSXEOLVKVXEVFULEHFRPSXWDWLRQDOPRGHO,QWKLVV\VWHPDQ HYHQWLVUHSUHVHQWHGDVDQREMHFWDQGDUXOHLVUHSUHVHQWHGDVDQH[SUHVVLRQRUD IXQFWLRQ WKDW LV HYDOXDWHG RU H[HFXWHG GHSHQGLQJ RQ WKH RFFXUUHQFH RI HYHQWV 7KLVSDSHUSUHVHQWVWKHGHVLJQGHWDLOVRI58%'(6DQGXVDJHRI5XOH'HILQLWLRQ /DQJXDJH5'/ WRGHVFULEHFRPSRVLWHHYHQWVDQGHYHQWILOWHUV
1 Introduction In the traditional client/server computing model, which is used in RPC and RMI, communication is typically synchronous, tightly coupled and point-to-point. As shown in Figure 1.a, clients invoke a method on the remote server and wait for the response to return. This type of communication requires clients and servers to have some prior knowledge of each other. With the use of mobile or large-scale systems, the need for asynchronous, loosely coupled and point to multipoint communication pattern arises. Event models are application independent infrastructures that satisfy communication requirements of such systems. Event-based communication generally implements what is commonly known as the publish/subscribe protocol. As shown in Figure 1.b, an event supplier (publisher) asynchronously communicates event data to a group of event consumers (subscribers), ideally without knowledge of their number and location. To receive event data, subscribers register to an event service with the definitions of the particular interested events. A definition can include a simple subscription message, a subscription message with filtering on events or a subscription message for composite events. In this paper, we present RUBDES which is a distributed eventbased system that uses Rule Definition Language (RDL) to define subscription criteria in the form of a rule and relies on dynamic queries for filtering operations. RUBDES uses a content-based subscription policy, thus enhancing the efficiency of the two main processes of publish/subscribe systems, namely, the publishing and delivering processes. $ 25 and h1.value < 37)
rule rule_3 onEvent Temperature t1, Humidity h1 getData h1.value,t1.value where (t1.value < 27 and h1.value < 70)
b. Filtered Event
c. Composite Event
Fig. 5. Filtered Events in RDL
A rule definition is composed of four parts, each introduced by the keywords rule, onEvent, getData and where, respectively, as shown in Fig. 5. The first part sets a unique identifier for the rule, the second part specifies the type of the target event, the third part specifies the specific information data about the event that subscriber wants to be notified with, and the last part describes the conditions on which a filtered or a composite event should be caught. In RUBDES, it is possible to define rules for three different event types: simple events, events with filtering and composite events. Simple events, shown in Fig. 5.a, are used when subscribers are interested in only one
290
O.K. Sahingoz and N. Erdogan
event type. An event-based system may include a multiple number of publishers. Thus, the number of events propagated in an event-based system may be quite large. However, a particular consumer is usually interested in only a subset of the events propagated in the system. Event filters are a means to control the propagation of events. Filters enable a particular consumer to subscribe to the exact range of events it is interested in receiving. An event that is delivered uses network bandwidth and CPU processing power on the consumer side. It is therefore desirable to prevent the delivery of unwanted events. RUBDES allows for event filtering as shown in Fig. 5.b. Clients may require to be notified on events from multiple sources and may want to detect a specific pattern of event occurrences from these different publishers. Such a combination of event occurrences, where a client is interested in a sequence of event occurrences but not in any of the events alone, is called an event composition. Intuitively, while a filter selects one event notification at a time, a pattern can select several notifications that together match an algebraic combination of filters. An advanced feature of RUBDES is that it allows subscribers to specify composite events, as shown in Fig. 5.c.
5 System Performance We’ve selected average message distribution time as an appropriate benchmark for evaluating performance of a communication framework. We define event distribution time as the elapsed time from the generation of an event to its reception by all subscribers that are interested in that event. In our analysis, event generation is the submission of an event to the Event Server by a publisher. In our preliminary analysis, we established an objective of determining the efficiency of the Event Server delivery without incurring concurrency into the system. Our goal was to examine the performance and scalability of the system.
'LVWULEXWLRQ7LPHPV
1XPEHURI6XEVFULEHUV
Fig. 6. Average Distribution Time with Respect to Number of Subscribers
RUBDES: A Rule Based Distributed Event System
291
We ran a simple benchmark with a single publisher, strongly connected to four event servers and a multiple number of subscribers, which were distributed evenly on these event servers. The number of subscribers was varied from 4 to 32 on successive trials. The experiment used a single event source whose event generation rate was slow enough to allow all the listeners to complete processing a given event before the next one was generated. As we were sure that there was no concurrent event delivery, we could compute the theoretical best average delivery time. Fig. 6 shows event distribution times we have measured for increasing number of subscribers. Although, RUBDES has not been tested with very large numbers of subscribers and publishers, the results we have obtained suggest that RUBDES is scalable.
6 Conclusion and Future Work In this paper, we have presented RUBDES, an event-based publish/subscribe system that uses rules to specify subscription on events. RUBDES uses a content-based subscription mechanism that allows users to subscribe on different event types. A new Rule Definition Language (RDL) is used to enable specification of different types of subscription (simple subscription, subscription with filtering and subscription for composite events). Implementation of a prototype system in Java is completed. As future work, we plan to apply the system in different application domains and focus on new design decisions to improve its performance and scalability. We want to add features for mobile subscribers that can connect from different locations to different Event Servers and test the entire system in a large scale platform.
References 1. Object Management Group, “CORBAservices: Common Object Service Specification”, Technical Report, Object Management Group, July (1998). 2. “Java AWT: Delegation Event Model”. Available online at http://java.sun.com/j2se/ 1.4.1/docs/guide/awt/1.3/designspec/events.html (2003) 3. G. Cugola, E. Di Nitto, and A. Fuggetta, “The JEDI event-based infrastructure and its application to the development of the OPSS WFMS”, Technical Report, CEFRIEL – Politecnico di Milano, Italy, August (1998). 4. B. Krishnamurthy and D. S. Rosenblum, “Yeast: A General Purpose Event-Action System”, IEEE Transactions on Software Engineering, 21(10):845–857, Oct. (1995). 5. A. Carzaniga, “Architectures for an Event Notification Service Scalable to Wide-area Networks”, PhD Thesis, Politecnico di Milano, Italy, December (1998). 6. P.T.Eusgter, “TypeBased Publish/Subscribe”, PhD Thesis. Ecole Polytechnique Federale De Lausanne, France, (2001) 7. O. K. Sahingoz, N. Erdogan, “RUBCES: Rule Based Composite Event System”, accepted for publication in XII. Turkish Artificial Intelligence and Neural Network Symposium (TAINN), Turkey, July (2003)