On personalized cloud service provisioning for mobile users using adaptive and context-aware service composition

Cloud service providers typically compose their services from a number of elementary services, which are developed in-house or built by third-party providers. Personalization of composite services in mobile environments is an interesting and challenging issue to address, given the opportunity to factor-in diverse user preferences and the plethora of mobile devices at use in multiple contexts. This work proposes a framework to address personalization in mobile cloud-service provisioning. Service personalization and adaptation may be considered at different levels, including the user profile, the mobile device in use, the context of the user and the composition specification. The user’s mobile device and external services are typical sources of context information, used in our proposed algorithm to elicit context-aware services. The selection process is guided by quality-of-context criteria that combine cloud-service provider requirements and user preferences. Hence, the paper proposes an integrated framework for enhancing personalized mobile cloud-services, based on a composition approach that adapts context information using a common model of service metadata specification.


Introduction
The past few years have witnessed a growing trend in using mobile services for practical purposes in various contexts. People of all ages use their mobile devices to access various services such as shopping on-the-go, gaming and making travel arrangements, as well as retrieving educational resources, reading newspapers, making payments, monitoring health conditions, invoking corporate or partner services, and many more. As users increasingly rely on their mobile devices for carrying out these activities, new challenges and opportunities for mobile service providers emerged as they strive to improve and enrich further the proliferation of mobile experiences for consumers.
Smartphones have become primary personal information-processing tools. Mobile users aspire further at executing a wider range of applications on smartphones. Modern smartphones' built-in sensors, such as GPS, accelerometer, proximity detector, ambient light sensor, and gyroscope are paving the way to advanced mobile applications. To facilitate these developments, mobile devices need further resources, in terms of storage and computing power, as well as enhanced software-provisioning services.
Mobile cloud computing (MCC) [1,2] is poised to overcome substantially these limitations. MCC provides these resources from a remote computing platform such as Amazon AWS, Microsoft Azure, and Google AppEngine. As mobile devices could not process large-size applications locally, an alternative solution is to employ reusable services remotely from a cloud-hosting platform. A cloud service is typically the result of composing basic (in-house and third party) services on the fly to satisfy a user request. A personalized enhancement of this process includes an adaptation of the service presentation to the user interface and an adjustment of the service to the user context. Personalization in cloud computing and related service provisioning processes are the emerging trends. The goal is to enable a dynamic customization of content and services that match mobile user preferences and current context. For example, a location-based service may recommend a specific store in the downtown of a city or in the duty free zone of an airport based on mobile users' location, preferences, and previous purchases. Several definitions of personalization are available in the literature. Nevertheless, we adopt Riecken's [3] and Hagen's [4] definitions respectively: Personalization is about building customer loyalty by building a meaningful oneto-one relationship; by understanding the needs of each individual and helping satisfy a goal that efficiently and knowledgeably addresses each individual's need in a given context [3]. Personalization is the ability to provide content and services tailored to individuals based on knowledge about their preferences and behavior [4].
Personalization aims to improve mobile user experiences by adapting applications and services to meet individual preferences and contexts, which involves: • Collecting information about the user, her/his preferences, current activities, and context information such as location and surrounding objects; • Anticipating user requirements by making recommendations for additional services; and, • Building trust and loyalty with mobile users to develop service satisfaction [5,6].
Current personalization and recommendation techniques in cloud environments are based on rule-based systems, content-based and collaborative filtering [7][8][9][10]. However, solutions to mobile cloud service personalization expect services to adapt to the user's functional needs, the device in-use, and the user's context. Personalization in the context of MCC environments needs to answer the following questions: (a) How to adjust provisioned services to meet mobile user preferences and context? and (b) How to compose services to meet mobile users' personalized needs?
In this work, we address service personalization in the context of a cloud service composition involving in-house and third-party services, while considering user preferences and context. In doing so, we propose a framework for adaptive personalization of mobile cloud service provisioning, that makes the following original contributions: • A definition of the various components of user-device side and cloud-service provider side, involved in the personalization process of mobile cloud service provisioning. • A model for composing cloud services out of basic ones considering service selection, context matching, and content adaptation according to user profile, mobile device in use, and user context. • An algorithm for the selection of context services that refresh context information about the user and her/his environment following the cloud service provider's quality of context (QoC) requirements. A similar algorithm can be used for matching services used in the composition by employing quality of service (QoS) attributes instead of QoC ones. • An adaptation approach for service composition that takes into account the heterogeneity of third-party provided service profiles, and the heterogeneity of context information representation by third-party context services.
The novelty of this work lies in the fact that our proposed framework deals with the personalization of an adaptive dynamic composition of atomic services (in-house services and third-party services). The composition relies on the selection of appropriate basic services based on their QoS offerings. Also, the adaptation of the composed service to the current context of the user or her environment relies on the selection of suitable context services based on their QoC offerings. Furthermore, both the service composition and the adaptation process use a common description model for service offerings and context offerings respectively. These common description models allow to deal with the heterogeneity in the description of third-party services, and the heterogeneity in the description of context providers' offerings.
We have reported a preliminary version of this work in a conference on cloud computing [11]. In this paper, we enhance the conference version by emphasizing the context dimension, which was overlooked in the conference paper. A sub-section describing the concepts of context services and quality of context (QoC) extends further the background section. We also extended the related work section by providing a critical literature review of personalization in cloud-service provisioning. We updated and completely redesigned the proposed framework to take into consideration the acquisition of context from provisioned context services. We extended the adaptation engine to wrap various context representations from third-party context service providers within a common semantic overlay. Finally, we added an algorithm for context service selection that is driven by QoC requirements of MCC providers.
The rest of this paper is organized as follows. The next section presents some background information and elaborates further on service personalization, context services' platforms, and the concept of quality of context (QoC). Section 3 describes some related work, highlights the similarities and limitations of relevant works on cloudbased service personalization, and discusses the motivation of this work. Section 4 presents an overview of the proposed framework. Section 5 describes the adaptation structures for personalized service delivery. Section 6 describes our proposed algorithm for the selection of context services based on QoC requirements of MCC service provider. Section 7 presents the process of integrating and adapting third party service offerings based on mobile user profiles and device profiles as well as context adaptation. Section 8 reveals a scenario used to evaluate our framework where the results of selecting context providers based on QoC requirements of the MCC service provider are analyzed and discussed. Finally, Sect. 9 concludes the paper with a summary of the work presented in this paper, and highlights some future work.

