Software Architecture for Mobile Cloud Computing Systems

Mobile cloud computing (MCC) has recently emerged as a state-of-the-art technology for mobile systems. MCC enables portable and context-aware computation via mobile devices by exploiting virtually unlimited hardware and software resources offered by cloud computing servers. Software architecture helps to abstract the complexities of system design, development, and evolution phases to implement MCC systems effectively and efficiently. This paper aims to identify, taxonomically classify, and systematically map the state of the art on architecting MCC-based software. We have used an evidence-based software engineering (EBSE) approach to conduct a systematic mapping study (SMS) based on 121 qualitatively selected research studies published from 2006 to 2019. The results of the SMS highlight that architectural solutions for MCC systems are mainly focused on supporting (i) software as a service for mobile computing, (ii) off-loading mobile device data to cloud-servers, (iii) internet of things, edge, and fog computing along with various aspects like (iv) security and privacy of mobile device data. The emerging research focuses on the existing and futuristic challenges that relate to MCC-based internet of things (IoTs), mobile-cloud edge systems, along with green and energy-efficient computing. The results of the SMS facilitate knowledge transfer that could benefit researchers and practitioners to understand the role of software architecture to develop the next generation of mobile-cloud systems to support internet-driven computing.


Introduction
Mobile cloud computing (MCC) represents state-of-the-art mobile computing technology that aims to minimize the resource poverty of mobile devices by exploiting the resource sufficient and pay-per-use cloud-based hardware and software resources [1,2]. To compensate the resource poverty of mobile devices, cloud computing servers exploit the 'pay-per-use' hardware and software services to provide virtually unlimited processing and storage resources [3][4][5]. The unification of the mobile and cloud computing can benefit from the mobility and context awareness of front-end mobile devices and the computation and storage services of back-end cloud servers to enable systems that are portable, yet resource sufficient [1,2]. In recent years, the industrial development and academic research have proposed a variety of MCC-based solutions that address issues such as real-time analytics of the mobile-sensed data, provisioning of context-aware medical services, mobile apps as a service, and mobile edge computing [4,6,7]. The research and development activities for MCC systems are currently focused on utilizing software engineering methodologies to minimize the complexities and enhance the efficiency to model, develop, operate, and evolve MCC systems effectively and efficiently [1,3].
Software architecture represents a blueprint of the system under consideration by abstracting out complex implementation specific details with high-level representation of the software systems [8]. Specifically, architecture of a software-intensive system represents the low-level modules of source code and their interactions as high-level architectural components and connectors [9]. This means that architecture-centric development of software-intensive systems involves architectural components (i.e., computational entities and data stores) that interact with each other using the connectors [10]. The research on MCC systems highlights that researchers from different communities such as mobile computing, software engineering, cloud computing, and artificial intelligence have successfully utilized architectural models for the research and development of the MCC software [11,12]. Architecture-centric solutions for the MCC systems have proven to be successful in integrating the context-aware mobile computing (as front-end) layer with resource-sufficient cloud computing (as back-end) layer [3,13]. Architecture-centric engineering of the MCC systems aims to model (i) software (i.e., algorithms and libraries) and (ii) hardware (i.e., processors and data storage) services offered by the cloud that are manipulated by mobiles acting as portable and context-aware user interfaces.
Scope and Contributions: In recent years, there has been a steady growth of research on software architecture-related issues and solutions for mobile cloud software [4,6,12,13]. However, there has been no effort to systematically investigate the state of existing research on architecting MCC systems. Therefore, we used an evidence-based software engineering (EBSE) approach, and the guidelines from [14,15] to conduct a systematic mapping study (SMS) that analyzes and synthesizes the research by investigating 121 published studies from 2006 to 2019 that utilize architecture-based solutions to engineer MCC Systems. The objective of this SMS is to 'systematically identify and taxonomically classify software architectural solutions for MCC systems; and provide a holistic mapping of these solutions to highlight their strengths, limitations alongside emerging and futuristic trends of research'. This SMS can disseminate a systemized knowledge about software architecture-related issues for MCC systems with the following contributions: • We taxonomically classify the collective impact of existing research to highlight (i) predominant research themes and challenges and (ii) architectural solutions and patterns for architecting MCC systems. • We holistically map the progression and maturation of research that has emerged overtime to highlight existing, emerging, and futuristic trends of research.

Summary of Results:
The results of the SMS suggest that the research on architecting MCC software systems has progressed and matured over more than a decade. The earliest research efforts from the mid-2000s focused on the provisioning of software as a service (SaaS) for mobile computing. The majority of the architectural solutions focus on alleviating the resource poverty and energy efficiency of the mobile devices by offloading their computations and memory intensive tasks to the cloud-based servers. The SMS has also identified and presented some architectural patterns such as reusable design rationale and best practices to design and develop MCC software effectively. The results of the SMS highlight that in the most recent years, there has been a steady growth of research on architecture-centric engineering of the MCC software. Existing and futuristic research aims to address the challenges of mobile-cloud based internet of things (IoTs), mobile-cloud edge systems, energy efficient computing, and context-aware healthcare systems. The results of the SMS can be beneficial for: • Researchers who aim to understand the state of the art to derive new hypotheses to be tested, analyze innovative solutions, and identify areas of future research.
• Practitioners who want to understand the reported solutions in terms of architectural solution, reusable architectural patterns, and the extent to which the academic research and development can be exploited to tackle the industrial challenges pertaining to the MCC systems.
Section 2 presents background details and related research. Section 3 presents the research methodology. Section 4 presents the classification and mapping of the research themes. Section 5 provides a catalogue of the challenges and their architectural solutions. Section 6 presents some architectural patterns for MCC systems. Section 7 discusses the historical progression along with emerging and futuristic dimensions of research. Section 8 concludes the paper.

Background and Related Research
In this section, we first discuss the background details about mobile cloud systems and software architecture. We then present some relevant studies that help us to justify the scope and contributions of the proposed SMS. The concepts and terminologies used in this section are used throughout the paper.

