Reactive-based Complex Event Processing: An Overview and Energy Consumption Analysis of CEP.js - Zimmerle, Carlos; Oliveira, Wellington; Gama, Kiev; Castor, Fernando (Anais do Simpósio Brasileiro de Engenharia de Software (SBES); 2019: Anais do XXXIII Simpósio Brasileiro de Engenharia de Software, 2019)
Complex event processing (CEP) and Reactive Languages (RLs) are examples of solutions for the so-called reactive applications. Such applications are designed to detect and react to changes or event occurrences as they happen in a timely fashion. Both CEP and RLs have been developed by different communities, yet some researchers agree that they share certain aspects and could perhaps be integrated. With that in mind, we developed a JavaScript library called CEP.js that leverages the well-known Reactive Extensions for JavaScript (RxJS) to offer not only general-purpose stream operations but also CEP ones. The fact of being a JavaScript library allows CEP.js to be used in Web applications and easily embedded into mobile applications. Therefore, it opens many possibilities for CEP in mobile client applications. It also raises the concern of energy efficiency since CEP applications commonly have to deal with a significant number of events, and its continuous operations on data flows may incur significant processing. Even though CEP.js has been designed after RxJS, it was conceived in a loosely coupled way that the underlying reactive library should be easily replaced if needed. In addition to presenting the CEP.js library, in this paper, we investigate if there is any significant change in performance by running an experiment where the replacement of the reactive library used in CEP.js is the main factor analyzed. The experiment was executed in different Android devices, focusing specifically on energy consumption, an essential non-functional requirement in the smartphone realm.