Service personalization
Personalization of services requires collecting information while interacting with the user. The service provider uses this information to deliver appropriate content and tailored services that meet the user's needs. The broad business goals of personalization are [12]: • To serve the user (customer) in an efficient way by anticipating her/his needs.
• To interact efficiently with the user and satisfy mutual goals of both parties (customer and service provider). • To build a relationship with the customer to encourage subsequent purchases.
User satisfaction is the ultimate goal of service personalization. Meeting user's needs leads to trust-building between users and service-providers. This relationship will result in reusing delivered services and recommending them to user's social circles and acquaintances. Personalization of services relies on collected information about the user. The user might specify her/his needs explicitly during the registration to the service. Besides, the history of the user's previous sessions, actual interactions with services, and current context information represent an important source of information from which the service provider can infer a user profile and anticipate his/her needs. Using predefined rules and techniques such as collaborative filtering, service providers could determine some suitable contents to recommend to specific users.
Personalization is not a new concept in the service computing landscape, but it is certainly going to be a crucial aspect for the success of MCC services. Nevertheless, service providers have to understand that motivating consumers to embrace a service is not as significant as delivering a personalized experience that meets their implicit and explicit needs. Today's consumers require services that can provide them with tailored and relevant information. They are also increasingly expecting services that can adapt to their current context such as location and current activities, while satisfying their functional and nonfunctional requirements. Therefore, mobile service providers need to provide the degree of personalization of their services to retain and enlarge their customers' base. To achieve this degree of personalization, MCC providers need to accumulate sufficient information about users' preferences and their context, to customize and recommend pertinent services.
Mobile users are generally less willing to enter lots of data. Therefore, the more information that is implied from the mobile user's profile, context, and data retrieved from the mobile device, the more likely that user is willing to engage further in utilizing MCC services. However, this may raise privacy concerns, unless users are opted to share information with MCC provider under a mutually satisfactory agreement. Hence, MCC service providers should be aware of developing adequate agreements for mobile service provisioning. They need to balance the benefits of personalization against an acceptable level of privacy, since there is a fine line between practicality and intrusion.