Software Architecture for Mobile Cloud Computing Systems
Mobile computing has fast emerged as a disruptive technology that has started to replace the old computing paradigms by providing portable computation and context-aware computation on the go. According to the statistics of the Global System for Mobile Communications, currently there are approximately 7 billion mobile device connections across the globe. Interestingly, the number rose from 0 to 7 billion in just three decades, which means that the mobile device connections are growing about 5 times faster than the human population [16]. As illustrated in Figure 1a, mobile computing is enabled with a combination of a mobile device (hardware), mobile apps (software), and a remote server (network connectivity) to offer portable, context-sensitive, and connected computation on the go [17]. Specifically, a mobile device acts as a backbone of mobile computing and it represents any (hand-held) equipment or machine that allows its user to perform computation, information sharing, and other relevant activities in a portable fashion, as in Figure 1a. Despite these benefits, there are some critical challenges such as resource scarcity including the processing, storage, energy deficiency, and issues like data security and privacy that needs to be addressed [1,2,18].
Cloud Computing, as per the definition of NIST, is defined as a combination of the software, platform, and infrastructure services that enable the entities or organizations to leverage the distributed and interoperable services to develop and deploy their software systems over available and virtually unlimited resources-public or private servers [3]. This means that cloud computing can offer the entities or organizations to off-load or deploy their (on premise) software systems, computation, or storage intensive tasks to servers by means of cloud-based services as in Figure 1a.
In particular, the software as a service (SaaS) model is based on provisioning of the pay-per-use software resources to its users. Therefore, in the context of (resource-constrained) mobile-computing, resource-sufficient cloud computing can be viewed as an opportunistic model that allows mobile devices to offload data and computation over cloud-servers as illustrated in Figure 1a. Such offloading increases performance, decreases energy consumption, and alleviates resource poverty of mobile devices [3,11]. In recent years, MCC has emerged as a state-of-the-art mobile computing technology to develop innovative systems by unifying the portable (front-end) mobile devices with resource-sufficient (back-end) cloud servers [6].
Software Architecture, as per the ISO/IEC/IEEE 42010 standard, represents a blueprint or high-level view of a software by means of architectural components (as computational entities) and their connectors (relationships between components) [8]. Software architecture proved successful in abstracting the complexities of source code modules by representing them as architectural components, whereas the interaction or calls between the modules are represented as the component connectors. This means that architectural components, as illustrated in Figure 1b, act as the core computational elements to provide abstraction for complex and implementation-specific details (source code). The architecture for mobile-cloud software system can be viewed as a layered architecture model [11,13]. In such a model, a collection of architectural components supports context-sensitivity and other related functionality by manipulating mobile sensors that are part of the mobile computing layer. In contrast, the components that provide the cloud-based computation and storage facilities are part of the cloud computing layer. The intra-layer and inter-layer communications among the components are enabled by means of architectural connectors. For example, Figure 1b represents a simplified (component and connector-based) architectural view of a system that invokes the location-based services from cloud servers. The getLocationService on mobile device requests for location-based service are provided by calculateLocationCoord component on the cloud server and both components are interconnected using locSrv connector.
We conclude that by exploiting the architectural models, complexities of the MCC software systems can be abstracted by means of architectural components and connectors. Moreover, the architecture-centric view of the system enables the analysis, design, development, and evolution of the system effectively and efficiently with the facility of automated code generation (i.e., model-driven development) [19]. In this SMS, we aim to highlight the role that software architecture plays in the development and operations of the MCC systems.

Related Research
Before conducting the mapping study, we must also highlight some existing relevant secondary studies on MCC systems. Reviewing the research state of the art on most relevant survey-based studies helps us to define the scope and justify the contributions of the proposed mapping study. We summarize the survey-based studies on MCC systems as below.

State of the Art and Open Challenges for MCC Systems
In a survey-based study [20], the authors review the state of the art for MCC technology and its applicability in various domains such as mobile learning, commerce, health, and social media [20]. The authors have also identified the gaps in the existing research that relate to efficient task distribution and data offloading along with security and privacy aspects of the MCC systems [18]. In a similar study, the authors present an overview and a taxonomy of the building blocks for the MCC systems [21]. The study also compares the similarities and distinctions between the cloud computing and mobile cloud computing technologies. Various MCC solutions and technologies are discussed with a conclusion based on open issues and futuristic areas of research. In an interesting study in [22], the authors highlight the different definitions of the MCC and motivations for the adoption of the MCC solutions. Based on the identified motivations, the authors also present a taxonomy of the research challenges that relate to issues of operational level, end user level, service, and application level, along with security and context-awareness of the MCC systems.

Mobile Data Offloading to Cloud-based Servers
In [23], the authors investigate mobile storage augmentation (MSA) based on the storage services provided by the cloud-based servers. The paper investigates main issues of MSA in three domains that include mobile computing, cloud computing, and mobile cloud computing. The study investigates the existing MSA approaches and mechanisms in MCC, classifies the cloud-based storage resources, and highlights some open issues for MSA in the context of MCC systems. In a similar study, the authors have conducted and shared the preliminary results of a systematic review on solutions that offload computationally intensive tasks from mobile devices to cloud-based servers [3].

Literature Review on Security for MCC Systems
It is also vital to mention the literature review in [24] that aims to investigate the state of research on security-related issues for MCC systems. Specifically, the review first highlights the existing research and solutions that are proposed to secure mobile cloud computing. Based on the existing research, the review aims to identify the potential problems or research gaps and provide a taxonomy of the state-of-the-art that can guide the future results.
Based on the discussion above, we conclude that in recent years, a number of secondary studies have been published that aim to address various issues of MCC systems and identify the potential topics for futuristic research. We could not find any relevant secondary study that specifically addresses architecture-centric challenges and solutions for the MCC systems. Investigating the role of software architecture in MCC systems can help us to exploit the research and development on software architecture models and to apply them for the development, operations, and evolution of the MCC systems. Moreover, the architectural view of the MCC systems can also help us to identify and present architectural patterns as best practices and reusable design knowledge to architect the MCC systems. Therefore, a lack of research on an architecture-centric solution for MCC systems motivates the needs for the proposed mapping study.

