Skip to main content

2021 | OriginalPaper | Buchkapitel

5. Patterns and Energy Consumption: Design, Implementation, Studies, and Stories

verfasst von : Daniel Feitosa, Luís Cruz, Rui Abreu, João Paulo Fernandes, Marco Couto, João Saraiva

Erschienen in: Software Sustainability

Verlag: Springer International Publishing

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

search-config
loading …

Abstract

Software patterns are well known to both researchers and practitioners. They emerge from the need to tackle problems that become ever more common in development activities. Thus, it is not surprising that patterns have also been explored as a means to address issues related to energy consumption. In this chapter, we discuss patterns at code and design level and address energy efficiency not only as the main concern of patterns but also as a side effect of patterns that were not originally intended to deal with this problem. We first elaborate on state-of-the-art energy-oriented and general-purpose patterns. Next, we present cases of how patterns appear naturally as part of decisions made in industrial projects. By looking at the two levels of abstraction, we identify recurrent issues and solutions. In addition, we illustrate how patterns take part in a network of interconnected components and address energetic concerns. The reporting and cases discussed in this chapter emphasize the importance of being aware of energy-efficient strategies to make informed decisions, especially when developing sustainable software systems.

Sie haben noch keine Lizenz? Dann Informieren Sie sich jetzt über unsere Produkte:

Springer Professional "Wirtschaft+Technik"

Online-Abonnement

Mit Springer Professional "Wirtschaft+Technik" erhalten Sie Zugriff auf:

  • über 102.000 Bücher
  • über 537 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Maschinenbau + Werkstoffe
  • Versicherung + Risiko

Jetzt Wissensvorsprung sichern!

Springer Professional "Technik"

Online-Abonnement

Mit Springer Professional "Technik" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 390 Zeitschriften

aus folgenden Fachgebieten:

  • Automobil + Motoren
  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Elektrotechnik + Elektronik
  • Energie + Nachhaltigkeit
  • Maschinenbau + Werkstoffe




 

Jetzt Wissensvorsprung sichern!

Springer Professional "Wirtschaft"

Online-Abonnement

Mit Springer Professional "Wirtschaft" erhalten Sie Zugriff auf:

  • über 67.000 Bücher
  • über 340 Zeitschriften

aus folgenden Fachgebieten:

  • Bauwesen + Immobilien
  • Business IT + Informatik
  • Finance + Banking
  • Management + Führung
  • Marketing + Vertrieb
  • Versicherung + Risiko




Jetzt Wissensvorsprung sichern!

Fußnoten
1
When the practical usage is obvious, we will exclude the illustrative example.
 
2
Lint is a code analysis tool, provided by the Android SDK, which reports upon finding issues related to the code structural quality.
 
3
As stated in the Android ArrayMap documentation: http://​bit.​ly/​32hK0y9.
 
4
AMOLED is a display technology used in mobile devices and stands for Active Matrix Organic Light Emitting Diodes.
 
5
Fibonacci series is a sequence of numbers in which each number is the sum of the two preceding numbers (i.e., 1, 1, 2, 3, 5, 8, etc.).
 
6
A real example where the camera was being initiated too early can be found here: https://​github.​com/​signalapp/​Signal-Android/​commit/​cb9f225f5962d399​f48b65d5f855e11f​146c bbcb (visited on June 15, 2020).
 
7
Energy Efficiency Guide for iOS Apps—Avoid Extraneous Graphics and Animations available here: https://​developer.​apple.​com/​library/​archive/​documentation/​Performance/​Conceptual/​EnergyGuide-iOS/​AvoidExtraneousG​raphicsAndAnimat​ions.​html (visited on June 15, 2020).
 
8
Factory Method, Adapter, Observer, Bridge, and Composite.
 
9
Abstract Factory, Bridge, Builder, Command, Composite, Decorator, Factory Method, Flyweight, Mediator Observer, Prototype, Proxy, Singleton, Strategy, and Visitor.
 
10
Number of invocations to methods that are not owned or inherited by the class being measured.
 
12
IMAP IDLE is a feature defined by the standard RFC 2177 that allows a client to indicate to the server that it is ready to accept real-time notifications.
 