Context services and quality of context
Adaptive services consume context information in order to adjust their services to the current configuration of users. They typically capture raw data from existing context sources, environmental sensors, or directly from the users themselves and their portable devices, and then they aggregate it and derive composite context information. Highlevel context information can also be obtained from a Context Management System (CMS). This managerial structure provisions the necessary infrastructure to collect, aggregate, and disseminate context information to various consumers, which require high-level context information for their operations. Raw context data originate from several sources wherein the subjects are mainly users, equipment, portable devices, and users' environment.
CMS structures have already been investigated in the literature as part of research efforts on context-aware services. Baldauf et al. [13] compared several CMSs along several dimensions such as sensing capability; context information representation and modeling; reasoning from and processing context information; maintaining historical data; and privacy and security considerations. Bettini et al. [14] described state of the art approaches for modeling context information and reasoning from it. These approaches contribute to the most popular methodologies that originate from modeling techniques used in database systems, and from ontology-based techniques used in knowledge representation. Perera et al. [15] surveyed a broad range of systems, techniques, methods, models, middleware solutions, and application models proposed by researchers to solve different issues in context-aware computing. They also identified some new trends pertaining to the importance of context awareness in the emerging IoT paradigm.
CMSs evolved into Context Services by embracing service-oriented conceptions in their implementation. Lei et al. [16] designed and implemented a middleware software to collect and disseminate context information in the form of a context service. They addressed extensibility issues of their context service to support heterogeneous primary context sources, privacy, and quality of context information (QoC). Schmidt et al. [17] implemented a generic service, which permits collection, discovery, and monitoring operations of context information. These operations are exposed as Web services to facilitate their integration into heterogeneous environments. These Web services utilize Web Ontology Language (OWL) to deliver a semantic representation of context information whereby SPARQL endpoints are used to query and monitor context information.
With the proliferation and advances in sensing technologies, context services collect, process, and store significant amounts of context information. There is a growing trend toward deploying them on cloud infrastructures to offer cost-effective and more reliable context information within the service provider's premises. Cloud-based context services take advantages of the processing and storage capabilities of the cloud infrastructure. They can scale up when further computing and storage resources are needed due to an upsurge in demand for context information. Also, they can scale down once the demand for context information drops significantly. Li et al. [18] surveyed eleven context-aware middleware architectures. They compared these middleware architectures based on some technical parameters including architectural style, context abstraction, context awareness level, context reasoning, storage, service discovery, scalability, interoperability, fault tolerance, security and privacy, and cloud-based bigdata analytics.
The heterogeneity of sensors used in various context sources raises concerns over the reliability of induced measurements and obtained raw data by adaptive applications that use the corresponding context-services. Also, the aggregation process of raw data can add additional biases. The concept of Quality-of-Context (QoC) has been proposed in several research studies [19,20] to address these concerns. Krause and Hochstatter [20] defined QoC as: Quality of Context (QoC) is any inherent information that describes context information and can be used to determine the worth of the information for a specific application. This includes information about the provisioning process the information has undergone ('history,' 'age'), but not estimations about future provisioning steps it might run through.
QoC might impact the quality of the services offered by adaptive services significantly. Indeed, low-quality context information might lead to making inappropriate decisions concerning the adaptation of the service. Several studies recognized the significance that QoC plays in the adaptation of services. Buchholz et al. [19] considered the following QoC indicators: freshness, precision, spatial resolution, temporal resolution, and the probability of correctness. Kim and Lee [21] added the following QoC indicators: completeness, accuracy, representation consistency, and access security. Neisse et al. [22] described a QoC framework, which relies on three QoC indicators: up-to-dateness, precision, and resolution. Hoyosa et al. [23] presented an extension to the context modeling language MLContext [24] for modeling QoC, where added features include constructs to express quality requirements, quality levels, and context situations (i.e., constraints on context information).
A Context Level Agreement (CLA) that represents the agreement between a context service provider and a context consumer has been suggested [25]. It describes common understandings and expectations of the two parties. QoC levels that the context provider should deliver are guaranteed throughout this agreement. The typical sections of CLA are Parties, Activation time, Scope, Context-level objectives (CLOs), and Penalties [25].

Related work and motivation
There have been extensive works on personalizing Web experiences and cloud services. These works span a wide range of application environments and domain contexts. Next, we review some of the salient literature related to the investigation and evaluation of these recent developments.