Research Methodology and Questions
To conduct the SMS, we followed the guidelines for evidence-based software engineering that has helped us to identify, collect, and synthesize the data along with reporting the results in an objective manner [14,15], as illustrated in Figure 2. Specifically, by following the process for conducting the mapping studies or systematic reviews, we have followed a structured process to minimize the errors and bias and tried to minimize the threats to validity of the research during different phases of the mapping study.

Specifying the Research Questions
To objectively investigate the studies and report the results, we have outlined a number of research questions (RQs), as detailed below. Based on these RQs, we aim to present the identified research themes, architectural challenges, and solutions along with active and emerging trends of research. •

RQ-1: What is the frequency and types of publications over the years in the area of software architecture for MCC systems?
Objective(s): To analyze the progression of research in terms of publication frequencies over the years. Moreover, we also present the types of publications (e.g., conference proceedings, journal article) to assess the types of research contributions. We conclude that the specified RQs provide foundations to objectively investigate the qualitatively selected studies and document the results. The list of selected studies for the SMS are presented in Appendix A. Further details about data collection and qualitative analysis of the study are presented in Appendix B. The results of this mapping study as answers to the outlined RQs are presented from Section 4 to Section 7.

Frequency, Classification, and Mapping of the Existing Research
In this section, we present the results for the SMS by answering RQ-1, RQ-2, and RQ-3. First, we answer RQ-1, which highlights the frequency and types of research publications (Section 4.1). We then present the classification of the identified research themes (Section 4.2). Finally, we provide the mapping of the research themes and their corresponding evidence (Section 4.3).

Frequency and Types of Publications
We discuss the frequency of the research publications during the years (2006 to 2019), illustrated with a bar graph in Figure 3 to answer RQ-1. In Figure 3a, the vertical axis represents the total number of published studies, whereas the horizontal axis represents relative years of publication. For example, in Figure  Step I, Section 2) or (ii) the studies published during those years did not pass the qualitative evaluation for inclusion in our mapping study (in Step II, Section 2) [25]. As per the guidelines of mapping studies and systematic reviews [14,15], analyzing the frequency and types of publications provide insights into the quantity and strengths of published research over the years. For example, Figure 3a highlights growth of research in terms of publication frequency, whereas Figure 3b reflects the diversity of published research.
The graph in Figure 3a suggests that during the years 2006 to 2011, the research on the role of software architecture in MCC systems started to emerge with research focus on exploiting software services (more commonly software as a service (SaaS)) or specifically service-driven architectures for mobile computing [S1, S24, S12]. Please note that the notation [SN] (N is a number) represents a reference to primary studies included in the review in Appendix A. The notation also maintains a distinction between the bibliography and selected literature for mapping study. In the initial six years, we found only a total of nine relevant studies. In those early years, the research proposed solutions that enabled cloud-based servers-offering virtually unlimited computation and storage resources-for (resource-constrained) portable and context-aware mobile devices [S20, S32].
The last eight years (2012 to 2019) reflect a significant and continuous increase in the number of research publications (having 112/121, approximately 92.5% of reviewed studies) with the highest number of published studies in the years 2015 and 2017. The publication growth suggests that in the most recent years, since 2012, the research on the role of software architecture to model, develop, and evolve mobile-cloud systems has been gaining momentum. In these years, architectural solutions have mainly focused on addressing the challenges of offloading the data or code from a mobile device to the cloud server for the energy efficiency of mobile device [S4, S10, S51, S65, S94], real time analytics and computation [S6, S46, S47, S98], mobile healthcare services [S7, S25, S100], and mobile sensed data collection [S7, S54, S64] and analysis [S42] on cloud-based servers. A typical example can be the study [S46] that exploits a mobile device as a (front-end) scanner to capture facial images and these images are stored, processed, and recognized in real-time at (back-end) cloud-based server. We further discuss the research challenges and their architectural solution later based on the classification of the research themes. Most recently, solutions are being developed that demonstrate the role of software architecture in architecting mobile cloud-based IoTs [S81, S84, S114], mobile edge computing [S92, S119], and fog computing [S105, S117].
. Figure 3. An overview of the frequency and type of publications. Figure 3 also maintains a distinction between the types of publications that are categorized as Book Chapters, Journal Articles, Conference Proceedings, and Symposium and Workshop Papers. We have also provided the reference for the related studies corresponding to each type of publication. For example, the publication type distribution titled as 'Book Chapter' represents three studies [S56, S59, S60] highlighting only approximately 2.5% of the total publication types as chapters of the book. The majority of research is published as conference and workshop proceedings, representing 68 studies (56%) and 50 studies (41.5%), respectively. During the initial years of research (2006 to 2010), most of the studies were published as workshops and symposium papers, which represents a total of nine studies (7.5%). In the last five years, the majority of the publications are in terms of journal articles and conference proceedings.

Taxonomical Classification of Existing Research Themes
We now answer RQ-2, which aims to investigate the existing research themes, their classification, and mapping to understand the overall progress and contributions of the research. To answer RQ-2, we provide a taxonomical classification of the research state of the art on software architectural solutions for MCC systems as illustrated in Figure 4. Figure 4 represents a taxonomy of the existing research. The taxonomy is defined as: 'a systematic identification, naming, classification and presentation of various research themes and their subthemes (that exist in the literature) based on their similarity or distinctions of research contributions. ' We have derived the taxonomy in Figure 4 and classified the research based on the contribution of each study and by following the guidelines of the thematic analysis process [26]. For a fine-grained analysis of the existing research, we provide two-level classification, namely generic and research thematic classification, as detailed below. For example, in the context of Figure 4, the study [S4], in general, supports the (i) offloading of mobile data to the cloud (i.e., generic classification), however (ii) the study specifically focuses on optimizing the energy efficiency of a mobile device by offloading computationally intensive data to a cloud-based server (i.e., thematic classification). • Generic Classification provides a high-level categorization of the existing research based on the collective contributions of a number of studies. Specifically, the generic classification highlights four main types of research contributions that highlight the role of software architecture to support (1) (14 studies, 11.5%). • Thematic Classification provides an extension to the generic classification above by adding details about the focus of the research in a collection of related studies. Specifically, we have used the thematic analysis approach to identify the recurring themes (repeated architectural solutions) as the basis for thematic classification of the existing research [26]. For example, the thematic analysis suggests that a collection of studies such as [S7, S10, S30, S33] represent a repeated solution for offloading data to achieve storage efficiency and performing data analytics by exploiting the cloud computing servers. Thematic classification presents a fine-grained refinement of the generic classification. For example, the research on Software as a Service for Mobile Computing has two specific themes: It is vital to mention that in the taxonomical classification as illustrated in Figure 4, we have classified each study exclusively under one research theme or sub-theme only. There may be a possibility to classify the studies under more than one theme if their research contributions relate to multiple themes. For example, the study [S51]-classified under the theme of Mobile to Cloud Data Offloading-proposes a solution to offload computation to cloud-based servers to optimize the energy efficiency of a mobile device. This means that this study could possibly be classified under two subthemes, namely Computational Efficiency and Energy Efficiency. For example, in the abovementioned case, the study [S51] was classified under the sub-theme Energy Efficiency as the primary contribution of the research study is on optimizing the energy or battery resources of a mobile device by means of computational offloading (i.e., secondary contribution). In all such scenarios, when a study was the candidate for classification under multiple themes/sub-themes, we prioritized the primary contributions of such a study for its classification. In conclusion, to derive the classification scheme in Figure 4, each study has been classified based on its primary contribution, while any secondary contributions are ignored to avoid any overlaps of the research themes. The classification in Figure 4 guides the presentation of the results throughout the paper.

