Baixe o app para aproveitar ainda mais
Prévia do material em texto
A tool for development of distributed event-based systems Carlos Neves Júnior1, Hans Kurt Edmund Liesenberg1 1Instituto de Computação – Universidade Estadual de Campinas (UNICAMP) Av. Albert Einstein, 1251 – 13.083-852 – Campinas – SP – Brazil {cneves,hans}@ic.unicamp.br Abstract. This article presents a tool conceived for specification and development of distributed event-based systems. The tool is composed of two graphical editors for visual programming of those systems. One editor is designed for modeling of the distributed view of an event-based system using a graphical notation for specification of event processing networks. This editor allows modularization of event-based systems and control of hierarchy and visibility of events. This graphical notation extends traditional event processing networks including support for scopes. The second editor is used for the programming of the event processing rules of the system. This editor uses a variant of Statecharts for specification of stateful event processing building blocks and allows seamlessly integration with functional components. The tool is implemented as an Eclipse plug-in and leverages the Eclipse platform Java tools and Eclipse Modeling framework. 1. Motivation Distributed event-based systems are found in many application domains such as enterprise systems, internet applications, ubiquitous computing, user interfaces and telecommunication systems. Event processing is an increasingly important area in the field of Information Technology (IT). In general, a distributed event-based system is a collection of a large number of distributed functional components that interact with each other by mean of events where some components publish events (producers) and other consume events (consumers). A component can also perform both tasks, being a producer and a consumer of events. The implicit invocation of functionality via events, as well as the autonomy, heterogeneity, and potentially large number of components make the development and maintenance of distributed event-based systems [Mühl, Fiege and Pietzuch 2006] applications very difficult. The growth on the interest for event-based systems and complex event processing motivates the research and development of such kind of applications, but the traditional software engineering tools and methods are still not adequate for support of distributed event-based systems [Etzion and Niblett 2011]. A distributed event-based system also called DEBS is hard to synthesize using regular programming languages due to its complex nature. These systems aggregate both the complexity present on development of distributed and concurrent applications and the typical complexity observed for specification of reactive systems. A strategy to minimize those complexities is the use of visual programming languages and models that capture the organization and semantic of those systems. Currently, there is no standard reference architecture and notation for development of distributed event-based systems. The main goal of this research is to deliver a tool that address the development of distributed event-based systems with an approach based on visual programming and methods that minimize the coding efforts and support the designer of such systems with automated generation of code. The tool simplifies the development process and abstracts underlying complexity for modularization and composition of functionality in distributed event-based systems. This paradigm with visual modeling increases productivity and simplifies the design and prototyping of a solution. 2. Solution Architecture and Foundation The tool presented in this article is as an Eclipse plug-in and all of its components coded in Java. Eclipse is an open source software project and this tool extends the Eclipse core framework to support editors and environment for development of distributed event- based systems. The Graphical Editing Framework (GEF) and Eclipse Modeling Framework (EMF) [Steinberg, Budisnky and Paternostro 2009] are the frameworks used to exploit the features provided by Eclipse in the development of the tool. This tool like any other software produced by Eclipse is available under the Eclipse Public License (EPL). The tool is composed of two main graphical editors that implement the following two views of a distributed event-based system: one is the distributed or inter- process view where the designer defines the overall organization and relationship among components of distributed event-based systems. Another is the internal or intra-process view where designer specifies the behavior and codes each component of the system. For the distributed view of the system, this model-driven engineering approach uses the concept of event processing network (EPN) in order to model the event flow and connections among components (producers, consumers and event processing agents). Event processing agent (EPA) is a particular building block of the event processing network responsible for processing of the event pattern rules and it can produce and consume events. The distributed view is important to split the event processing tasks and roles into components. This design step of the distributed view organizes and defines responsibilities in the distributed event-based application. The EPN introduced in this model is extended to support also scopes, a mechanism for managing the visibility of events associating groups of components. The hybrid EPN implemented by this tool allows either point-to-point communication via event channels or group communication via scopes in order to control the visibility of events. For the internal view of the system, the tool offers a graphical editor for behavioral modeling of event processing agents (EPA). Other components defined in event processing network like producers and consumers are auto-generated with Java code, and then the designer uses regular Eclipse Java development editors to customize particular content. An EPA is classified as a reactive component, since it typically performs an ongoing and often never ending computation of the event pattern rules. It is a stateful component, i.e. their actions depend not only on their event inputs but also on what has previously happened in the system. The event pattern rules of the EPA are responsible for processing events in the distributed event-based system and are modeled in this approach using a variant of Statecharts [Harel 1987], a visual language for specification of reactive systems and components. The tool (Eclipse plug-in) introduced here is called Xchart and collectively with the whole Eclipse platform and components form an IDE for development of distributed event-based systems. The tool automates generation of associated Java code for the components of the system specified in the distributed and internal views, so the developer should eventually use regular Java development tools and Eclipse editors in order to customize the application via traditional Java programming. The components of the distributed event-based system communicate via events and they rely on a publish/subscribe middleware for this communication. The middleware (a notification service) used is an implementation of Java Message Services (JMS). The Java source code auto-generated by the tool abstracts all of the publish/subscribe API methods for accessing the notification service so the developer does not deal directly with this programming when customizing the components. Runtime components for basic support of simulation and execution of distributed event-based applications are included with the tool. For simulation of the Statecharts diagrams, the tool offers a reactive engine for execution of the diagrams. The Statecharts diagrams are stored in the XML format. The JMS notificationservice is also part of the runtime required for simulation and execution of the applications and it must be installed with the Eclipse platform and Java libraries. 3. User Interface and Main Features The main features delivered in the tool are the two graphical editors for Eclipse platform that allow development of distributed event-based systems. This section provides more details of each editor along with some user interface examples. The EPN editor is one graphical editor for specification of the distributed view of event-based systems. This editor offers controls for design of event processing network including its components (producers, consumers and event processing agents) and their associations (channels and scopes). The editor has the option for automated generation of source code and XML content used for deployment and simulation of the solution. Figure 1 illustrates the look and feel of the graphical editor for specification of event processing network (EPN). The Statecharts editor is one graphical editor for specification of event pattern rules that are associated to each event processing agent component. This editor uses an extension of Statecharts notation. Each EPA component has associated one Statecharts diagram that describes its internal behavior and rules. This editor has option that allows automatic generation of XML content from the Statecharts visual diagram. This XML content is used for deployment and simulation of the application as well. There is an emerging XML format standard for Statecharts called SCXML defined by W3C [W3C 2012] that is leveraged by the tool. Figure 2 shows an example of how one EPA’s Statecharts diagram will look like. Note that the Statecharts variant implemented in this tool is extended as part of our work in order to give the adequate capabilities and make it suitable for design and code of the distributed event-based systems use cases. The most important extension proposed is the introduction of “rules” in the Statecharts formalism. Statecharts does not have the ability to define rules, only transitions. A rule behaves like a transition in terms of executable code, but it does not deactivate or activate states. The XML format generated by the tool includes the <rule> tag, which is not officially available in the SCXML notation. Figure 1. Eclipse plug-in for distributed event-based systems development Serasa Experian sponsored this research and used the tool in order to model a real event-based use case [Neves and Liesenberg 2012]. Figure 1 and 2 derived from the original specification of a real event flow at Serasa Experian and are shown here for reference. It is out of the scope of this paper to give details of this specification. 4. Related Work and Final Considerations The Rapide project [Luckham 2002] from Stanford University organizes distributed event-based systems using event processing networks (EPN), also a collection of event processing agents (EPA). Rapide uses declarative languages for definition of event pattern rules and the focus is primarily complex event detection. Our tool uses a different approach for the event pattern specification since a visual notation (Statecharts) is giving more power of expression and semantic for programming of stateful components. The concept of event processing network used in our project is broader than in Rapide project since it allows a hybrid mechanism of controlling visibility of events where scopes and event channels are available. Figure 2. Event processing rules using Statecharts Gem [Blanco,Wang and Alencar 2008] is distributed event system that implements a meta-model for distributed event-based systems (DEBS) using Statecharts for specification of reactive component interfaces. The meta-model describes structural, control and runtime aspects. One of the concerns presented by Gem is the difficulty of using classic Statecharts due to its semantics on a distributed environment. The further work list of Gem describes a need for a variant of Statecharts that is better suitable in the distributed execution environment. Our tool extends Statecharts notation to give additional resources for specification and development of distributed event-based systems like the example described in this paper related with the introduction of rules. Oracle also offers a commercial Java-based tool called Oracle Complex Event Processing (CEP) [Alves 2011]. It is a solution for building applications to filter, correlate and process events in real-time for downstream applications, service oriented architectures and event-driven architectures. Oracle CEP also has both visual development environment as well as standard Java-based tooling. Oracle CEP is highly focused on complex event processing (CEP) specification. CEP is a sub-domain of distributed event-based systems. Our tool in the other hand is designed for application in more generic distributed event-based system domains. Event pattern rules in Oracle CEP are not visual, but declarative. Our work uses a variant of Statecharts to capture the event pattern rules and behavior. The majority of the academic work related with distributed event-based systems focus on the event notification routing algorithms and on the complex event detection. The tool presented in this article aims to touch all of these areas, but it is primarily focus resides on the behavior specification of the system and the orchestration of the distributed behavior by mean of visual languages and model-driven engineering approach. The main contribution of this work is the proposition of visual notations for development of distributed event-based systems (distributed and internal views) which is an area missing a standard and the tool presented in this article is the outcome and implementation that give form on this goal. 5. How to obtain the tool This tool is called Xchart and it is available for download at Eclipse labs following the below link: Xchart, Visual Editor for behavioral modeling and distributed event-based systems, http://code.google.com/a/eclipselabs.org/p/xchart/ 6. References Alves, Alexandre (2011). “A General Extension System for Event Processing Languages”, The 5th ACM International Conference on Distributed Event-Based Systems. Blanco, Rolando and Wang, Jun and Alencar, Paulo (2008). “A Metamodel for Distributed Event Based Systems”, The 2nd ACM International Conference on Distributed Event-Based Systems. Etzion, Opher and Niblett, Peter (2011). “Event Processing in Action”, Manning Publications. Harel, David (1987). “Statecharts: A Visual Formalism for Complex Systems. Science of Computer Programming”, 8(3): 231-274. Luckham, David (2002). “The Power of Events: an introduction to complex event processing in distributed enterprise systems”, Addison Wesley Professional. Mühl, Gero and Fiege, Ludger and Pietzuch, Peter (2006). Distributed Event-Based Systems, Springer. Neves Júnior, Carlos and Liesenberg, Hans Kurt Edmund (2010). A Visual Programming Approach for Development of Event-Based Systems, 7o. CONTESCI, São Paulo, Brazil Neves Júnior, Carlos and Liesenberg, Hans Kurt Edmund (2012). An Use Case about Event-Based Systems Applied To Services-Oriented Architecture at Serasa Experian, 9o. CONTESCI, São Paulo, Brazil Steinberg, Dave and Budisnky, Frank and Paternostro, Marcelo et al (2009), EMF: Eclipse Modeling Framework (2nd Edition), The Addison-Wesley. World Wide Web Consortium - W3C (2012), SCXML, http://www.w3.org/TR/scxml/.
Compartilhar