Personalized content delivery services in smart devices
Mobile device standards experienced inherent mismatch in usability with desktop counterparts when receiving online information and services, over the last decade. The bulk of the incurred overhead has been arising from generating user interfaces to suit the technical properties of mobile devices. Subsequent standardization working groups released a set of specifications to tailor Web contents to mobile devices, such as the Mobile Web Initiative Device Description Working Group, back in 2008. These specifications consider a variety of mobile-device aspects such as screen size, provisioned markup-language and image format support, which extend the Web to mobile device capabilities. The issued guidelines by W3C (consortium [26,27]), support the design of better and unified mobile-user experiences in order to decrease complexities stemming from the diversity of mobile devices. These efforts led to the definition of a repository of mobile device characteristics, which prompted Web content-providers and developers to adapt their content and delivery interfaces to corresponding mobile devices.
On the other hand, another standard specification maintained by the Open Mobile Alliance or OMA (formerly WAP Forum), provided an XML-structure to match user agents driving user preferences with device capabilities, and labelled User agent profile (UAProf). This standard depicts inherent mobile device attributes to support display preferences of Web users [28]. In doing so, the Composite Capabilities/Preferences Profile (or CC/PP) [29] outlines a schematic RDF structure describing this information that comprises components describing user preferences with respect to device properties in the form of attributes-value pairs that convey hardware characteristics such as screen size, image capabilities, manufacturer, etc., software features such as operating system version, audio/video encoders, etc., network bandwidth, as well as user preferences in terms of usability. Typically, a profile repository is maintained by corresponding mobile manufacturers in the form of a Web server that provides CC/PP profiles in response to HTTP requests.

Web and cloud services personalization
Web personalization has been the subject of several research efforts [30][31][32][33]. Online merchants and many organizations are increasingly using this alternative to deliver customer value and achieve lucrative growth using sophisticated personalization tools; many of them are cloud-based [34]. The aim of Web personalization is to recommend Web pages that the user can visit or products or services that she/he can buy in ecommerce portal cases.
There are three common approaches for Web personalization [31], namely utilization of rule-based systems, content-based filtering, and collaborative filtering.
Rule-based personalization systems employ manually or automatically generated rules to recommend items to users [35,36]. Numerous e-commerce Web portals use manual rule-based systems. For these portals, Web administrators specify personalization rules using users' profile, demographic, or domain specific information.
Content-based filtering systems generate a user profile based on the descriptions of items that the user had previously purchased or had expressed interest in doing so in the future. Web portals store these descriptions as a collection of features or items' characteristics associated with the user profile. Subsequently, these systems generate recommendations to the user by finding out similar items that match the user profile. Content-based recommender systems use item features to calculate items' similarities. Pasquale et al. [37] provided a review of the state of the art of content-based filtering systems used in several application domains, by describing both their classical and advanced techniques for representing items and user profiles. They also presented the most widely used techniques for learning user profiles.
Traditional collaborative filtering systems generate recommendations to the user based on information on a number of users who are sufficiently similar to the user [32,38]. These systems involve matching the ratings of the users for purchased items with those of similar users to recommend to the user other items or products that he/she has not seen or rated before and might be interested in. Collaborative filtering represents the widely-used approach that several e-commerce Web portals employ to add intelligence to their systems, by capturing user profiles and interests, and recommend relevant content and items or services to their customers or visitors.
Some tradeoffs and limitations of the above traditional collaborative filtering approaches have been discussed in the literature [31,32]. To cope with the limitations, several systems use item-to-item collaborative filtering, which is a variation of collaborative filtering approach [32,38]. Rather than matching the user to similar customers, this approach matches the purchased and rated items to similar items, then combines those sufficiently similar items to generate a recommended list of items to the user. Many surveys [8][9][10] described and compared collaborative filtering algorithms. Yang et al. [39] surveyed collaborative filtering recommender systems that use information obtained from social networks.
Another approach for Web personalization relies on Web usage mining [40][41][42][43]. This approach is increasingly becoming popular among researchers and businesses alike, as it allows them to discover the users' browsing behavior. Data mining techniques employed in Web usage mining include clustering, association rules mining, and sequential patterns. Several research works investigated the effective impact of personalization on users' decision making [44][45][46]. Results showed that automated recommendations offered by online retailing were more effective than traditional recommendations made by human experts and other consumers.
With the growing adoption of cloud computing by businesses, personalization of cloud services is becoming a pressing issue. A number of frameworks have been proposed to cope with this issue. Gopalan et al. [47] proposed a cloud-based service architecture for personalized media recommendations. The user device side includes a thin client manager that runs the user interface, a client service manager that tracks the user activity and captures context, a local content manager that extracts metadata associated with the device, a context manager, and a communication manager. The server-side is deployed on the cloud and includes a recommendation engine manager, a user account manager, a context manager, and a pattern analyzer.
Guo et al. [48] proposed a framework to support the provision of personalized cloud services. Their proposed framework includes a client-side and a server-side component running on the cloud. The client-side manages the user profile and captures her/his activities. A user model is also built on the client-side and is updated on a regular basis. To adapt the service to the user preferences, the server-side fetches the user model from the client-side periodically and updates the user data accordingly.
Georgakopoulos et al. [49] presented the MediaWise project, which aims to expand existing media delivery systems with cloud-based personalization and collaboration capabilities. The proposed MediaWise Cloud platform aims to provide support for the creation, search, management, and consumption of multimedia content. In this work, the authors gave an overview of the platform's components, discussed the research objectives related to these components, and compared the features of existing content delivery networks against the envisioned objectives of the proposed platform.
Jang et al. [50] proposed CloudMat, a cloud-enabled context-aware personalization system of content fitness. CloudMat adapts the cloud service to the state of the user on the physical mat, and offers real-time feedback to the user. The cloud service content is adapted and displayed on an electroluminescent lighting layer on the mat to provide spatial guidance to the user. Sensors embedded in the mat capture the user's pose and timing activity, which are then disseminated to the cloud service. This service generates pose templates and metadata regarding the routine physical exercise to be delivered to the user. The utility of the proposed system has been shown through a case study on interactive yoga.
Hummer and Schulte [51] described an approach for context-aware personalization of mobile cloud services. The approach was illustrated using a connected cars scenario. Its three stages are aggregation of raw context events into high-level information, propagation of changes in context into user-specific service configurations, and integration with cloud services to perform context-triggered adaptations. Fan et al. [6] proposed an integrated personalization framework for SaaS-based cloud services. This framework employs a number of approaches including a client-side personalization, recommendation techniques, a dynamic cloud service composition engine, an ontology-based semantic integration, a user modeling technique, and some data-mining approaches.