Taxonomical Classification of Existing Research Themes
The taxonomical classification of research (cf. Figure 4) organizes the research themes into various categories. These categories are based on the similarity or distinction of research contributions. However, in order to synthesize and interpret the results, there is a need to extend the classification scheme with a mapping of identified research themes, their sub-themes, and corresponding evidence (relevant studies) that is illustrated in Figure 5. Figure 5 provides a three-dimensional mapping of research that helps us to highlight and discuss: • Research thematic facet: It is based on generic classification of Figure 4 on the x-axis (left) that is referred to as a thematic facet of mapping in Figure 5. • Contribution facet: It is based on thematic classification of Figure 4 highlighting the specific contributions of research on y-axis as the contribution facet of mapping. • Temporal distribution facet: It represents the temporal distribution of evidence on the x-axis (right) that is referred to as a temporal distribution facet of mapping.
In Figure 5, the dark rectangles on horizontal axis (both at right and left) have two main purposes. First, the left side rectangles reflect the relevant studies as the identified evidence corresponding to individual themes and their subthemes. Second, the right side presents the yearly (temporal) distribution or publication frequency of the evidence. In Figure 5, the size of the rectangle on the horizontal axis is proportional to the quantity of the available evidence.
For example, the biggest rectangle in Figure 5 reflects that computational efficiency (a sub-theme) is the most researched area with 40 studies that supports architectural solutions for offloading mobile data to cloud computing (generic theme). The bigger rectangles on horizontal-axis (right) represents the years 2015 to 2017 as most productive in terms of the total number of research publications (17, 16, and 17, respectively). The interpretation of the research mapping in Figure 5 is based on locating a given research theme (x-axis) that allows the identification and mapping of its sub-themes (y-axis) along with identification of each relevant study in the circle. For example, the representation of [S4] highlights that 'the study [S4] focuses on the monitoring and estimating energy consumption and performance of a mobile device to support its energy optimization (by offloading mobile data to the cloud)'. The mapping in Figure 5 has multiple interpretations based on the intent of the analysis. For example, the mapping in Figure 5 helps us to answer some important questions like:  What research themes got the most and least attention in the last five years? By analyzing the research mapping in Figure 5 and combining the publications years and research (sub-) themes in the last three years (2017-2019), most of the studies focused on (a) computational efficiency of a mobile device with studies including but not limited to [S8, S21, S78, S90, S98] and (b) storage efficiency and data analytics [S33, S83, S97] by offloading its data to cloud servers. There is less research on SaaS for mobile computing and security and privacy of mobile data.  What years are reflected as the most progressive based on the number of research publications and what was the focus of research during those years? By analyzing the temporal distribution facet or publication frequency (x-axis, left), we can identify 2013 to 2018 as the most progressive years in terms of total publications (93 published studies). During these years, the studies focused on all identified themes and their sub-themes. The most focused area of research during these years was offloading mobile device data to cloud-based servers. Most recently, mobile cloud computing has been exploited for internet of things-based systems.
We conclude that the taxonomical classification (in Figure 4) and holistic mapping (in Figure 5) helps us to answer RQ2, which investigates the contributions and progression of the research. Both the classification and mapping guide the results of the mapping study and also help us to present the existing and emerging trends of research later in the paper. Figure 4, a total of 10 studies focused on miscellaneous architectural issues for MCC systems that cannot be classified under any other themes. The results from these studies address a wide variety of issues that include but are not limited to designing [S20], architecting [S63], developing [S68], and operating scalable MCC systems [S9]. These studies represent the foundation level research on MCC systems without an explicit relation to the applied architectural solutions. It is vital to mention some interesting studies that exploit the mobile cloud technologies to support social devices [S22] that aim to create a social network on the nearby mobile devices. Another interesting study focused on exploiting the MCC infrastructure to provide a context-aware adaptive middleware for mobile devices [S68]. We considered these studies as random solutions (once-off research ideas) that lack the follow-up research efforts. The classification and detailed discussion of solutions later in the paper avoids miscellaneous solutions to exclude once-off solutions to avoid any bias in the results of the SMS.