Literatur
1.
Zurück zum Zitat Buschmann F, Meunier R, Rohnert H, Sommerlad P, Stal M (1996) Pattern-oriented software architecture: a system of patterns, vol 1. Wiley Buschmann F, Meunier R, Rohnert H, Sommerlad P, Stal M (1996) Pattern-oriented software architecture: a system of patterns, vol 1. Wiley
9.
Zurück zum Zitat Fu B, Lin J, Li L, Faloutsos C, Hong J, Sadeh N (2013) Why people hate your app: making sense of user feedback in a mobile app store. In: Proc. ACM SIGKDD 19th Int. Conf. Knowledge Discovery and Data Mining (KDD ’13). ACM, Chicago, IL, pp 1276–1284. https://doi.org/10.1145/2487575.2488202 Fu B, Lin J, Li L, Faloutsos C, Hong J, Sadeh N (2013) Why people hate your app: making sense of user feedback in a mobile app store. In: Proc. ACM SIGKDD 19th Int. Conf. Knowledge Discovery and Data Mining (KDD ’13). ACM, Chicago, IL, pp 1276–1284. https://​doi.​org/​10.​1145/​2487575.​2488202
11.
Zurück zum Zitat Manotas I, Bird C, Zhang R, Shepherd D, Jaspan C, Sadowski C, Pollock L, Clause J (2016) An empirical study of practitioners’ perspectives on green software engineering. In: Proc. IEEE/ACM 38th Int. Conf. Software Engineering (ICSE ’16), pp. 237–248. IEEE, Austin, TX. https://doi.org/10.1145/2884781.2884810 Manotas I, Bird C, Zhang R, Shepherd D, Jaspan C, Sadowski C, Pollock L, Clause J (2016) An empirical study of practitioners’ perspectives on green software engineering. In: Proc. IEEE/ACM 38th Int. Conf. Software Engineering (ICSE ’16), pp. 237–248. IEEE, Austin, TX. https://​doi.​org/​10.​1145/​2884781.​2884810
16.
Zurück zum Zitat Cruz L, Abreu R (2018) Using automatic refactoring to improve energy efficiency of android apps. In: Proc. XXI Ibero-American Conf. Software Engineering (CIbSE ’18). Bogota, Colombia, pp 1–14 Cruz L, Abreu R (2018) Using automatic refactoring to improve energy efficiency of android apps. In: Proc. XXI Ibero-American Conf. Software Engineering (CIbSE ’18). Bogota, Colombia, pp 1–14
18.
Zurück zum Zitat Vekris P, Jhala R, Lerner S, Agarwal Y (2012) Towards verifying Android apps for the absence of no-sleep energy bugs. In: Proc. USENIX 5th Conf. Power-Aware Computing and Systems (HotPower ’12). USENIX Association, Hollywood, CA Vekris P, Jhala R, Lerner S, Agarwal Y (2012) Towards verifying Android apps for the absence of no-sleep energy bugs. In: Proc. USENIX 5th Conf. Power-Aware Computing and Systems (HotPower ’12). USENIX Association, Hollywood, CA
19.
Zurück zum Zitat Linares-Vásquez M, Bavota G, Bernal-Cárdenas C, Oliveto R, Di Penta M, Poshyvanyk D (2014) Mining energy-greedy API usage patterns in android apps: an empirical study. In: Proc. 11th Working Conf. Mining Software Repositories (MSR ’14). ACM, Hyderabad, pp 2–11. https://doi.org/10.1145/2597073.2597085 Linares-Vásquez M, Bavota G, Bernal-Cárdenas C, Oliveto R, Di Penta M, Poshyvanyk D (2014) Mining energy-greedy API usage patterns in android apps: an empirical study. In: Proc. 11th Working Conf. Mining Software Repositories (MSR ’14). ACM, Hyderabad, pp 2–11. https://​doi.​org/​10.​1145/​2597073.​2597085
20.
23.
25.
Zurück zum Zitat Agolli T, Pollock L, Clause J (2017) Investigating decreasing energy usage in mobile apps via indistinguishable color changes. In: Proc. IEEE/ACM 4th Int. Conf. Mobile Software Engineering and Systems (MOBILESoft ’17). IEEE, Buenos Aires, pp 30–34. https://doi.org/10.1109/MOBILESoft.2017.17 Agolli T, Pollock L, Clause J (2017) Investigating decreasing energy usage in mobile apps via indistinguishable color changes. In: Proc. IEEE/ACM 4th Int. Conf. Mobile Software Engineering and Systems (MOBILESoft ’17). IEEE, Buenos Aires, pp 30–34. https://​doi.​org/​10.​1109/​MOBILESoft.​2017.​17
28.
Zurück zum Zitat Linares-Vásquez M, Bernal-Cárdenas C, Bavota G, Oliveto R, Di Penta M, Poshyvanyk D (2017) Gemma: multi-objective optimization of energy consumption of guis in android apps. In: Proc. 39th Int. Conf. Software Engineering Companion (ICSE-C ’17). IEEE, Buenos Aires, pp 11–14. https://doi.org/10.1109/ICSE-C.2017.10 Linares-Vásquez M, Bernal-Cárdenas C, Bavota G, Oliveto R, Di Penta M, Poshyvanyk D (2017) Gemma: multi-objective optimization of energy consumption of guis in android apps. In: Proc. 39th Int. Conf. Software Engineering Companion (ICSE-C ’17). IEEE, Buenos Aires, pp 11–14. https://​doi.​org/​10.​1109/​ICSE-C.​2017.​10
29.
Zurück zum Zitat Banerjee A, Roychoudhury A (2016) Automated re-factoring of android apps to enhance energy-efficiency. In: Proc. IEEE/ACM 3rd Int. Conf. Mobile Software Engineering and Systems (MOBILESoft ’16). ACM, Austin, TX, pp 139–150CrossRef Banerjee A, Roychoudhury A (2016) Automated re-factoring of android apps to enhance energy-efficiency. In: Proc. IEEE/ACM 3rd Int. Conf. Mobile Software Engineering and Systems (MOBILESoft ’16). ACM, Austin, TX, pp 139–150CrossRef
30.
Zurück zum Zitat Liu Y, Xu C, Cheung SC, Terragni V (2016) Understanding and detecting wake lock misuses for android applications. In: Proc. ACM SIGSOFT 24th Int. Symposium on Foundations of Software Engineering (FSE ’16). ACM, Seattle, WA, pp 396–409. https://doi.org/10.1145/2950290.2950297 Liu Y, Xu C, Cheung SC, Terragni V (2016) Understanding and detecting wake lock misuses for android applications. In: Proc. ACM SIGSOFT 24th Int. Symposium on Foundations of Software Engineering (FSE ’16). ACM, Seattle, WA, pp 396–409. https://​doi.​org/​10.​1145/​2950290.​2950297
31.
Zurück zum Zitat Pathak A, Jindal A, Hu YC, Midkiff SP (2012) What is keeping my phone awake?: Characterizing and detecting no-sleep energy bugs in smartphone apps. In: Proc. 10th Int. Conf. Mobile Systems, Applications, and Services (MobiSys ’12). ACM, Windermere, pp 267–280. https://doi.org/10.1145/2307636.2307661 Pathak A, Jindal A, Hu YC, Midkiff SP (2012) What is keeping my phone awake?: Characterizing and detecting no-sleep energy bugs in smartphone apps. In: Proc. 10th Int. Conf. Mobile Systems, Applications, and Services (MobiSys ’12). ACM, Windermere, pp 267–280. https://​doi.​org/​10.​1145/​2307636.​2307661
34.
36.
Zurück zum Zitat Gottschalk M, Jelschen J, Winter A (2014) Saving energy on mobile devices by refactoring. In: Proc. 28th Conf. Environmental Informatics (EnviroInfo ’14). BIS-Verlag, Oldenburg, Germany, pp 437–444 Gottschalk M, Jelschen J, Winter A (2014) Saving energy on mobile devices by refactoring. In: Proc. 28th Conf. Environmental Informatics (EnviroInfo ’14). BIS-Verlag, Oldenburg, Germany, pp 437–444
38.
Zurück zum Zitat Gamma E, Helm R, Johnson R, Vlissides JM (1994) Design patterns: elements of reusable object-oriented software, 1st edn. Addison-Wesley ProfessionalMATH Gamma E, Helm R, Johnson R, Vlissides JM (1994) Design patterns: elements of reusable object-oriented software, 1st edn. Addison-Wesley ProfessionalMATH
45.
Zurück zum Zitat Adamczyk P (2004) Selected patterns for implementing finite state machines. In: Proc. 11th Conf. Pattern Languages of Programs (PLoP ’04). Monticello, IL, pp 1–41 Adamczyk P (2004) Selected patterns for implementing finite state machines. In: Proc. 11th Conf. Pattern Languages of Programs (PLoP ’04). Monticello, IL, pp 1–41
47.
Zurück zum Zitat Fowler M, Beck K, Brant J, Opdyke W, Roberts D (1999) Refactoring: improving the design of existing code. Object technology series. Addison-Wesley Fowler M, Beck K, Brant J, Opdyke W, Roberts D (1999) Refactoring: improving the design of existing code. Object technology series. Addison-Wesley
50.
Zurück zum Zitat Litke A, Zotos K, Chatzigeorgiou A, Stephanides G (2005) Energy consumption analysis of design patterns. Proc World Acad Sci Eng Technol 6:86–90 Litke A, Zotos K, Chatzigeorgiou A, Stephanides G (2005) Energy consumption analysis of design patterns. Proc World Acad Sci Eng Technol 6:86–90
51.
52.
Zurück zum Zitat Noureddine A, Rajan A (2015) Optimising energy consumption of design patterns. In: Proc. 37th Int. Conf. Software Engineering (ICSE ’15). IEEE, pp 623–626 Noureddine A, Rajan A (2015) Optimising energy consumption of design patterns. In: Proc. 37th Int. Conf. Software Engineering (ICSE ’15). IEEE, pp 623–626
Metadaten
Titel
Patterns and Energy Consumption: Design, Implementation, Studies, and Stories
verfasst von
Daniel Feitosa
Luís Cruz
Rui Abreu
João Paulo Fernandes
Marco Couto
João Saraiva
Copyright-Jahr
2021
DOI
https://doi.org/10.1007/978-3-030-69970-3_5

Premium Partner