Motivations and aims
As we mentioned in previous sections, most major Web services regularly personalize content and services for individual users based on their past service invocations.
Examples of these services include Amazon's personalized item-recommendations, Netflix's media recommendations, as well as Google's and Yahoo's personalized Web search results. With the proliferation of Internet-capable mobile handheld devices, users are increasingly requiring personalized content as it helps them to rapidly get relevant content from massive collections of data.
Our work aims at developing a framework to address the issue of service personalization in MCC environments. It aims at satisfying mobile user needs for provisioning personalized services. We assume that mobile cloud service providers compose these services from a set of in-house services and from third-party provided services using a given composition plan. The proposed framework integrates the user's profile, the profile of the mobile device in use, and the current context of the mobile user to adapt delivered personalized services.
The architecture proposed by Goapalan et al. [47] is to some extent close to ours as both of them consider client-side and server-side components. However, our framework focuses more on dynamic service composition from atomic services and service adaptation to deliver personalized services that meet the user's profile, the device profile, and the user context which can be obtained either from the user device or from external context-provider services.
The framework proposed by Guo et al. [48] differs from our proposed framework given that their user model is built and managed on the user device side. This means that the client machine should be powerful enough to compute the user model and handle the request from several servers, while fetching the user model. Our framework targets users with various devices mainly mobile ones with limited resources, and might obtain context information from third party providers of context services.
The framework proposed by Fan et al. [6] is the closest to our work as it shares nearly the same objectives as ours. However, there are few differences between the two frameworks. Our framework essentially targets mobile users who are effectively on the move and who might use various mobile devices that are characterized by limited resources. Their framework targets users with SaaS requests that essentially solicit powerful machines for rendering recommendation tasks. These tasks are however migrated from the server-side to the client-side to reduce the overhead on SaaS server and improve collecting user-profile data.

Context
We are considering a service provisioning environment where mobile users access cloud services using minimal client resources on their devices. Storage and processing are all claimed from MCC provider as users rely on their devices anytime and anywhere to efficiently retrieve these services. Users do prefer flexible and personalized environments that take into consideration their preferences, with regard to functionality and expected quality-of-service (QoS) levels of the delivered services, as well as their current context. They might also use diverse mobile devices to access these services. So, the scope of this work takes into account the following considerations: • User mobility.
• Personalized interfaces with similar look and feel on various devices.
• Cloud service composed from basic in-house and third party services.
We assume that the provisioned cloud service is the composition of two or more child services that can themselves aggregate several elementary or composite services. An elementary service is a basic service, which does not depend on other services. Child services might be developed in-house or obtained from third party providers. Service Level Agreements (SLAs) govern the provisioning process of these services in order to guarantee their levels of service as expected by the consumers of the composite service [52]. Violations of agreed upon SLAs may have an impact on the QoS offered to service-consumers. Numerous research works investigated the resulting QoS of composite services by considering various composition patterns (sequential, parallel, XOR, AND) [53,54].