Challenges and Architectural Solutions for MCC Systems
We now answer RQ-3, which presents the prominent challenges and their architectural solutions for MCC software systems. To answer RQ-3, we provide Table 1, which represents a catalogue of architectural solutions to highlight the problem solution view for MCC software systems. Table 1 summarizes the following information: (i) Prominent research challenges or the Problem View representing various types of challenges for MCC systems, (ii) methods and techniques such as Solution View, (iii) Relevant Studies that complement the problem-solution view, and (iv) Solution Illustration. As per the research methodology (cf. Figure 2), during the data collection and synthesis process, we have recorded the information about the problem and architectural solutions for MCC in the data extraction form. To support fine-grained analysis of the research challenges and their architectural solutions, first we identified the primary challenges (Step I) and then their sub-challenges (Step II) as in Table 1, based on the research themes and their sub-themes from Figure 5. For example, the primary challenges of provisioning of the software as a service for mobile computing (SaaS for mobile) has two distinct sub-challenges namely (i) Supporting Enterprise Software Services for Mobile Computing and (ii) Provisioning of Recommendation as a Services for Mobile Computing (RaaS for Mobile). It is vital to mention that the thematic classification (cf. Figure 4) categorizes similar or distinct problems, while sub-themes represent specific type of problems. For example, in enabling the computational efficiency of a mobile device from studies [S4, S6], Table 1 highlights: • Problem View: How to achieve computational efficiency while maintaining the portability and performance of a resource-constrained mobile device. • Solution View: The proposed architectural solutions to address this problem are adaptive and cloudlets-based off-loading of computationally intensive data from a mobile device to cloud-based server. Software architecture provides a layered approach for the proposed solution (see Figure 1). The resource-constrained mobile device (as the front-end layer) represents a portable and context-aware user interface. On the other hand, the cloud-based server (as the back-end layer) provides computation and storage software as a service (SaaS) for mobile devices. The architecture includes the necessary logic to support the offloading decisions, i.e., what, when, and how to offload from a mobile device to the cloud-based server. • Related Studies support solutions for adaptive and cloudlet-based offloading includes [S4], [S6], [S11], [S14], [S17], [S25], and [S29]. • Reference Architecture represents a high-level and generic view of the solution to address the challenges that relate to a particular research theme. A reference architecture provides an architecture-centric point of reference with an overview of the architectural components and connectors. The reference architecture provides a blueprint for architecture-centric development of the software systems. Table 1 overviews generic problems with universally applicable solutions by abstracting complex and implementation specific details of the solutions. Such a high-level view of challenges and software architecture-centric solutions allow us to highlight an overview of the existing approaches. More details about an individual solution can be interpreted by investigating the relevant studies and their proposed contribution that is highlighted by the related studies section in Table 1.

Solution:
Context-aware and location-sensitive mobile services are published by the services providers that are subscribed and consumed by service requester-following publish-subscribe mechanism. Related Studies [S12, S31, S34, S38, S49, S54, S57] Reference Architecture

Sub-challenge A: Achieving Computational Efficiency for Mobile Devices
Challenge: How to achieve computational efficiency while maintaining the portability and performance of a resource-constrained mobile device.

Solution:
Computationally intensive data is offloaded to the cloud server that performs all the complex computations to provide the results to the mobile device.

Sub-challenge B: Supporting Energy Efficiency for Mobile devices
Challenge: How to optimize the energy efficiency (prolonging the life of charged battery) of a mobile device.
Solution: Adaptive offloading of data and computation from mobile device to cloud-based server-by monitoring and estimating energy consumption-to optimize the energy efficiency of mobile device. Related Studies [S4, S30, S41, S51, S65]

Sub-challenge C: Supporting Storage Efficiency and Cloud Analytics for Mobile Device Data
Challenge: How to utilize a mobile device for sensing contextual data and information and perform analysis of the collected data.

Solution:
A layered architecture where the mobile device acts as context-aware and portable front-end technology for sensing the data, whereas cloud computing acts as a resourceful back-end server for data storage and analytics. Related Studies [S7, S10, S33, S42, S43, S46, S47, S53, S64, 67] Reference Architecture

Primary Challenge IV: Supporting Privacy and Security of Mobile Data
Sub-challenge I: Supporting Security of Mobile Device Data Challenge: How to leverage the cloud computing resources to enable security of the mobile device data.
Solution: Security as a service for data between mobile device and cloud-based servers.

Solutions:
Mobile devices can be considered as context-sensitive (computation and storage intensive) interconnected things that communicate and process data via a central cloud-based server. Related Research [S106, S110, S112, S114, S120]

Sub-challenge B: Supporting Mobile Edge and Fog Computing
Challenge: How to enable the processing of data at the edge of a network.

Solutions:
Interconnected mobile devices as computation nodes can generate and process data closer to data usage without the needs for transmitting data to the central processor at a remote location in the network. Fog computing standardizes the operationalization of the edge computing. Related Research -Edge Computing [S103, S104, S107, S108, S115, S118, S119] [S105, S117] Reference Architecture

Related Research -Fog Computing
Reference Architecture for Mobile-based IoTs.

Architectural Patterns for Mobile Cloud Computing Software
We now answer RQ-4, which aims to present the existing architectural patterns for MCC systems that have been identified from the mapping study. During the identification of the research themes (see Figure 4), we exploited the design review method to discover the existing patterns, i.e., by reviewing recurring design solutions to frequent problems of architecting MCC systems [26,27]. During the architecture-centric software design and development, architectural patterns and styles provide reusable knowledge and best practices to architect the systems [28,29]. Software patterns have proven to be successful to represent recurring solution to frequent problems of software and system design [30].
We believe that the existing patterns that we have identified as a result of the mapping study and presented in Figure 6 focused on designing or architecting MCC can provide documented and well-understood software design solutions to both the researchers and practitioners. The presented patterns in Figure 6 capture the concentrated wisdom and consolidated design rationale from multiple systems to develop software effectively and efficiently. In Figure 6, we illustrate the four identified patterns, namely (i) Adaptive Offloading, (ii) Mobile Cloudlets, (iii) Context Sensing, and (iv) Mobile-driven Internet of Things that are presented in the form of a pattern template (Tables 2-5). The pattern template provides a structured format to present pattern-related information systematically and effectively [30]. We have been able to identify only four patterns that represent a limited number; however, we believe that the patterns presented here can guide the futuristic efforts to investigate the architectural solutions and to discover new architectural patterns for MCC systems. For space reasons, we only detail the adaptive offloading pattern in Table 2 and Figure 6. It is vital to mention that all the patterns represent a layered architecture that has already been detailed earlier (cf. Section 1, Figure 1). We have followed the guidelines from [28,27] for a template-based representation of the architectural patterns. Specifically, we present the pattern in a structure template using the following seven elements of pattern representation.
• Pattern Name: Provides a unique and self-explanatory name for the pattern.
• Pattern Intent: Describes the motivation or the known uses of the given pattern.
• Design Problem and Solution: Highlights the problem solution view that the patterns aim to address.
• Architecture Elements: The artefacts of the system to which a pattern can be applied.
• Reuse Design Knowledge: Design rationale supported by the pattern that can be frequently reused.
• Quality Characteristics: Attributes of quality (non-functional properties) affected by the pattern.
• Reference Diagram: Provides overview of the pattern also known as pattern thumbnail.
We conclude that, in order to support architecture-centric engineering and development of the MCC systems, there is a need to replace the ad-hoc and once-off solutions with reuse-driven and knowledge-based practices for system design. With the growing demands for the adoption of the MCC systems, existing best practices and knowledge must be leveraged to design new systems effectively and efficiently [3,4]. Therefore, the presented patterns can provide reusable design rational and concentrated design knowledge from multiple systems/solutions to offer best practices to design and architect the MCC systems.   Table 2. Template-based representation of the adaptive offloading pattern.
Pattern I -Adaptive Offloading 1. Pattern Intent: To enable a mobile device to dynamically determine what, how and where to offload its data to enhance efficiency of mobile computing.

