Reactive-based Complex Event Processing: An Overview and Energy Consumption Analysis of CEP.js

  • Carlos Zimmerle UFPE
  • Wellington Oliveira UFPE
  • Kiev Gama UFPE
  • Fernando Castor

Resumo




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.




 
Palavras-chave: Reactive Programming, Complex Event Processing, Energy Consumption, Mobile Devices

Referências

Jagrati Agrawal, Yanlei Diao, Daniel Gyllstrom, and Neil Immerman. 2008. Efficient pattern matching over event streams. In Proceedings of the 2008 ACM SIGMOD international conference on Management of data. ACM, 147--160.

John Asafu-Adjaye. 2000. The relationship between energy consumption, energy prices and economic growth: time series evidence from Asian developing countries. Energy economics 22, 6 (2000), 615--625.

Engineer Bainomugisha, Andoni Lombide Carreton, Tom van Cutsem, Stijn Mostinckx, and Wolfgang de Meuter. 2013. A survey on reactive programming. ACM Computing Surveys (CSUR) 45, 4 (2013), 52.

Kimberley Burchett, Gregory H Cooper, and Shriram Krishnamurthi. 2007. Lowering: A static optimization technique for transparent functional reactivity. In Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation. ACM, 71--80.

Rajkumar Buyya and Amir Vahid Dastjerdi. 2016. Internet of Things: Principles and paradigms. Elsevier.

Matteo Ciman and Ombretta Gaggi. 2017. An empirical analysis of energy consumption of cross-platform frameworks for mobile development. Pervasive and Mobile Computing 39 (2017), 214--230.

Michael Cohen, Haitao Steve Zhu, Emgin Ezgi Senem, and Yu David Liu. 2012. Energy types. In ACM SIGPLAN Notices, Vol. 47. ACM, 831--850.

Gianpaolo Cugola and Alessandro Margara. 2012. Processing flows of information: From data stream to complex event processing. ACM Computing Surveys (CSUR) 44, 3 (2012), 15.

Paul P Daniels and Luis Atencio. 2017. RxJS in Action. Manning Publications Co.

Marcos Dias de Assuncao, Alexandre da Silva Veith, and Rajkumar Buyya. 2018. Distributed data stream processing and edge computing: A survey on resource elasticity and future directions. Journal of Network and Computer Applications 103 (2018), 1--17.

Dario Di Nucci, Fabio Palomba, Antonio Prota, Annibale Panichella, Andy Zaidman, and Andrea De Lucia. 2017. Software-based energy profiling of android apps: Simple, efficient and reliable?. In 2017 IEEE 24th international conference on software analysis, evolution and reengineering (SANER). IEEE, 103--114.

Opher Etzion, Peter Niblett, and David C Luckham. 2011. Event processing in action. Manning Greenwich.

Erich Gamma. 1995. Design patterns: elements of reusable object-oriented software. Pearson Education India.

Alfonso Garcia-de Prado, Guadalupe Ortiz, and Juan Boubeta-Puig. 2017. COLLECT: COLLaborativE ConText-aware service oriented architecture for intelligent decision-making in the Internet of Things. Expert Systems with Applications 85 (2017), 231--248.

Pablo Graubner, Christoph Thelen, Michael Körber, Artur Sterz, Guido Salvaneschi, Mira Mezini, Bernhard Seeger, and Bernd Freisleben. 2018. Multimodal Complex Event Processing on Mobile Devices. In Proceedings of the 12th ACM International Conference on Distributed and Event-based Systems. ACM, 112--123.

Samir Hasan, Zachary King, Munawar Hafiz, Mohammed Sayagh, Bram Adams, and Abram Hindle. 2016. Energy profiles of java collections classes. In Proceedings of the 38th International Conference on Software Engineering. ACM, 225--236.

Abram Hindle. 2012. Green mining: A methodology of relating software change to power consumption. In Proceedings of the 9th IEEE Working Conference on Mining Software Repositories. IEEE Press, 78--87.

Paul Hudak. 1999. Functional reactive programming. In European Symposium on Programming. Springer, 1--1.

Natalia Juristo and Ana M Moreno. 2013. Basics of software engineering experimentation. Springer Science & Business Media.

Holger M Kienle. 2010. It's about time to take JavaScript (more) seriously. IEEE software 27, 3 (2010), 60--62.

Kai Lei, Yining Ma, and Zhi Tan. 2014. Performance comparison and evaluation of web development technologies in php, python, and node. js. In 2014 IEEE 17th international conference on computational science and engineering. IEEE, 661--668.

Ding Li and William GJ Halfond. 2014. An investigation into energy-saving programming practices for android smartphone app development. In Proceedings of the 3rd International Workshop on Green and Sustainable Software. ACM, 46--53.