System architecture
In this section, we propose a framework for implementing an adaptive system that supports mobile users connecting to the cloud service provider platform using various mobile devices. The main tasks of the cloud service provider are: • Managing the advertised services and their composition plan.
• Managing the acquisition of context information from potential context service providers. • Providing a personalized service to mobile users based on their device model, service preferences, and context of use. • Adapting and packaging external services that are exported to third party providers to facilitate their conversion and adaptation to the required format expected by the third-party provider user and device profiles.
The overall architecture of our proposed framework is illustrated in Fig. 1. The architecture includes two parts. The first part contains the components that run on the mobile device side. The second part concerns the personalized cloud service, which includes in its core: the adaptation and personalization engine, the service composition manager, and the context acquisition manager. The details of the above parts are further elaborated next.

Cloud service-side components
As depicted in Fig. 3, the cloud service has the following components: On personalized cloud service provisioning for mobile…  and their delivery plans. Its main tasks are: • Providing an interface for defining service offerings and related information (composition plan). • Receiving service requests from devices and giving access to services.
• Working with the adaption engine to adapt a service composition plan based on user profile, preferences, and context. • Packaging services to meet user and device profiles.
• Initiating USAM and USIM on a mobile user's device.
(d) Personalization and Adaptation Engine is in charge of adapting composed services according to the mobile user profile, preferences, and context. In Sect. 6, we will describe the process for obtaining context information from context services and the process for selecting appropriate services that make up the composite services. The challenge at this level is the heterogeneity in both service offerings and context services' offerings, which are usually described using various metadata models. The back-end databases of the framework include: • Users' Profile Repository: for each user, the system maintains a profile that has two components, the user's model and the user preferences regarding the service offerings, interfaces and content display. • Device Profiles Repository: contains a description of each device including its features and capabilities that are useful for the service provision (screen size, bandwidth limit, color schemes, resolution, etc.). Some features that the system can automatically detect (operating system, browser, plug-ins) are not stored in the repository but integrated to the profile when initializing USIM. • Service Offerings Repository: is the service registry, which contains service offerings. For each offering, the system maintains its composition plan. • Context Catalog: contains context information about the mobile users who are using the cloud service. Context information is directly obtained from the users' mobile devices and from various context services offered by third-party providers. • Policies Catalog: contains the policies of the various services used in the composition of the cloud service and the context service from which context information is obtained. • SLAs and CLAs Repository: contains the agreed-upon SLAs and CLAs with third party service providers and context services respectively. It also contains SLA and CLA templates used during the negotiation process with these providers.

Services registry
The cloud service offering relies on a set of basic or composite services for its service delivery to mobile users. Each child service is either an in-house built service or imported from an external provider. The services registry defines the relationships between these child services. The relationships consist of prerequisite, similarity, and substitute relationships.

Composition plan
The composition plan defines the sequencing of the service offerings and some time constraints or deadlines by which they are expected to be executed to ensure service delivery to users. Different approaches have been considered for planning the composition of services. Digiampietri et al. [55] provided a review of current planning approaches and proposed a solution based on artificial intelligence planning for automatic composition of services.

User model
The mobile user profile represents a characterization of the user at a specific moment in time. Data in the profile is stored based on explicit information given by the user or inferred by the system from log files, for example, that trace previous usage of the service. Information about the mobile user is collected in the user model, which describes the features of the user. It is the basis for service personalization. Using the user model, the mobile service can differentiate between different users and adapt the service provisioning and interfaces to specific user needs. A perfect user model would include all features of the user behavior and knowledge on service utilization and appreciation of service performance. As the construction of the user model is challenging, many research works used simplified models.
Three main aspects that need to be considered in designing the user model include: information about the user that need to be included in the model and the process for obtaining such information, its representation, and the process of creating and updating the model [56]. Management of the user model involves the following activities: deciding on the user data to include in the model, representing that data, and continually updating the model using inferred data from the interactions of the mobile user with the cloud service.
As we are coping with a mobile service provisioning system, the main information to store in the user model is the knowledge of the user about the service being consumed. This information is repetitively collected during the interaction of the user with the service. It is also used for updating the user model (see Fig. 4).
To model users, we consider a fuzzy overlay representation over the service concepts and features, as introduced in a previous work [57]. Each concept in the model is associated to a fuzzy value that represents the assessment of the user's knowledge regarding that concept.
The system uses two different versions of the user model: a global user model and a local user model. The global user model is stored in the User Profile Repository and represents the overall concepts reported to the system about the user or accessed from other external service offerings. In addition to the service concepts and associated fuzzy values, this model also represents the relationships between concepts (prerequisite, similarity, and substitute). The local user's model is managed by the User Profile Manager within the mobile user's device and is related to a specific service offering. This model represents only the service concepts and associated values. It is refined based on user's interactions with the service provider when accessing the services, and used to update the global user's model. The local user model is initialized from the global user model.