Design Problem:
How to enable a (resource-constrained) mobile device to delegate its memory and computational-intensive data and tasks to (resource-sufficient) computers.

Solution:
Integrate the off-loading logic between Mobile Computing and Cloud Computing Layers. Such an integrated logic enables a mobile device to exploit dynamic parameters-such as energy efficiency, computational overhead, and storage requirements-to determine and offload data and tasks to cloud computing servers.

Architecture Elements: Mobile Computing Layer with (resource-constrained) mobile devices and Cloud
Computing Layer (resource sufficient) server are integrated with offloading knowledge.

Reuse Design Knowledge:
Integration of offloading logic/knowledge to delegate mobile computing data and tasks to cloud-based servers. 6. Quality Characteristics: -Elasticity of cloud services (acquiring and releasing resources) based on dynamically determined offloading.
-QoS-driven Offloading to ensure that dynamic parameters such as energy, storage, and computational efficiency. 7. Reference Diagram: Figure 6a Pattern Instantiation represents a concrete instance of the abstract pattern representation in Figure 6a Pattern Abstraction. Specifically, Figure 6a Pattern Abstraction illustrates a scenario of pattern application where mobiles devices are used as portable computers to capture contextual images that needs analytics and processing to gather information as detailed in [S46]. The image processing must be delegated to the cloud servers that have image databases to match and process the image. The offloading logic is integrated between the mobile device and cloud server to enable a mobile device to selectively and dynamically offload the images to the appropriate cloud-based server based on energy, computational, or storage eefficiency. Table 3. Template-based representation of the mobile cloudlet pattern.
Pattern II -Mobile Cloudlets 1. Pattern Intent: To enable a mobile device in a hostile environment to frequently offload data to servers that are in close proximity of mobile devices that they serve.

Design Problem:
How to minimize the offloading latency (on remote server) to a single-hop network while maximizing the performance and QoS for mobile computing tasks.

Solution:
The proposed architecture integrates an intermediate layer (based on localized cloud known as cloudlets) between the enterprise cloud and the mobile device. The solution assumes that connectivity to the main cloud (enterprise) cloud is either not reliable or commonly unavailable. 4. Reference Diagram: As illustrated in Figure 6b, this architecture inserts an intermediate layer between the central core (i.e., enterprise cloud) and the mobile devices. At the edges of this architecture are offload elements for mobile devices. These elements, or cloudlets, are dispersed and located close to the mobile devices they serve. Table 4. Template-based representation of mobile sensing and cloud analytics pattern.

Pattern IV -Mobile Sensing and Cloud Analytics 1. Pattern Intent:
To exploit the context-sensitive mobile device to capture contextual data that is sent to the cloud-server for data processing and analytics.

Design Problem:
How to gather the contextual information that can be processed and analyzed to perform decisions.

Solution:
The proposed architecture presents a two-layered architecture, namely the mobile sensing and cloud analytics layer. Specifically, the mobile layers enable the capturing of the contextual information (e.g., environmental condition, trafficc congestion) and send it to the cloud-based server. The cloud server runs the algorithms to analyze data and provide decision support on processed data. Mobile sensing and cloud analytics represent a typical example of front-end mobile devices that can offload computation-intensive tasks to backend server. Specifically, the mobile sensing layer exploits context-sensitive mobile devices as portable user interface to sense the contextual information such as traffic conditions, environment, and crowd-sensing. The contextual information is stored, processed, and analyzed at the back-end cloud server. 4. Reference Diagram: As illustrated in Figure 6c. This architecture aims to exploit the mobile device as a front-end interface to capture the contextual data and information on the go. The captured data are analyzed on the cloud-based server to alleviate the resource poverty of a mobile device. Pattern III -Mobility-driven Internet of Things 1. Pattern Intent: To exploit portable and context-sensitive mobile devices as computation and memory-based things to support interconnect things 2. Design Problem: How to interconnect and manage mobile devices as interconnected things in internet of things architecture.

Solution:
The proposed architecture provides a cloud-based server as a mediator that is responsible for managing all the communication along with computation and memory-intensive tasks that are offloaded form interconnected things (mobile devices). Mobile devices interact with each other via the central cloud in the internet of things architecture. 4. Reference Diagram: As illustrated in Figure 6d, mobile devices and sensors of interconnected things such as heterogeneous (front-end) are managed and operationalized by the central (back-end) cloud.

