Distributed Mobile Microservice Execution Enabled by Efficient Inter
Total Page:16
File Type:pdf, Size:1020Kb
REACT: Distributed Mobile Microservice Execution Enabled by Efficient Inter-Process Communication Chathura Sarathchandra InterDigital Europe London, United Kingdom [email protected] ABSTRACT CCS CONCEPTS The increased mobile connectivity, the range and number • Human-centered computing ! Ubiquitous and mo- of services available in various computing environments in bile computing; Ubiquitous computing; Mobile com- the network, demand mobile applications to be highly dy- puting. namic to be able to efficiently incorporate those services into applications, along with other local capabilities on mobile KEYWORDS devices. However, the monolithic structure and mostly static Mobile Microservices; Mobile Function Distribution; Mobile configuration of mobile application components today limit Cloud Computing; Offloading; Microservices; application’s ability to dynamically manage internal compo- nents, to be able to adapt to the user and the environment, and utilize various services in the network for improving the ACM Reference Format: Chathura Sarathchandra. 2021. REACT: Distributed Mobile Mi- application experience. croservice Execution Enabled by Efficient Inter-Process Commu- In this paper, we present REACT, a new Android-based nication. In xxxx ’xx: xxx xxth xxxx xxxx xxx xxxxx, xxxx xx–xx, framework that enables apps to be developed as a collection xxxxx, xx xx, xxxx. ACM, New York, NY, USA, 14 pages. https: of loosely coupled microservices (MS). It allows individual //doi.org/10.1145/1122445.1122456 distribution, dynamic management and offloading of MS to be executed by services in the network, based on contex- tual changes. REACT aims to provide i) a framework as an Android Library for creating MS-based apps that adapt to 1 INTRODUCTION contextual changes ii) a unified HTTP-based communication The mobile device has become the primary device of choice mechanism, using Android Inter-Process Communication for most users, providing access to most applications and (IPC) for transporting requests between locally running MS, services at their fingertips, from multimedia to personal fi- while allowing flexible and transparent switching between nance applications. This is enabled by their continuously network and IPC requests, when offloading. We evaluate increasing computing capabilities, high bandwidth and low REACT by implementing a video streaming app that dynami- latency network technologies. According to Cisco’s Trend cally offloads MS to web services in the network, adapting to Report [14], by year 2023 global mobile devices will grow to contextual changes. The evaluation shows the adaptability 13.1 billion from 8.8 billion in 2018. Moreover, advancements to contextual changes and reductions in power consumption in various software (e.g., Machine Learning algorithms) and when offloading, while our communication mechanism over- human-computer interaction (e.g., Augmented Reality) tech- arXiv:2101.00902v1 [cs.NI] 4 Jan 2021 comes performance limitations of Android IPC by enabling nologies have helped popularize mobile applications and efficient transferring of large payloads between mobile MS. services providing enhanced user experiences and function- ality. Thus, gaming, social media and business mobile apps Permission to make digital or hard copies of all or part of this work for are predicted to be the most popular out of all 299.1 billion personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear downloaded globally by 2023. this notice and the full citation on the first page. Copyrights for components Resources and functionalities required for those applica- of this work owned by others than ACM must be honored. Abstracting with tions, in turn, increase the demand on resources on mobile credit is permitted. To copy otherwise, or republish, to post on servers or to devices that they run on, which are inherently resource- redistribute to lists, requires prior specific permission and/or a fee. Request constrained. Therefore, the lack of resources in mobile de- permissions from [email protected]. vices limits the user experience and the type of applications xxxxx ’xx, xx xx–xx, xx, xxxx, xxxx © 2021 Association for Computing Machinery. and services that can be offered. ACM ISBN 978-1-4503-XXXX-X/18/06...$15.00 Mobile cloud computing [16] bridges the gap between https://doi.org/10.1145/1122445.1122456 the growing resource demands of mobile applications, and 1 xxxxx ’xx, xx xx–xx, xx, xxxx, xxxx Chathura, Sarathchandra limited resource availability of mobile devices, through of- As a result of the increased ubiquity in services, resource floading resource-intensive functions to resource-rich ap- provisioning extends beyond public cloud and the mobile plication execution environments (e.g., edge, cloud environ- functions may be offloaded to services in the edge as well ments) in the network or to other devices. This brings the as to services offered by other mobile/IoT devices. However, resource elasticity of cloud computing technology to the as discussed above, monolithic design and statically bind- much rigid mobile devices. However, existing mobile func- ing an application to one specific resource or to a specific tion offloading frameworks rely on the availability ofpre- application server counterpart, offered by the same applica- deployed framework-specific server counterparts in the net- tion provider, limits offloading opportunities that a device work [13, 15, 27] to be able to offload computing functions, may have for improving performance or augmenting func- limiting the overall offloading opportunity. These server tionality. For example, an application provider may deploy counterparts receive and execute offloaded tasks, by fol- instances of the same service at multiple mobile, edge and lowing framework-specific execution models and protocols. cloud resources, and a device that is bound only to a specific Partitioning of application components are performed at resource or a server instance in the cloud may not be able code level (e.g., through code annotations), maintaining the to utilize an instance that is closer to the edge or offered by monolithic code structure, which limits the flexibility and another IoT device within user’s proximity. Moreover, with dynamicity in managing independent components. Thus, the increased range of web services provided by the applica- the application components themselves are monolithically tion providers as well as third-party service providers that packaged and statically configured for using known server are available in networks (e.g., varying cloud video encod- offloading counterparts. This limits the ability of the appli- ing/decoding services), allowing applications to dynamically cations to dynamically use and adapt to newly available ser- utilize third-party services for offloading mobile functions vices (such as microservice clouds [26]) and new execution will further increase offloading opportunities and reduce environments, respectively. costs in service provisioning. Therefore, it is imperative that However, offloading is not always beneficial and may lead applications can dynamically utilize those third-party ser- to negative performance gains [28]. For example, in cases vices, as opposed to statically binding to a specific server where it requires large amount of data to be transferred instance in the network provided by the corresponding ap- between the mobile device and the cloud when offloading, plication provider. it may lead to higher execution times as well as increased Microservices architecture [25] has become an increas- power consumption. However, under certain conditions the ingly popular application structure style and microservice user may prefer to offload functions for obtaining a better clouds have been used for providing services for various functionality and a better user experience, at the expense applications [26]. It provides applications with the flexibil- of increased energy consumption. Therefore, dynamically ity to adapt to the underlying technological changes and, adapting to various contextual changes [38] when offload- the ability to manage resources and control different appli- ing is crucial, while decisions on when to offload, what to cation functions (i.e., microservices) independently. In this offload (which functions) and where to offload (execution architecture, an application is structured as a set of loosely environments and other mobile and Internet Of Things de- coupled and independently manageable services that com- vices) have a direct impact on the overall performance of the municate over a lightweight (and often technology-agnostic) mobile device. protocol (such as HTTP [21]). The fine-grained control of The availability of services in the network is one of the constituent components enabled by the microservices ar- primary factors that influence mobile function offloading chitecture, allows the internal structure of applications to decisions. If there are more services that can be utilized for be dynamically changed at runtime. The use of a common offloading, the more opportunities and options (e.g., multiple communication interface (an application-layer protocol such service providers offering same service with varying quali- as HTTP) across all microservices enables dynamic bind- ties) the applications have when deciding when and where ing to offloading counterparts, i.e., offloading to other (mi- to offload