Service provisioning strategy
The service provisioning strategy is a set of rules that implement the adaptation controls for the service offerings. It consists of rules for sequencing service offerings, rules for adding or dropping service offerings and rules for selecting between similar or equivalent service offerings. Next section describes an algorithm for the selection of potential context services. A similar process can be adapted to the selection of services that can be used in the composition, by using QoS (quality of service) attributes instead of QoC attributes.

Context service selection engine
In this section, we describe the process of selecting potential context services that can provide up-to-date contextual information about the user and her/his environment based on the cloud service provider's QoC requirements. Service selection in general has been largely investigated in the area of service oriented architecture and Web services using different approaches and algorithms. These approaches include, but are not limited to: • Agent-based approach.
• Particle Swarm Optimization based approach.
• Broker based approach and maximization of application-specific utility function.
• Fuzzy logic based approach.
In the following, we describe an algorithm capable of evaluating potential context service offers by taking into account QoC requirements of the cloud service provider and the various QoC service offerings.
Let Q {Q 1 , Q 2 , . . . , Q n } be the list of QoC attributes, such as freshness of context information, and its probability of correctness. These QoC attributes may be classified into two categories. In the first category, we find QoC benefit attributes, such as probability of correctness, which the cloud service provider wants to maximize. In the second category, we find QoC cost attributes, such as freshness of context information that the cloud service provider wants to minimize.
Let CS {CS 1 , CS 2 , . . . , CS K } be the list of potential Context Services, which are capable of providing the type of context information requested by the cloud service provider. Let R {R 1 , R 2 , . . . , R n }, be the vector of quality requirements of the cloud service provider for each QoC attribute in Q.
The following vector expresses the QoC offering of the Context service CS m : The above QoC attributes are expressed in different units and cover a range of values. To be able to sort and rank the context services' offerings with regard to their QoC offerings, we need to normalize values of QoC offers and define utility functions that will allow mapping the vector of QoC values into a single real value. We define the maximum and minimum values of QoC attribute Q i considering all the offers of the potential context services in CS, namely: The requirement of the cloud service provider R i for Q i may fall in the range [Q min i , Q max i ] or outside of this range. To take into account the requirements of the cloud service provider during the normalization, we define the two following values: We define q r i , the normalized value for the context service C S m offer with regard to the QoC attribute Q i in Eq. (1) as: We define the utility u i,m as the level of satisfaction of the offering of context service C S m with respect to the cloud service provider requirement for the quality attribute Qi.
When u i,m is greater than 1, it means that the offer of context service C S m exceeds the expectation of the cloud service provider with regard to quality attribute Q i . When it is smaller than 1, it means that the offer does not meet its expectation for Q i .
The cloud service provider may assign an importance weight to each quality attribute. Let W {w 1 , w 2 , . . . , w n } be the weight vector associated with the quality attributes respectively. We define a Utility function (weighted combined level of satisfaction) associated with the offered context service C S m as: Equation (3) allows ranking QoC offers of potential context services that are capable of offering the context information required by the cloud service provider. The best context service offer corresponds to the offer that corresponds to the highest value of the utility function U m . Algorithm 1 summarizes the steps of the algorithm.
A similar algorithm, often referenced in literature, for comparing services based on the user QoS requirements is the TOPSIS algorithm developed by Hwang and Yoon [58]. The TOPSIS method aims to determine the best alternative from the concepts of the compromise solution. The solution that has farthest Euclidean distance from the negative ideal solution and the the shortest Euclidean distance from the ideal solution corresponds to the best compromise solution. The algorithm has six main steps [59]: 1. Normalization of the decision matrix. Section 8 describes a case scenario in which we apply our proposed algorithm and the TOPSIS algorithm to rank the offers of a numbers of context services.