Past and Emerging Trends of Research on Architecting Mobile Cloud Software
We now answer RQ-5 and RQ-6, which aim to investigate the historical progression of the research and the emerging trends. Specifically, we first highlight the past research on software architecture for MCC to answer RQ-5 in Section 7.1. We then present the trends of emerging research as potential dimensions of futuristic research on software architecture for MCC to answer RQ-6 in Section 7.2. In order to study the past, present, and potential futuristic research based on the evidence from classification and mapping schemes (see Section 4), we have categorized the progression of research into three distinct phases detailed below and illustrated in Figure 7.
• Foundation Phase (2006-2009) represents the earliest phase during which the research on software architecture for MCC started to emerge. During the foundation phase, a total of five studies were published (approximately 4% of total studies) that can be considered as an inception of research on SaaS for mobile computing systems.
• Maturation Phase (2010-2013) represents the duration of research for the next four years corresponding to the foundation phase of research. During this phase, the research from the initial years gained momentum and started to mature. During this phase, a total of 34 studies were published that represent approximately 28% of the reviewed studies. During these years, the majority of the research focused on architectural solutions that can alleviate the resource poverty of a mobile device by offloading its computation and memory-intensive data to cloud-based servers.
• Active and Futuristic Phase (2014 and beyond) represents the most recent years of research and its possible advancement in the future. During this phase (2014-2019), a total of 82 studies have been published that represent more than 68% of total studies that have been reviewed. During these years, active trends still focus on computation offloading, however some emerging topics such as mobile edge computing, mobile IoTs, and others are fast emerging as potential areas of futuristic research.
The foundation and maturation phases represent the past or historical research, while the active and futuristic phase defines possible areas of future research.

Past Trends of Research on Architecture for MCC Software
We now aim to answer RQ-5 to investigate the past trends that highlight a historical progression of the research. Based on the mapping of the research, we have considered the years 2006-2012 as historical research because during those years, the research has emerged and established itself before its tremendous growth in the later years. Moreover, during these years, the research on software architecture for mobile cloud computing enabled (i) the establishment of the theoretical foundation of the research and (ii) fundamental research on mobile cloud computing that later gained momentum.

Pay-per-use SaaS for Mobile Computing:
During the foundational phase, the research focused on software service-driven architectures for mobile computing environments. In comparison with (pre-built and embedded) software components or modules for mobile computing, software services provided loosely coupled and dynamically discovered mobile software that can be acquired or released instantly [S1]. During this phase, the research focused on exploiting the dynamically composable and pay-per-use services to perform computation and provide the mobile recommender systems [S12]. The software as a service model also inspired the early research where computation [S11] or security [S18] of a mobile device can be offloaded to the cloud servers. Such offloading proved vital to compensate for the resource poverty of mobile devices with virtually unlimited cloud storage and processing. After the foundation phase, during the years 2010-2012, the earliest research on architecting mobile cloud software started to mature. The maturation is reflected in a significant growth of research and the emergence of new challenges and solutions.

Computational Offloading for Mobile Devices:
The idea of computational offloading gained attention and solutions have been developed that not only support energy efficiency [S15, S27, S55], but also computational, storage, and data analytics efficiency [S7, S10, S43, S46]. During this phase, the cloud-based servers were exploited for analytics of big data effectively and efficiently. The integration of the mobile cloud resulted in the development of mobile sensing systems or mobile crowd sensing [S10]. The portable and context-aware mobile devices have been used as a front-end system to sense the contextual information such as environment, noise, traffic, and pollution levels [S10, S46]. The sensed data from the mobile device are shared with the cloud-server for analytics and recommendations. The research on software architecture for mobile cloud systems is growing rapidly. Such growth demands the identification of active and innovative solutions to guide futuristic solutions.

Emerging and Futuristic Trends of Research
Based on the historical progression, we now answer RQ-6, which highlights the emerging research that reflects potential futuristic solutions. Before discussing the future needs of the architectural solutions for MCC systems, we must also discuss some important quality attributes (also known as nonfunctional/architectural properties) that need to be accommodated in the software architecture for MCC systems [31]. Specifically, these quality attributes ensure that, in addition to the core functionality, the quality in the architecture is also preserved at the system design phase.
Quality Attributes/Architectural Properties of MCC Software Systems: As illustrated in Figure 8, both the cloud and mobile systems have some distinct attributes of software quality. This means during the architectural-driven design and development process, the quality attributes from both the mobile and cloud computing needs to be accommodated in the software architecture. The highlighted quality attributes only represent a subset of all the possible attributes with extended details found in [13]. For example, the system elasticity attribute refers to the ability of any cloud-based server to be elastic (i.e., dynamic addition or removal of resources) corresponding the variations of the workload on the server. In the case of mobile cloud-based real-time analytics of the crowd sensed data (e.g., traffic flow, environmental conditions), any increase in the demand for the analytics must by supported by the addition of the required memory and computational resources [32] [S46]. Similarly, those resources can be released or degraded whenever not in use. In comparison, the quality attribute of context awareness for mobile computing requires that architecture must support the hardware resources (e.g., device sensors, actuators) to exploit the context awareness such as the location, time, and environmental conditions [S70]. Ideally, any software architecture that unifies the mobile and cloud computing technologies must support the quality attributes relevant to both these technologies. In addition to the distinct set of quality attributes as illustrated in Figure 8, there are some generic attributes of the quality that are relevant to both the cloud and mobile computing technologies. For example, the attributes of system connectivity/availability require that the systems are continuously connected to ensure a seamless working of the MCC system. This means that any futuristic solutions should explicitly address the quality attributes, as a lack of quality also impacts the core functionality of the software systems [31]. Additional details about the quality attributes for the MCC systems are provided in [3,13]. As highlighted in Figure 5, these solutions started to emerge in 2014 and are now gaining momentum, which includes: Mobile-Cloud driven Internet of Things (IoTs) defines one of the emerging research areas that exploits interconnected mobile-devices as a portable and context-aware ecosystem of devices as connected things [S81, S84]. A recent study on the current state of the IoT has highlighted that approximately 25 billion devices will be connected to the internet of things by 2020 [33]. The IoT-based systems are fast emerging as a disruptive technology and an enabling platform-interconnecting humans, systems, services, devices, and things-to ensure a connected world with improved lifestyle, enhanced urban services, work practices, and interactions [17]. The MCC systems with context-awareness and portability coupled with virtually unlimited storage and processing capabilities provide an ideal opportunity to implement IoTs. In recent years, crowdsourcing [S84] and analytics for mobile sensor data [S70] represent practical cases of MCC driven IoTs. For futuristic efforts, the MCC systems can seamlessly provide the 'anytime, anywhere connectivity' of all the things to create technical and socio-economic opportunities [33]. To realize such a vision of IoT, a number of challenges exist in terms of engineering efforts, safety, security, and governance of MCC-driven IoT systems [S114, S120], [17].
Mobile edge computing (MEC) is a recent term that was coined by Cisco Systems and is also referred to as fog computing. MEC aims to support the theory that it may be impractical or impossible to always transmit all the data across the whole Internet from mobile devices to the cloud service provider [S96, S118, S119]. In this context, MEC aims at provisioning of the resources like computation and storage infrastructure at the logical edge of the network, i.e., mobile devices connected to the cloud-based servers. Moreover, a geographically distributed platform rather than at centralized spots can better support the MEC architecture. Some of the practical examples of the MEC technology are Amazon AWS and Microsoft Azure cloud data centers. In the most recent years, the research on mobile edge clouds has started to emerge [S76, S77, S91, S92, S96]. A recent study [S96] highlights that "while the MCC tries to push the limits of mobile applications by including centralized resources to achieve computational offloading, MEC goes further by assigning the major part of remote operations directly to the surrounding infrastructure -an approach that has been successfully applied to improve latencies of edge cloud applications and mitigates the ever-growing bandwidth requirements." A recent emergence and progress of research on MEC needs to investigate MCC from the MEC perspective. Software architecture to design MEC systems can help to abstract the system complexities to model, develop, and evolve the system structure and behavior at higher abstraction levels. Software architecture to design MEC systems can help to abstract the system complexities to model, develop, and evolve the system structure and behavior at higher abstraction levels.
Green and Energy Efficient Computing refers to the design and operations of computing systems that aim to minimize the carbon footprint and maximize the energy efficiency. The resource poverty of a mobile device and specifically the power consumption has led to the research and development of solutions that enable energy efficiency [S6, S5, S10, S40, S50]. A lot of research has already been carried out; however, a futuristic solution needs to go beyond the fundamental research and to provide real-world solutions that promote the notion of green computing in particular and energy efficiency of mobile-cloud in particular [S78, S83].
Mobility in Connected Healthcare is also an area of future interest as highlighted by the results of the mapping study. In a connected healthcare system, mobile devices can continuously monitor the user's health conditions and health logs are maintained at the cloud-based servers. The health logs provide historical and often real-time data relating to a user's health. Moreover, the health logs are made available as portable records with their storage in the cloud and shared with medical experts when required. However, considering the medically critical data, future research is also required to ensure the standardization, security, and privacy-related aspects while generating, consuming, or analyzing the health-specific data [S73, S79].

