Beruflich Dokumente
Kultur Dokumente
Department of Computer and Information Sciences, Temple University, Philadelphia, PA 19122, USA
School of Computer Science, Engineering, and Physics, University of Michigan-Flint, Flint, MI 48502, USA
c
Instituto de Informtica, Universidade Federal de Gois, CEP 74690-815, Goinia, GO, Brazil
d
School of Computing and Information Sciences, Florida International University, Miami, FL 33199, USA
b
a r t i c l e
i n f o
Article history:
Received 7 November 2013
Received in revised form 7 February 2015
Accepted 9 February 2015
Available online 15 February 2015
Keywords:
Models at runtime
Adaptable middleware
Domain independence
Domain specic classier
a b s t r a c t
Context: As the use of Domain-Specic Modeling Languages (DSMLs) continues to gain popularity, we
have developed new ways to execute DSML models. The most popular approach is to execute code resulting from a model-to-code transformation. An alternative approach is to directly execute these models
using a semantic-rich execution engine Domain-Specic Virtual Machine (DSVM). The DSVM includes
a middleware layer responsible for the delivery of services in a given domain.
Objective: We will investigate an approach that performs the dynamic combination of constructs in the
middleware layer of DSVMs to support the delivery of domain-specic services. This middleware should
provide: (a) a model of execution (MoE) that dynamically integrates decoupled domain-specic knowledge (DSK) for service delivery, (b) runtime adaptability based on context and available resources, and
(c) the same level of operational assurance as any DSVM middleware.
Method: Our approach will involve (1) dening a framework that supports the dynamic combination of
MoE and DSK and (2) demonstrating the applicability of our framework in the DSVM middleware for
user-centric communication. We will measure the overhead of our approach and provide a cost-benet
analysis factoring in its runtime adaptability using appropriate experimentation.
Results: Our experiments show that combining the DSK and MoE for a DSVM middleware allow us to
realize efcient specialization while maintaining the required operability. We also show that the overhead introduced by adaptation is not necessarily deleterious to overall performance in a domain as it
may result in more efcient operation selection.
Conclusion: The approach dened for the DSVM middleware allows for greater exibility in service delivery while reducing the complexity of application development for the user. These benets are achieved at
the expense of increased execution times, however this increase may be negligible depending on the
domain.
2015 Elsevier B.V. All rights reserved.
1. Introduction
Model Driven Software Development (MDSD) has become a
widely used paradigm in the area of software engineering with
its growth increasing in recent years [20,43]. As a result of the
growth of MDSD there has also been much interest in DomainSpecic Modeling Languages (DSMLs), particularly, the graphical
version of DSMLs [19,26,27]. Conventional approaches to using
DSMLs focus on model transformation utilized in other areas of
Corresponding author.
E-mail addresses: karl.morris@temple.edu (K.A. Morris), markalli@umint.edu
(M. Allison), fmc@inf.ufg.br (F.M. Costa), weijp@cis.u.edu (J. Wei), clarkep@cis.u.
edu (P.J. Clarke).
http://dx.doi.org/10.1016/j.infsof.2015.02.003
0950-5849/ 2015 Elsevier B.V. All rights reserved.
22
23
Fig. 1. CML Models for the scenario. (a) Control schema. (b) Data schema-1. (c) Data Schema-2.
24
Fig. 3 shows the structure of the control scripts generated during model synthesis using EBNF-like notation. The rules of the control scripts are shown using an attributed grammar, where the
keywords are shown in bold and the attributes are denoted by a
subscript. For example, Rule 1 states that a control script may contain one or more script commands and Rule 2 shows the various
25
Fig. 4. Control scripts generated during the synthesis of the CML instances in Fig. 1. CIn represents the nth control instance being synthesized. Similarly for the data instances.
based on system context allows it to change based on the availability of new information and/or resources. This feature is useful
for systems to provide guarantees on their operation. One obvious
concern of adaptable systems is the general overhead intrinsic to
the monitoring and adaptation process when compared to
non-adaptable systems [9]. This concern must continuously be
addressed and new research in adaptable systems must balance
the granularity of adaptation with the required responsiveness of
the system.
3. Motivation
26
the capability of dynamically determining the operational semantics of a command to be executed based on the system context and
policies that are in place.
Based on our work on the design of the middleware for DSVMs
the following features are necessary for the interpretation of iDSML models at runtime.
Variable Operation Multiple ways of realizing user intent. For
example, operation to send a le may be done with or without
encryption based on the users intent. This allows our middleware to provide higher assurance of its functionality by being
able to realize the users intent through varying execution
paths.
Formal Validation A mechanism for the middleware to formally validate that the operation complies with predened constraints. We have developed an approach that uses rst order
logic to validate models, representing the users intent, to
ensure they conform to user policies [32]. By validating operations of the middleware we are able to ensure that a set of
operations will not violate any active policies in the system
while attempting to realize the users intent.
Dynamic Composition The ability to dynamically build functional constructs to realize delivery of services, which is part
of the structural adaptation process [46]. This allows the full
enumeration of potential execution paths by allowing the middleware to determine at runtime what operations can be
executed based on available resources.
Functional Augmentation The ability to dynamically change
domain-specic behavior of the middleware at runtime. Our
current design allows new procedures to be added to or
removed from the DSVM middleware at runtime.
27
Features
Variable oper.
Formal valid.
Dynamic compos.
Funct. aug.
Prog. model
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
2. Command Classication. Matches a command to a domain specic classier (DSC) in order to begin the IM generation process.
DSCs and their relationship with commands is discussed further
in Section 5.1.
3. Candidate Model Generation. Based on the DSCs received, candidate IMs are generated to perform the required domain-specic
functionality. These candidate IMs are generated using the
appropriate procedure descriptors for the procedures available
in the repository. Procedures are discussed in Section 5.2 and
the IM generation process is described in Section 5.4.
4. Model Validation and Selection. Using the IMs generated in Step
3, a subset of available IMs is selected that conforms to system
or user-dened policies. The resulting IMs are then passed to a
cost function which selects the best model based on some predened analysis and the current middleware state.
5. Model Execution. The selected IM is executed by dynamically
loading procedures from the repository based on the DSCs
and procedure descriptors contained in the IM. This process is
discussed further in Section 6.1.2.
The repository shown in Fig. 6 stores the static DSK in the form
of procedure descriptors and procedures that would be dened
during instantiation of a DSVM for a given domain.
We will use the scenario described in Section 2.1.1 to illustrate
how the middleware for the CVM achieves service delivery using
the workow for execution shown in Fig. 6.
5. Intent model design
In this section we describe the structure of intent models (IMs)
and the relationships between their components. First we describe
the IM components including domain specic classiers (DSC),
procedures and execution units, then present the concept of an
IM. Briey stated, a DSC is used to catalog the domain-specic
knowledge (DSK) in terms of attributes and operations used by
the middleware; an execution unit is a set of instructions that
accomplishes a single task; and a procedure is a structure that integrates one or more execution units and binds it to a DSC.
5.1. Domain specic classiers
Domain specic classiers (DSCs) form a taxonomy that catalogs the attributes and operations used by the middleware to realize the commands in a control script. These attributes and
operations capture the DSK and are manually created based on
the services to be delivered in the given domain. DSCs provide a
common point of reasoning for the commands in the control
scripts and the policies governing the behavior of the middleware.
For the proper instantiation of the middleware in a particular
domain, a set of DSCs must be provided that capture all rst-class
domain-specic operations and attributes.
28
2. Command
Classification
DSCs
Commands
Control
Script or
Event
1. Parsing
3. Candidate Model
Generation
Matching
Models
4. Model Validation
and Selection
Intent Models
Procedure Descriptors
Repository
Procedures
Callback Model
5. Model
Execution
DSCs have a one-to-one mapping to the commands a middleware can respond to, that is, for each command that may appear
in a control script there is one associated DSC. On the other hand
DSCs have a one-to-many mapping to procedures used to realize
actions in the middleware, where a given DSC may have several
implementations that realize a command in the control script.
The selection of the appropriate procedure is based on user-dened preferences and the current state of the middleware. We provide additional details on the selection process later.
The procedures associated with DSCs must inherently possess
semantics relevant to a domain and should therefore be composed
through a feature analysis [25] of said domain. For example, in the
user-centric communication domain the DSCs map to commands
that are required to perform tasks such as (1) establish a connection, (2) add participant to a connection, and (3) send a le to users
in a connection. There may be several procedures associated with a
DSC and are able to carry out the task the DSC describes, for
example, the DSC to send a le may have the procedures (1)
SendBasic send le as is and (2) SendSecure where the le is
encrypted to ensure secure transmission.
DSCs that describe operations may, as a part of their denition,
state parameters that are required for the completion of those
operations. These parameters are themselves DSCs. For example,
the DSC which describes sending a le, Send, would include a
DSC for the name and path of the le to be sent, FileURI. Therefore,
any procedure which conforms to the Send DSC must expect and
handle the FileURI parameter.
Table 2 shows a set of DSCs for the user-centric communication
domain. These DSCs are used in the middleware for the Communication Virtual Machine (CVM). The table consists of four columns
representing the name, namespace, parameters and kind, used in
the denition of a DSC. The top ve rows show DSCs that are attributes and the bottom four rows show DSCs classied as operations.
5.2. Procedures
The procedure is the key entity used to capture the DSK for a
given domain, specically the semantics associated with the
various domain-specic actions. Procedures are the operational
constructs that undertake the domain-specic operations
Table 2
A set of DSCs from the user-centric communication domain.
Name
Namespace
cml-Model
leURI
plainTextFileURI
encryptedFileURI
homeNetwork
send
receive
encrypt
user_comm
user_comm
user_comm
user_comm
user_comm
user_comm.nonstream
user_comm.nonstream
user_comm.nonstream
decrypt
user_comm.nonstream
Parameters
leURI
leURI
plainTextFileURI,
encryptedFileURI
encryptedFileURI,
plainTextFileURI
Kind
ATTR
ATTR
ATTR
ATTR
ATTR
OPER
OPER
OPER
OPER
described by the DSCs of a particular domain, and must be provided along with DSCs for the middlewares instantiation.
A Procedure (P) is dened as a 6-tuple I; N; C; EU; EU 0 ; D where:
I the unique identier for P
N the human readable name of P
C a classier for the procedures function, where C 2 fDSCg,
and fDSCg is the set of all domain specic classiers for a given
domain
EU the set of execution units contained in P
EU 0 is the starting execution unit where EU 0 2 EU
D is a list of dependencies in P expressed as DSCs, where
D fDSCg and 8d 2 D; d P:C; P:C refers to the DSC that classies procedure P.
From an implementation perspective, we may view a procedure
as an ordered collection of executable units, along with a list of
DSCs on which it depends to perform its task. The procedure is thus
comprised of two parts:
1. The descriptor, which provides the necessary meta-data for the
procedure including: name (N), the unique identier (I), DSC
(C), starting execution unit (EU 0 ), and dependencies (D).
2. The set of executable units (EU) which undertake the operations
of the procedure including manipulating state information,
making API calls, and invoking other execution units and
procedures.
The dependencies (D) of a given procedure P are a proper subset
of the set of DSCs and does not contain the DSC stated in P. This is
because our initial design does not allow recursion (direct or indirect) of procedures.
An execution unit (EU) is a set of instructions that are executed
as an atomic unit and performs some group of operations to
achieve the objective of its parent procedure. An EU may perform
29
sub-IMs /
tempMatchingIMs
mergeIMs(singleIM,
subIMs)
else
/Merge the temporary matching IMs with
the sub-IMs /
tempMatchingIMs
mergeIMs(tempMatchingIMs, subIMs)
end if
else
tempMatchingIMs.clear();
end if
end for
matchingIMs.addAll(tempMatchingIMs)
end if
end for
return matchingIMs
end function
30
Intent Models
Procedures
Execution Units
and DSCs
Automatic
Manual
Legend
DSC
Procedure
Execution Unit
1
DSC
-name : String
-kind : Kind
-namespace : String
0..*
initialProc
procedureList
enumeration
Kind
+ATTR
+OPER
dependencyList
0..*
Before another procedure in the current list of matching procedures is processed, the variable holding the temporary IMs is
added to the matching IMs, line 38, which is then returned by
the generateModels() function, line 40.
parameters
IntentModel
-id : UUID
-name : String
Procedure
-id : String
-name : String
maps_to
ExecutionUnit
-id : String
-body : String
owns
1
1:
2:
3:
4:
5:
6:
0..*
initialEU
7:
8:
created during the current invocation of the function generateModels(). Line 5 of the algorithm identies the procedures
that form the roots of the subtrees, these procedures are stored in
the variable matchingProcs. Lines 7 through 9 check to see if
the matching procedures list is empty and if so, the null value is
returned. The loop shown between lines 10 and 39 builds all the
IMs for the initial DSC. Line 12 assigns the list of DSCs for the current procedure being processed into dependDSC_List. If this list
is empty then a single-procedure IM is created from the current
procedure and added to the current IMs (see line 15).
If the DSC dependency list is not empty then the list is traversed
(see loop between lines 19 and 35), and sub IMs are created and
added as children to the current IM being created. For each DSC
in the dependency list, dependDSC_List, a recursive call, line
22, is made to generateModels() with parameters, dependentDSC the DSC being processed in the current loop iteration,
and procList the list of all procedures. The IMs returned from
generateModels() are assigned to the variable subIMs.
If the sub-IMs container, subIMs, returned is not empty, line 23,
and the loop is processing the rst DSC in the container, line 24,
then a single IM is created using the procedure being processed,
line 26. This single IM is then merged with the other sub-IMs by
invoking the mergeIMs function and the returning container is
assigned to tempMatchingIMs. If the DSC being processed in the
loop between lines 19 and 35 is not the rst DSC, then the IMs in
tempMatchingIMs are merged with the sub-IMs, line 31, and
assigned to tempMatchingIMs. If the sub-IMs container is empty
then the temporary variable tempMatchingIMs is cleared, since
no IMs are returned from the recursive call.
9:
10:
11:
12:
13:
14:
15:
16:
returned /
for all parentIM 2 parentIM_List do
/ Loops through subIM list and creates a new IM for
each subIM /
for all subIM 2 subIM_List do
/ Performs a deep clone of the parent IM to
the new IM /
newIM
deepClone(parentIM)
/ Adds the subIM procedure list to the root of
newIM/
newIM.addSubtree(subIM)
newIM_List.add(newIM)
end for
end for
return newIM_List
end function
The mergeIMs function, shown in Algorithm 2, takes two parameters, a parent IM list and a sub-IM list. The sub-IMs represent a
set of IMs where the root of each IM is a child of a parent IMs. The
merge function replicates the parent IM for each of the IMs in the
sub-IM list. For example, given a list of 3 parent IMs and a list of 4
sub-IMs the merge returns a list with 12 IMs, representing the new
parent list in the calling function.
A consequence of our method of dening and dynamically composing models based on types is model space explosion. In theory,
an idealized set of procedures may produce an excessively large
number of intent models that match a particular command. The
issue arises due to the Maximum Product Partition problem [16],
where for a given set of procedures P, there exists a partitioning
based on DSCs that creates a maximal number of models. While
this may not prove to be a limiting factor in practice, as a typical
command may only relate to a small subset of the available procedures, it is still a motivating factor for addressing optimization
concerns in the design and implementation of the various facets
of the middleware, and will be addressed in future work.
31
6.1.1. IM generator
Fig. 11 shows the components used in the generation, selection
and validation of IMs. The Generator class is responsible for generating the IM to be used by the im_executor in the interpreter.
As previously described, IMs are generated using Algorithms 1
and 2 presented in Section 5.4. The Generator class accesses
Selector
+getBestModel()
+generateIMs()
+mergeIMs()
m_repository
m_exceptions
se::SE_EventHandler
broker::Broker_M_Interface
m_events
Fig. 9. Package diagram showing the main components in the DSVM middleware.
m_manager::Mng_Contoller
Interpreter_Controller
im_executor
M_SE_Interface
m_manager
+validateModels()
m_intentModel
m_repository
m_interpreter
Validator
Generator
m_events::Evt_Controller
im_generator
m_repository
broker::Broker_M_Interface
m_intentModel
Fig. 10. Class diagram for the m_interpreter package in the DSVM middleware.
32
the list of persistent DSCs, procedures and execution units from the
middleware repository, and uses the package m_intentModel to
build the IMs. After all the IMs have been built the Generator
class invokes the Validator class to ensure that each IM satises
the constraints placed on the IM by user-dened or system policies. Currently, our approach to IM validation involves walking
the graph of the IM to determine the presence or absence of a procedure classied by a specied DSC. We plan to develop a more
robust method of validation in future work.
After building the set of IMs based on the control script command received by the middleware, the Selector class identies
the most appropriate IM for execution through a domain-specic
cost analysis mechanism. For example, in our prototype we dene
the function f IM such that
f IM
n1
X
costIMi
i0
State
-name : String
-value : Object
1..*
singleton
StateManager
-manager : StateManager
+persistState(in obj : Object)
broker::Broker_M_Interface
EUCall
1
DSCCall
-dsc : DSC
EventWaitCall
-eventId : String
Call
-eUId : String
* 1
Executor
-model : IntentModel
-currentProcedure : Procedure
+executeIM(in im : IntentModel)
+executeProc(in p : Procedure)
+executeEU(in eu : ExecutionUnit)
+loadProc(in p : Procedure)
+reenterProc(in callingP : Procedure)
org.compiler.library
m_intentModel
m_events::EventRegister
* m_events::EventCallBack
-modelId : String
-callbackProcDSC : DSC
-eUId : String
33
/ generateIMs(initlDSC, procList)
2.ProcessCmd
cmdReceived / processCmd(Cmd)
/ generateIMs(initDSC, procList)
5.PreambleExecuted
im_Generated [!preExecCond] / executeIM(im)
1.Ready
[preambleSatisfied] / executeIM(im)
3. ProcessEvt
evtReceived / processEvt(Evt)
[!preambleSatisfied] / exception
6.ExecuteModel
[callBack] / executeIM(im)
1.Ready
Fig. 13. State machine for processing a command or event in the middleware interpreter.
event. After the model and sate are made persistent the machine
goes into the Ready state.
7. Experimental study
In this section we describe experiments to evaluate the efciency and efcacy of a prototype implementation of our DSVM
middleware using the design described in Section 6. We compare
the results of the user-centric middleware (UCM) using both the
new design, in our prototype, against the previous implementation of the UCM using the design presented in Deng et al. [15]
and summarized in Section 8.3. In order to perform the experiments needed to evaluate the two implementations a set of procedures and appropriate DSCs were created for scenarios in the
user-centric communication domain that allowed us to use the
new UCM prototype. Additionally, we compared our new prototype to the performance of another architecture OpenCOM
[14] that employs dynamic component composition in its
execution. Following are the objectives of our experimental
study:
1. Determine the execution time overhead for the intent model
(IM) generation process in our middleware for a standard
domain deployment.
2. Compare operation execution times between the previous
implementation of the UCM using a domain-coupled design
and the new design that decouples the domain-specic knowledge (DSK) from the model of execution (MoE).
2.ModelReceived
[typeOf(DSCCall)] / loadProc(proc)
[typeOf(EUCall)] / executeEU(eu)
/ loadProc(initProc)
3.ProcedureLoaded
1.Ready
5.ModelPersisted
[!callback] / executeEU(initEU)
[return && initProc]
[callback] / executeEU(callbackEU)
1.Ready
34
provided procedures, 10 were designed to either match the operation of the test command, or meet a dependency such that they
would realize the maximum partition sum bound [16]. The other
90 procedures simply added to the middewares workload to
ensure the system would analyze a large set of procedures while
only selecting a subset, as would be expected during normal operation. This meant we would generate the largest possible set of wellformed IMs from this set of 10 procedures. Based on Wu et al. [54],
we claim that this workload supersedes the basic requirements of
the communication domain, and therefore provides a valid analysis
of the expected overhead generated by our approach.
The entire process was performed using procedure descriptors
(meta-data) which can be loaded independently of the execution
units. These descriptors contain information on the classication
of procedures, as well as their dependencies.
7.1.3. Setup
Experiments were performed on a 64-bit Fedora Linux based
machine with 4.00 GB of memory and a quad core Intel i7 4-core
CPU clocked at 1.8 GHz per core. Our system ran the OpenJDK
JRE version 1.7.
7.1.4. Process
As detailed in Listing 1, we rst created a set of 10 procedures
and associated DSCs from the communication domain that would
result in the desired set of generated intent models.
35
In Listing 2 we generated a set of dummy procedures to simulate the existence of resources not associated with the current
command being executed.
Finally, in Listing 3 we perform the model generation, validation
and selection steps detailed in Section 6.1.1:
7.1.5. Results
Our set of 100 procedures resulted in the generation of 36 IMs
(3 3 2 2) which are detailed below. We validated our model
against a DSC known to be present in all IMs, therefore ensuring
that no models were eliminated from the candidate list, and
passing all 36 models to the model selection phase. Finally our prototype selected a model for execution based on procedure count,
this selection was done using our naive cost analysis implementation that uses the number of procedures as the cost factor. The
evaluation results are presented in Table 3.
7.1.6. Discussion
The values in Table 3 provide us some guidance on the expected
execution times involved in generating, validating and selecting
IMs in response to commands and events. We perform one round
of model generation steps (generation, validation and selection)
for each cycle. The increase in cycles was performed to measure
the middlewares response under consistent requests, and was
chosen to exceed the expected workload of the domains currently
being investigated.
Recall we used the procedure descriptors to generate the IMs
that can be loaded independently of the execution units. This
reduces the overall memory footprint of a procedure to the bare
minimum required for the generation of an IM. Execution units
need only be fetched into memory at the time of execution. As
the results of our prototype evaluation show, we are able to perform the full generation, validation and selection process in the
order of micro seconds. We believe that these results demonstrate
the appropriateness of our architecture for many domains, even
those that may have a very high responsiveness requirement such
as smart electrical grid management [2].
As depicted in Table 3 and illustrated in Fig. 15, we are not only
able to generate intent models within the requirements of highresponse domains [3], but we are also able to generate these intent
models with increasing efciency as we increase cycles. This is due
Table 3
Model generation timing.
Generation cycles
1
10
100
1000
10,000
100,000
Max
Average
Total
114
10
3
1
1
1
144
105
108
111
112
118
114
36
8
2
1
1
114
366
817
2205
13,632
125,899
Table 4
Static metrics for the two versions of the UCM.
Packages
Classes
Methods
LoC
5
14
26
33
103
117
1402
1176
Model generation
Time (ms)
36
Component loading
5000
4500
4000
3500
3000
2500
2000
1500
1000
500
0
Unencrypted
Context-aware
unencrypted
Encrypted
Context-aware
encrypted
Fig. 16. Execution times (in ms) for the variable le transfer operation.
37
Context-aware transfer
50
45
40
Time (s)
35
30
25
20
15
10
5
0
100% Encrypted
50/50
100% Unencrypted
Fig. 17. Execution times (in s) for the simulated transfer of 10 les.
for the CVM, containing UCM version 1, were taken from the
healthcare domain, which has strict security constraints. Alternatively, the le transfer operations could have been done without
encrypting the les and the execution time would be a horizontal
line lying between 10 and 15 s. Note however, this would be a
violation of the healthcare privacy law [48].
7.2.5. Discussion
As both systems incorporate Java language reection through
runtime code compilation and loading, they both experience
degraded performance compared to direct execution of an operation in a non-adaptable system. However, as UCM version 1 does
not incorporate any context-aware adaptation, and because it does
not compose its operational facilities from multiple components, it
has a slight advantage in arriving at the point of execution a little
faster compared to our proposed solution. Acknowledging this disparity, we make the following observations:
1. Although slower on arriving at an execution plan due to IM generation, UCM version 2 can achieve much lower execution times
by composing its IMs from more efcient procedures based on
system context. As an example, consider the case of removing
the requirement of including an encryption procedure when
performing a le transfer if the current connection or network
is already secure.
2. Due to the lack of policy awareness within the UCM version 1,
the CVM must expose operational variability at the language
level. This will invariably: (1) increase the complexity of designing a CML model as there are more elements in the language
and (2) decrease the level of assurance in the execution of an
operation as a CML model may incorporate elements which
do not comply with current system policies.
3. To reduce the number of cases of CML models not meeting
needed business policies (such as HIPAA [48]), and to mitigate
the necessity of modifying those CML models by users that
may lack the necessary technical knowledge, CML models
designed for UCM version 1 may choose the most strict operations (such as encrypted le transfers in place of unencrypted).
This design choice, which addresses the issues listed, may result
in longer execution times than is required as the current system
context may not, for instance, require that a le be encrypted
prior to transfer.
DSVM
OpenCOM
Intent Model
Procedure
DSC Interface denition
DSC Dependency
DSC Action
Capsule
Component
Interface
Receptacle
API
38
7.3.3. Method
We compared the operating time of our middleware architecture to an extrapolation of published results for OpenCOM. We
then analyzed variables that could potentially lead to the differences in performance.
7.3.4. Setup
We refer to the previously stated results in experiment 1 for the
operating time of our middleware to generate, validate, and select
a model for execution. These are compared to the published results
for OpenCOM [13], where the experiment undertaken involved the
reconguration of a capsule that switched one component for
another. In both experiments, all operations were rst class, with
no domain specic execution. The results only demonstrate the
time taken for the reconguration of the executing artifact in the
case of OpenCOM, or for the regeneration, validation and selection
of an intent model in the case of the DSVM middleware. Both systems were evaluated with varying hardware and software proles.
One of the more salient variables in the experiment is the age of
the original study. To address this issue, we approximate the relative execution speed-up of OpenCOM based on studies of CPU
improvements for single-threaded workloads [35,37]. The potential effects of this threat are detailed in the discussion in subsequent subsections, Discussion and Threats to Validity. Additionally,
the results published in [13] were presented as a line graph in lieu
of tabular data. As a result, we present their measurements as
approximations instead of absolute values.
7.3.5. Results
Table 6 shows the time taken for the reconguration of components in OpenCOM and the regeneration, validation and selection
of intent models in DSVM. The leftmost column shows the number
of cycles, the center column the time in millisecond for DSVM, and
the rightmost column the approximate times for OpenCOM. The
results are also shown as a line graph in Fig. 18, the x-axis represents the number of cycles and the y-axis the time in milliseconds.
7.3.6. Discussion
As depicted in Table 6 and Fig. 18, the execution times for the
DSVM middleware are slightly lower than those of OpenCOM for
workloads of 100 cycles or fewer. This nding was based on reports
of CPU speeds for single-threaded systems by Patterson et al. [35]
and Preshing [37], which stated that computing power had
increased approximately 20% for each of the 10 years prior to
2012. With this, we extrapolated the approximate execution times
for OpenCOM on comparable hardware to that used to perform
DSVM experiments. We concluded that the DSVM approach is at
least equally as fast as OpenCOM for small workloads, i.e., up to
100 cycles, while for larger workloads up to 10,000 cycles in
our experiments OpenCOM outperforms our architecture by just
under 5 to 1.
We stress again that there are more high level steps involved in
the generation and selection of an intent model as compered to
swapping a single component in a capsule. We believe this
Table 6
Middleware operations execution times.
Cycles
1
10
100
1000
10,000
OpenCOM
114
366
817
2205
13,632
920
960
1000
1200
2880
39
list of rst-class concerns facilitates easy development of applications that possess these characteristics. While this programming
model is desirable in many instances, it may limit the applicability
of the architecture in some domains, or increase the complexity of
development as the model may not be apropos for the task at hand.
As a result of the domain independence of our approach, our architecture does not enumerate any potential concerns and therefore
provide fewer high level abstractions that would aid in addressing
them. This helps to limit the presence of superuous functionality
of our middleware once it has been specialized for a specic
domain as all rst-class operations relate solely to the middlewares internal operations and are not directly accessible via the
programming model.
8.3. User-centric communication middleware
The User-centric Communication Middleware (UCM) is the layer of the CVM charged with ensuring the delivery of services resulting from the synthesis of a communication model by the Synthesis
Engine (SE) [56,53]. Upon completion of the model synthesis process, the SE packages and delivers a control script, which is an
ordered set of commands, to the UCM. The list of control script
commands used in the CVM is shown in Fig. 3. It is the job of the
UCM to realize the intent of the user by performing the necessary
operations described by the commands found in the control script
while adhering to the non-functional requirements of the system
based on available state information. This may require the UCM
to determine at runtime what the semantics of a particular command should be based on the current system context.
The current implementation of the UCM proposed by Deng et al.
[15], whose design is shown in Fig. 19, performs its functions
through runtime adaptation of its operations using structural
reection [10]. However it is not policy aware, and is therefore
unable to incorporate context into its adaptation requirements.
In its current incarnation, the DSML of the CVM must expose variability of its operations in the language and places the burden of
complying with business rules and policies on the creator of the
CML schema. While the CVM as a whole does incorporate the use
of policies in specic layers [7], the UCM is not party to any policy
knowledge. Our implementation of the DSVM middleware layer
UCM
UCM-SE Interface
UCM Manager
Exception
Handler
Loader
UCM Interpreter
Local
Respoistory
(macros, logging
facility)
NCB-specific
commands
Event Handler
UCM-NCB Interface
Fig. 19. UCM architecture used in the rst version of the CVM [15].
40
Table A.7
Network communication broker API available to the user-centric communication middleware.
Returns
Signature
Comments
Void
Void
UserProle
Void
Void
NCB_M_Facade
Boolean
UserObject
Void
Void
Void
Void
UserSchema
Boolean
Boolean
Boolean
Boolean
addParty(String, String)
createSession(String)
createUserProle(UserObject, Object)
disableMedium(String, String)
enableMedium(String, String)
getInstance()
isCreatedSession(String)
login(String, String)
logout(String)
mapConnToSession(String, String)
removeParty(String, String)
resetNCB()
retrieveSchemas(String, String)
saveSchema(Object)
sendMedia(String, String, String)
sendSchema(String, String, String, String)
sendSchema(String, String, String, String, String)
Acknowledgment
This work was supported in part by a GAANN Fellowship from
the US Department of Education under P200A090061. Fbio M.
Costa would like to thank CAPES, Brazil, Proc. No. BEX 0759/11-2,
for the support received during his sabbatical at FIU.
9. Conclusions
Appendix A. Network communication broker API
In this article we presented an adaptive middleware design for
domain-specic virtual machines (DSVM). This design dynamically
integrates decoupled domain-specic knowledge (DSK) and a
model of execution (MoE) to support the delivery of domain-specic services. The DSK is captured through the use of procedures
which perform operations relevant to the domain, and a set of
domain specic classiers that categorize them. The MoE provides
a platform where procedures and classiers are dynamically loaded and executed based on the context in which a request is made
by the layers surrounding the DSVM middleware. Experiments
were performed to determine the overhead required by the proposed design and the results show that the increased execution
times are acceptable given the functionality of the middleware.
Our approach to dynamically composing intent models result in
quadratic space and time complexity, which, for the domains
under analysis and supported by experiments, result in manageable overhead in the model generation process when compared
to the operations of the original middleware design. Our approach
also provides benets in overall operation execution time due to its
ability to determine at runtime the optimum execution path.
Our work on the DSVM middleware has identied several questions that require further investigation in order to fully realize the
true potential of our middleware design. Some of these questions
focus on optimization of the MoE, such as, the pre-generation of
models representing the procedures and domain-specic classiers, and a caching mechanism that provides a smarter approach
to generating models. Other questions will focus on the selection
of the most appropriate model when multiple models apply based
on the context of the request. We have recently developed an
approach to formally validate dynamic models, representing the
users intent, to ensure they conform to user policies; however,
we still need to perform a comprehensive set of experiments to
validate our approach. Finally, we intend to expand on the current
naive approach to intent model validation by investigating formal
model checking and associated approaches to provide a more
robust mechanism for evaluating the adequacy of executing a
model given current system context.
Table A.7.
References
[1] M. Allison, A.A. Allen, Z. Yang, P.J. Clarke, A software engineering approach to
user-driven control of the microgrid, in: Proceedings of the Twenty-Third
International Conference on Software Engineering and Knowledge Engineering
(SEKE 2011), Knowledge Systems Institute, 2011, pp. 5964.
[2] M. Allison, K. Morris, Z. Yang, P. Clarke, F. Costa, Towards reliable smart
microgrid behavior using runtime model synthesis, in: 2012 IEEE 14th
International Symposium on High-Assurance Systems Engineering (HASE),
2012, pp. 185192.
[3] M. Allison, K.A. Morris, F.M. Costa, P.J. Clarke, Synthesizing interpreted
domain-specic models to manage smart microgrids, J. Syst. Softw. 96 (0)
(2014)
172193.
<http://www.sciencedirect.com/science/article/pii/
S0164121214001435>.
[4] S. Bandyopadhyay, M. Sengupta, S. Maiti, S. Dutta, A survey of middleware for
internet of things, in: A. zcan, J. Zizka, D. Nagamalai (Eds.), Recent Trends in
Wireless and Mobile Networks, Communications in Computer and Information
Science, vol. 162, Springer, Berlin Heidelberg, 2011, pp. 288296. http://dx.doi.
org/10.1007/978-3-642-21937-5_27.
[5] U. Bellur, N. Narendra, Towards a programming model and middleware
architecture for self-conguring systems, in: First International Conference on
Communication System Software and Middleware, 2006, Comsware 2006,
2006, pp. 16.
[6] P.A. Bernstein, Middleware: a model for distributed system services, Commun.
ACM 39 (2) (1996) 8698. http://doi.acm.org/10.1145/230798.230809.
[7] P. Boettner, M. Gupta, Y. Wu, A.A. Allen, Towards policy driven selfconguration of user-centric communication, in: Proceedings of the 47th
Annual Southeast Regional Conference, ACM-SE 47, ACM, New York, NY, USA,
2009, pp. 35:135:6. http://doi.acm.org/10.1145/1566445.1566493.
[8] K. Chen, J. Sztipanovits, S. Abdelwalhed, E. Jackson, Semantic anchoring with
model transformations, in: Model Driven ArchitectureFoundations and
Applications, Springer, 2005, pp. 115129.
[9] B.H. Cheng, R. Lemos, H. Giese, P. Inverardi, J. Magee, J. Andersson, B. Becker, N.
Bencomo, Y. Brun, B. Cukic, G. Marzo Serugendo, S. Dustdar, A. Finkelstein, C.
Gacek, K. Geihs, V. Grassi, G. Karsai, H.M. Kienle, J. Kramer, M. Litoiu, S. Malek,
R. Mirandola, H.A. Mller, S. Park, M. Shaw, M. Tichy, M. Tivoli, D. Weyns, J.
Whittle, Software engineering for self-adaptive systems: a research roadmap,
in: B.H. Cheng, R. Lemos, H. Giese, P. Inverardi, J. Magee (Eds.), Software
Engineering for Self-Adaptive Systems, Springer-Verlag, Berlin, Heidelberg,
2009, pp. 126.
[10] S. Chiba, Load-time structural reection in java, in: ECOOP 2000 ObjectOriented Programming, Springer, 2000, pp. 313336.
[11] P.J. Clarke, Y. Wu, A.A. Allen, F. Hernandez, M. Allison, R. France, Towards
dynamic semantics for synthesizing domain-specic models, in: M. Mernik
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
[22]
[23]
[24]
[25]
[26]
[27]
[28]
[29]
[30]
[31]
[32]
[33]
[34]
41
[35] D.A. Patterson, J.L. Hennessy, Computer Organization and Design, fth ed., The
Hardware/Software Interface, Morgan Kaufmann Publishers Inc., San
Francisco, CA, USA, 2013.
[36] G.D. Plotkin, A structural approach to operational semantics, J. Log. Algebr.
Program. 6061 (2004) 17139.
[37] J. Preshing, A look back at single-threaded cpu performance, Blog Preshing on
Programming, February 2012 <http://preshing.com/20120208/a-look-back-atsingle-threaded-cpu-performance/> (February 2015).
[38] S. Ramanathan, I. Rodriguez, K. Drira, Adaptive middleware architecture for
group communication activities, in: 11th Annual International Conference on
New Technologies of Distributed Systems (NOTERE), 2011, 2011, pp. 17.
[39] V. Raychoudhury, J. Cao, M. Kumar, D. Zhang, Middleware for pervasive
computing: a survey, Pervasive Mob. Comput. 9 (2) (2013) 177200. http://
dx.doi.org/10.1016/j.pmcj.2012.08.006.
[40] S.M. Sadjadi, A Survey of Adaptive Middleware, Tech. Rep. MSU-CSE-03-35,
Michigan State University, 2003.
[41] D.C. Schmidt, F. Buschmann, Patterns, frameworks, and middleware: their
synergistic relationships, in: Proceedings of the 25th International Conference
on Software Engineering, ICSE 03, IEEE Computer Society, Washington, DC,
USA, 2003, pp. 694704. <http://dl.acm.org/citation.cfm?id=776816.776917>.
[42] J. Smith, R. Nair, The architecture of virtual machines, Computer 38 (5) (2005)
3238.
[43] T. Stahl, M. Voelter, J. Bettin, A. Haase, S. Helsen, K. Czarnecki, Model-Driven
Software Development: Technology, Engineering, Management, rst ed., John
Wiley & Sons, 2006.
[44] S.W. Suthon, G.M. Ong, H. Pung, An adaptive end-to-end qos management
with dynamic protocol congurations, in: 10th IEEE International Conference
on Networks, 2002, ICON 2002, 2002, pp. 106111.
[45] C. Szyperski, Component Software: Beyond Object-Oriented Programming,
Pearson Education, 2002.
[46] J.-Y. Tigli, S. Lavirotte, G. Rey, V. Hourdin, D. Cheung-Foo-Wo, E. Callegari, M.
Riveill, Wcomp middleware for ubiquitous computing: aspects and composite
event-based web services, Ann. Telecommun. Ann. Tlcommun. 64 (34)
(2009) 197214. http://dx.doi.org/10.1007/s12243-008-0081-y.
[47] A. Tsutsui, H. Maeomiti, R. Kawamura, K. Yata, An adaptive communication
middleware for network service coordination, in: First IEEE Consumer
Communications and Networking Conference, 2004, CCNC 2004, 2004, pp.
406411.
[48] United States Congress, Health Insurance Portability and Accountability Act,
US Department of Health & Human Services, 1996.
[49] A. Unkrig, M. Fowles, Janino, October 2013 <http://docs.codehaus.org/display/
JANINO/Home>.
[50] P. Verssimo, V. Cahill, A. Casimiro, K. Cheverst, A. Friday, J. Kaiser, Cortex:
towards supporting autonomous and cooperating sentient entities, in:
Proceedings of European Wireless 2002, Florence, Italy, February 2002, pp.
595601.
[51] S. Vinoski, An overview of middleware, in: A. Llamos, A. Strohmeier (Eds.),
Reliable Software Technologies Ada-Europe 2004, Lecture Notes in Computer
Science, vol. 3063, Springer, Berlin Heidelberg, 2004, pp. 3551.
[52] X. Wang, M. Chen, H.-M. Huang, V. Subramonian, C. Lu, C. Gill, Control-based
adaptive middleware for real-time image transmission over bandwidthconstrained networks, IEEE Trans. Paral. Distrib. Syst. 19 (6) (2008) 779793.
[53] Y. Wu, A. Allan, Y. Wang, F. Hernandez, P.J. Clarke, Y. Deng, A user-centric
communication middleware for CVM, Softw. Eng. Appl. (2008).
[54] Y. Wu, A.A. Allen, F. Hernandez, R. France, P.J. Clarke, A domain-specic
modeling approach to realizing user-centric communication, Softw.: Pract.
Exper. 42 (3) (2012) 357390. http://dx.doi.org/10.1002/spe.1081.
[55] S. Zachariadis, C. Mascolo, W. Emmerich, The SATIN component system-a
metamodel for engineering adaptable mobile systems, IEEE Trans. Softw. Eng.
32 (11) (2006) 910927.
[56] C. Zhang, S.M. Sadjadi, W. Sun, R. Rangaswami, Y. Deng, User-Centric
Communication Middleware, Tech. Rep. FIU-SCIS-2005-11-01, Florida
International University, 2005.