Dynamic Service Composition Orchestrated by Cognitive Agents in Mobile & Pervasive Computing
Oscar J. Romero
Machine Learning Department
*Carnegie Mellon University
*5000 Forbes Avenue, Pittsburgh, USA
Abstract
Automatic service composition in mobile and pervasive computing faces many challenges due to the complex nature of the environment. Common approaches address service composition from optimization perspectives which are not feasible in practice due to the intractability of the problem, limited computational resources of smart devices, service host’s mobility, and time constraints. Our main contribution is the development of a cognitively-inspired agent-based service composition model focused on bounded rationality rather than optimality, which allows the system to compensate for limited resources by selectively filtering out continuous streams of data. The evaluation of our approach shows promising results when compared against state-of-the-art service composition models.
Index Terms:
Service composition, Middleware, Mobile and Pervasive Computing, Artificial Cognition
I Introduction
Service composition refers to the technique of creating composite services by the aggregation of atomic services. Despite the existence of Mobile/Pervasive Computing (MPC) middleware for service composition [4, 11, 10], there are still some challenges that need to be tackled. Thus, we claim that service composition should:
(1) consider requests from multiple users; (2) consider resource scarcity in smart devices; (3) perform dynamic adaptation to unpredictable changes; and (4) deal with both short and long-term user’s goals.
Performing service composition while taking into account the myriad of variable factors mentioned above makes the problem become intractable even for approaches that use dynamic composition and focus on optimality-based (e.g, graph-, rule-, and workflow-based) solutions, which do no consider limitations imposed by the decision-making process (specially on smart devices). Thus, we propose a cognitively-inspired, bounded-rationality-based approach so-called COPERNIC, which seeks satisfactory solutions rather than optimal ones, allowing composition to be performed even on resource-constrained devices.
II Approach
A. Preliminaries
A concrete service csi is defined as a tuple [1] ⟨csiin,csiout, csiprec,csipostc,csiQoS,csictx⟩ that performs a task by acting on input data in to produce output data out, with pre-conditions prec, post-conditions postc, Quality of Service values QoS, and context information ctx; and an abstract service asi defined as a tuple ⟨asipre,asipost,asics⟩ and realized by several concrete services that offer the same functionality (asics∈{cs(i,1),...,cs(i,n)}) such that ∀cs(i,j), cs(i,k)∈asics/(asipre=cs(i,j)pre∩cs(i,k)pre)∧(asipost=cs(i,j)post∩cs(i,k)post).
B. System Architecture
The COPERNIC Agent is a cognitive module inspired by architectural principles defined by the Common Model of Cognition (CMC)[5, 8], a computational model that captures a consensus about the structures and processes that are similar to those found in human cognition. Cognitive modules are (see detailed description in [9]):
1. Perception: it perceives agent’s current state by processing both external (e.g., user requests) and internal (i.e., user’s context, sensor readings, and QoS) sensory inputs. It outputs a set of percepts (symbolic representation units) such P={p1...pn} ∣ ∀pi∈PR, where PR is a set of premises such that aspre∪cspre⊆PR.
2. Working Memory (WM): WM holds previous percepts not yet decayed away, and local associations from declarative memories that are combined with the percepts to understand the current state of the service composition. WM defines a limited storage capacity and a recency-based decay function that keeps active a limited number of units, expressed as a base-level activation function. Contents of WM are used as inputs for service matching, i.e., wi⊆(aspre∪cspre)⊆PR.
3. Declarative Memories: the WM cues the declarative memories (i.e., Episodic Memory (EM) that retrieves information about services’ historic performance, context, etc., and Semantic Memory (SM) that retrieves service descriptions, user preferences, etc.) and stores local associations. EM is a content-addressable associative memory represented through a Sparse Distributed Memory; and SM is implemented using a Slipnet, an activation passing semantic network. This module outputs a set of premises D={d1...dn} ∣ ∀di∈PR.
4. Selective Attention (SA): SA filters out a continuous stream of content from WM so the agent only focuses on the most relevant information needed for matching abstract services. Goals are decomposed and abstract services compete and cooperate among them in order to get the focus of attention.
SA uses a Behavior Network (BN) [6, 7], a hybrid system that integrates both spreading activation dynamics and a symbolic, structured representation. Each behavior of the BN maps to a single abstract service as, and “service discovery” emerges from the activation/inhibition dynamics among all services. Abstract services (behaviors) distinguish between expected/non-expected (positive/negative) postconditions (in terms of an “add” and a “delete” list) and define a level of activation asiα.
Also, the model defines 5 parameters to tune the global behavior of the network: π is the mean level of activation, θ is the threshold for becoming active, ϕ is the amount of activation energy a WM unit injects into the network, γ is the amount of energy a goal injects into the network, and δ is the amount of activation energy a protected goal takes away from the network.
5. Procedural Memory (PM): PM defines a set of heuristics to: 1) discover concrete services based on QoS attributes; and 2) adjust the BN parameters to make the global behavior be more adaptive. PM applies the following heuristics [7] to keep the balance between: (1) goal-orientedness vs. situation-orientedness, γ>ϕ; (2) deliberation vs. reactivity, ϕ>γ∧ϕ>θ; and (3) bias towards ongoing plan vs. adaptivity, ϕ>π>γ. The values are dynamically adapted using a utility-based learning mechanism.
6. Action Selection (AS): AS processes both internal actions (such as goal setting) and and external actions (such as triggering a device’s effector/actuator, and invoking the discovery mechanism to execute concrete services).
7. Cognitive Cycle: unlike traditional approaches that create upfront composition plans which are prone to inadaptability, in our approach, plans emerge from the interaction of cascading sequences of cognitive cycles corresponding to perception-action loops (modules 1-6) where compositional conditions are validated and reasoning and planning take place. This contribution allows service composition to be more reactive, robust, and adaptive to dynamic changes while composition plans are generated on-the-fly by using minimal resources as a result of filtering out a continuous stream of information.
III Evaluation
We used the NS-3 simulator to compare the performance of COPERNIC 111https://github.com/ojrlopez27/copernic against two state-of-the-art decentralized service composition models: GoCoMo, a goal-driven service model based on a decentralized heuristic backward-chaining planning algorithm [2]; and CoopC, a decentralized goal-driven cooperative composition model that does not support runtime composite service adaptation [3]. We modified service density (sparse (SD-S): 20, medium (SD-M): 40, dense (SD-D): 60); composition length (5 services (CL-5) or 10 services (CL-10)); and node mobility (slow (M-S): 0-2m/s, medium (M-M): 2-8m/s, and fast (M-F): 8-13m/s); and we measured 3 different metrics: composition time (CT in seconds), average memory used during the composition (MU in Kb), and a planning failure rate PFR (# of failed planning processes / # of all the issued requests).
Table I shows the results (blue/red cells are the best/worst measurements for each category, respectively). In particular, GoCoMo’s failure rate was lower than COPERNIC (12-38%) when the mobility was slow. This difference dropped to 7-13% in fast-mobility high-density scenarios because COPERNIC is less sensitive to mobility changes thanks to service information is stored in the WM and gradually fades away, which means that it can still be accessible even when a service disappears and reappears later in time,
allowing the service to promptly participate again in the composition without producing significant planning failures. In comparison with CoopC, COPERNIC got 12-25% less failures due to CoopC does not support runtime adaptation and poorly handles mobility changes. Regarding composition time, COPERNIC tailored composite services up to 42% and 71% faster than GoCoMo and CoopC, respectively; and it used up to 72% and 84% less memory than GoCoMo and CoopC, respectively. The reason for this significant reduction is that COPERNIC is continuously filtering out the stream of incoming information, which keeps it into reasonable margins of resources usage, despite of the dynamism of the environment.
It is worth noting that COPERNIC did not show a significant difference in memory usage when using a composition length of either 5 or 10 services (-4% - 11%) in comparison with GoCoMo (60% - 190%) and CoopC (157% - 201%), which suggests that our approach could be smoothly scaled up.
IV Conclusions and Future Work
We propose a cognitive model that efficiently and dynamically orchestrates distributed services under highly changing conditions. Our approach focuses on bounded rationality rather than optimality, allowing the system to compensate for limited resources by filtering out a continuous stream of incoming information. We tested our model against state-of-the-art service composition models while modifying mobility, service density and composition complexity features, and the results were promising demonstrating that our approach may be suitable for MPC environments where resources are scarce.