Discussion and Conclusions of Mapping
MCC has emerged as state-of-the-art mobile computing technology to support systems that are portable, context-aware, yet resource sufficient to perform computation and memory-intensive tasks effectively and efficiently. The research on MCC systems has progressed over more than a decade to address the challenges of service orientation in the context of mobile computing, computational offloading to alleviate the resource poverty of mobile devices, along with data security and privacy for mobile computing environments. There have been no research efforts to investigate the role of software architecture and its implications on the MCC systems. A systematic investigation of the state of the art on software architecture for MCC systems helps us to present a collective impact of the existing research, its strengths, and limitations, along with an indication of the emerging and futuristic trends. The results of the SMS can benefit: Researchers who need to know the body of knowledge based on the research and development on architecting the mobile-cloud systems. The classification and mapping of the state of the art help researchers to understand the progression of research and formulation of new hypotheses to be tested. The mapping of the research and its progress helps to identify: (i) Evidence of research progression, (ii) research themes, and (iii) focuses and contributions of active and futuristic research.
Practitioners who may be interested in understanding the existing research in terms of solutions and to analyze possibilities where academic approaches can be exploited to develop industrial solutions. The details about architectural patterns for MCC systems aim to promote reusable knowledge and best practices to architect MCC systems. The emerging research highlights the needs for applied research and development to address challenges relating to the IoTs, green computing, connected healthcare, and data analytics. Tools and frameworks are needed that can empower mobile and cloud system engineers to automate and customize architecture-based solutions.
Based on the results of the mapping study, we aim to disseminate a systematized knowledge about existing and emerging research on the role of software architecture in MCC systems. The synthesis of the results and their presentation in a structured format highlights the ideas for futuristic research and development on architecting the next generation of solutions that unify and exploit mobile and cloud computing technologies.

Collecting Data for the Study
After the planning phase, we now discuss about collecting data for the study that comprises of the following two steps.
• Step I-Identify the Primary Studies Based on the RQs Based on the RQs, we search and select the relevant studies (peer-reviewed) published research to collect and synthesize the data. The RQs helped us to formulate the search string as illustrated in Figure A1. Based on a multi-step search process as highlighted in Figure A1, the search string resulted in 9678 hits (searched in July 2019) as potentially relevant studies for the review. As per the guidelines to conduct the mapping studies [15], we used six digital libraries/database to search the literature including IEEE Xplore, ACM DL, Springer Link, Science Direct, Scopus, and Google Scholar. However, based on analyzing the study titles, a significant number of these studies proved irrelevant to the outlined RQs and were eliminated for any further processing.
Based on the guidelines in [20], the terms in Figure A1 such as hits, retrieved, screened, and included are standard terms for literature search. These terms refer to identifying, analyzing, and selecting the most relevant literature/studies for data collection. After the study screening and qualitative assessment of the extracted studies, finally, a total of 121 studies-covering more than a decade of published research (2006 to 2019)-were included in the data collection process to synthesize the results for the SMS. • Step II-Assess the Relevance and Quality The last step in the selection of the primary studies relates to the assessment of the relevance and quality of the primary studies, also referred to as screening, and qualitative assessment in Table 6. More specifically, the qualitative assessment criteria in Table A1 helps us to include or exclude the studies for SMS. The quality assessment checklist in Table A1 is complemented by the formula to compute the quality of the individual studies, as given below. The quality assessment criteria (QAC) represents five factors as assessment criteria, providing a maximum score of 1. The list of 121 selected studies that are included in the SMS is presented in Appendix A.

Step I -Study Screening
Is the study in English language? YES or NO Is the study a scientific peer-reviewed published research?
Is the study not a secondary study?
Is the study not a book?
Is the study not focused on software architecture for mobile cloud computing systems?
If [YES] to all four criteria then go to Step II, otherwise exclude study Step