Integration and adaptation of third party service offerings
In modern enterprise systems, applications are built from smaller services, described by service offering (SO) descriptions. SOs allow customizing services for each individual user or even for a whole organization. A single service offering may be used in diverse contexts for multiple purposes. In SO repositories, each SO has descriptive metadata allowing it to be easily found in a search process and integrated with other SOs to build much larger services. SOs metadata can be written in XML or in any other proprietary format. The OASIS WSDL Standard for Service Offering Metadata is an internationally recognized standard for describing services. Also, the Open Archives Initiative Protocol for Metadata Harvesting (OAI-PMH) [60] provides an applicationindependent interoperability framework based on metadata harvesting. A harvester is a client application that issues OAI-PMH requests. It is mainly operated by a service provider as a means of collecting metadata from data repositories.
As the goal of the cloud service provider is to offer an adaptive service, it should distinguish important contextual information for its business. The adapted content to the service consumer's context may be for instance presenting information on new items, articles, promotions, and so on. As we mentioned earlier, context information may be obtained directly from the user's mobile device, and/or from third party services that we referred to as context information services (CIOs).
With the heterogeneity in context offering descriptions and context information modeling, it is necessary to translate these offerings into a common model used by the adaptation engine [61]. ContextML [62], a light weight XML-based context representation schema, is a potential candidate for that common model. In ContextML, context information is categorized into scopes and may be related to different types of subjects, such as user and device. It may be incremented with attributes to describe various QoC indicators.
The proposed framework is open to third-party providers that can expose their service offerings as Web services. Their services can be plugged into the proposed framework. With the increasing support to the concept of open service offerings' repositories (SORs), it will be possible to search for appropriate services that can be integrated with local services based on a mobile user's profile and a composition plan.
The heterogeneity of the metadata used to describe SOs requires a process for adapting the service composition, built from various in-house and imported SOs, to the user's profile, device profile, and context. The framework uses a common metadata model to describe SOs. This process, depicted in Fig. 5, involves the following steps: • Step 1 The process starts by identifying the basic services, which are required for the cloud service composition, and the context information required for the service adaptation based on the user profile. The identified basic services need to be acquired from third-party service providers if they are not offered in-house. The Service Selection Engine selects appropriate SOs based on the QoS requirements of the cloud service composition. Likewise, the Context Service Selection Engine selects appropriate CIOs, able to offer required context information, based on the QoC requirements of the cloud service composition. • Step 2 The SO Description Adapter translates the metadata of the SOs, selected in previous step, into a common metadata model for describing basic service offerings. In a similar way, the CIO Description Adapter translates the metadata of the CIOs, also selected in previous step, into a common metadata model for describing context information.

Fig. 5
Context-aware adaptation of third party service offerings • Step 3 The resulting metadata of selected SOs and CIOs, obtained in the previous step, the user profile, and the device profile are the input of the Service Composition and Adaptation Engine. This later generates the composed service, which adapts the service offering to the user profile, device profile, and current context of the user.

Application and performance analysis
In this section, we consider an application scenario in which the required context information is the temperature reading at the mobile user's location. Many context service offerings are available to provide that information each one with its own QoC offerings. This application scenario is used to illustrate the process of context services selection. We assume that the QoC requirement of the cloud service are: Freshness = 6 ms, Precision = 99.96%, and Probability of Correctness = 95.96%. Table 1 shows the QoC values offered by 24 hypothetical context service providers. Table 2 depicts the normalized values of each of these QoC attributes. Table 3 lists the weights that the MCC service provider assigns to these QoC parameters according to the mobile user requirements. By using our selection algorithm, normalized values are calculated for each QoC parameter while differentiating between benefit-driven QoC attributes and cost-driven QoC attributes. Then, using the weight table, the aggregate utility function is calculated for each context service offering. Table 4 depicts the ranking table generated by MCC service using our proposed algorithm. The offer of the Cxt provider with ID 3 is the best offer as it maximizes the aggregated utility. In parallel with that, we also use the TOPSIS method [58] for ranking the Cxt offerings. First, we identify the positive ideal solution (PIS) and the negative ideal solution (NIS). Then, we calculate for each Cxt offering the separation from PIS and from NIS. Afterwards, we calculate the closeness to the ideal solution (CIS). Table 5 depicts the ranking using the TOPSIS method.
To our surprise, the above results show that both algorithms have obtained the same five best Cxt providers (Cxt ID: 3 is the best one). Subsequent Cxt offerings in the two rankings are very close, especially for the first ten best offerings. This process results in identifying a suitable Cxt provider for temperature provisioning by considering the three QoC attributes: freshness, precision, and probability of correctness.

Conclusion
The phenomenal proliferation of Internet-enabled mobile devices, such as tablets and smartphones, having multimedia and sensing capabilities, has triggered over the past few years the development of new applications and services of all kinds. These services include shopping-on-the-go, online hotel booking, accessing educational resources, and many more. However, these devices are still suffering from what is known as resource (computing and storage) poverty. Mobile cloud computing is a new paradigm of context information and quality of context. Finally, we evaluated our framework in the context of an application scenario to illustrate the performance of the proposed algorithm. Our future work will further investigate a wide range of application contexts which integrate Internet of Things (IoT) services that potentially unleash further context patterns.