Ding Li, Shuai Hao, Jiaping Gui, and William GJ Halfond. 2014. An empirical study of the energy consumption of android applications. In 2014 IEEE International Conference on Software Maintenance and Evolution. IEEE, 121--130.

Luís Gabriel Lima, Francisco Soares-Neto, Paulo Lieuthier, Fernando Castor, Gilberto Melfe, and João Paulo Fernandes. 2016. Haskell in green land: Analyzing the energy behavior of a purely functional language. In 2016 IEEE 23rd international conference on Software Analysis, Evolution, and Reengineering (SANER), Vol. 1. IEEE, 517--528.

Mario Linares-Vásquez, Gabriele Bavota, Carlos Bernal-Cárdenas, Rocco Oliveto, Massimiliano Di Penta, and Denys Poshyvanyk. 2014. Mining energy-greedy api usage patterns in android apps: an empirical study. In Proceedings of the 11th Working Conference on Mining Software Repositories. ACM, 2--11.

Mario Linares-Vásquez, Gabriele Bavota, Carlos Bernal-Cárdenas, Massimiliano Di Penta, Rocco Oliveto, and Denys Poshyvanyk. 2018. Multi-Objective Optimization of Energy Consumption of GUIs in Android Apps. ACM Transactions on Software Engineering and Methodology (TOSEM) 27, 3 (2018), 14.

David Luckham. 2002. The power of events. Vol. 204. Addison-Wesley Reading.

David C Luckham. 2011. Event processing for business: organizing the real-time enterprise. John Wiley & Sons.

Irene Manotas, Lori Pollock, and James Clause. 2014. SEEDS: a software engineer's energy-optimization decision support framework. In Proceedings of the 36th International Conference on Software Engineering. ACM, 503--514.

Alessandro Margara and Guido Salvaneschi. 2013. Ways to react: Comparing reactive languages and complex event processing. REM (2013), 14.

Marcelo RN Mendes, Pedro Bizarro, and Paulo Marques. 2009. A performance study of event processing systems. In Technology Conference on Performance Evaluation and Benchmarking. Springer, 221--236.

Nathalie Moreno, Manuel F Bertoa, Gala Barquero, Loli Burgueño, Javier Troya, Adrián García-López, and Antonio Vallecillo. 2018. Managing uncertain complex events in web of things applications. In International Conference on Web Engineering. Springer, 349--357.

Wellington Oliveira, Renato Oliveira, and Fernando Castor. 2017. A study on the energy consumption of Android app development approaches. In 2017 IEEE/ACM 14th International Conference on Mining Software Repositories(MSR). IEEE, 42--52.

Gustavo Pinto, Fernando Castor, and Yu David Liu. 2014. Understanding energy behaviors of thread management constructs. In ACM SIGPLAN Notices, Vol. 49. ACM, 345--360.

Aleksandar Prokopec, Philipp Haller, and Martin Odersky. 2014. Containers and aggregates, mutators and isolates for reactive programming. In Proceedings of the Fifth Annual Scala Workshop. ACM, 51--61.

Guido Salvaneschi, Gerold Hintz, and Mira Mezini. 2014. REScala: Bridging between object-oriented and functional style in reactive applications. In Proceedings of the 13th international conference on Modularity. ACM, 25--36.

Guido Salvaneschi, Alessandro Margara, and Giordano Tamburrelli. 2015. Reactive programming: A walkthrough. In 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, Vol. 2. IEEE, 953--954.

Dawei Sun, Guangyan Zhang, Songlin Yang, Weimin Zheng, Samee U Khan, and Keqin Li. 2015. Re-Stream: Real-time and energy-efficient resource scheduling in big data stream computing environments. Information Sciences 319 (2015), 92--112.

Vivek Tiwari, Sharad Malik, and Andrew Wolfe. 1994. Power analysis of embedded software: a first step towards software power minimization. In Proceedings of the 1994 IEEE/ACM international conference on Computer-aided design. IEEE Computer Society Press, 384--390.

Eugene Wu, Yanlei Diao, and Shariq Rizvi. 2006. High-performance complex event processing over streams. In Proceedings of the 2006 ACM SIGMOD international conference on Management of data. ACM, 407--418.

Haopeng Zhang, Yanlei Diao, and Neil Immerman. 2014. On complexity and optimization of expensive queries in complex event processing. In Proceedings of the 2014 ACM SIGMOD international conference on Management of data. ACM, 217--228.
Publicado
23/09/2019
ZIMMERLE, Carlos; OLIVEIRA, Wellington; GAMA, Kiev; CASTOR, Fernando. Reactive-based Complex Event Processing: An Overview and Energy Consumption Analysis of CEP.js. In: SIMPÓSIO BRASILEIRO DE ENGENHARIA DE SOFTWARE (SBES), 33. , 2019, Salvador. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2019 .