A Platform For Smart Object Virtualization and Composition
A Platform For Smart Object Virtualization and Composition
A Platform For Smart Object Virtualization and Composition
SYSTEM REQUIREMENTS
AEP was designed to satisfy a set of requirements; this is identified by
analyzing the functional features and the nonfunctional characteristics of the
service scenarios in some of our previous works in the domains of smart
home ,smart car, and smart city.
SYSTEM DESIGN
Fig. 3.1 shows the architecture of AEP, a software platform supporting
the execution of composite applications (CAs): each CA is specified and
executed through the coordinated action of a set of VBs. VBs are atomic,
modular, and reusable software components wrapping/abstracting SOs but
alsoWeb APIs,and data sources to make these functionalities composable
into CAs.
3.2. Orchestrator
with the possibility that VBs become unavailable for unexpected reasons,
each VB must periodically refresh its state. The same set of primitives
offered by the PS is used by other components of the platform to monitor the
evolution of the VB set in a given SA and their state changes. For instance,
in the architecture depicted in Fig. 1, an Orchestrator interacts with the PS to
receive events on availability and state changes of the VBs involved in the
execution of a specific service: in this way, the Orchestrator is constantly
aware of the current state of each VB; it can, therefore, recognize whether a
VB needed during service execution is currently available, in compliance
with the late binding feature . In addition, the PS has to check whether the
Orchestrator is allowed to monitor the state of a given VB. The second
element of the dynamic registry, the VB List, is in charge of associating the
VBs available in the system with their static characteristics, such as the
location of fixed objects and nonfunctional properties, including the VB
type, i.e., the (semantic) description of its behavior and of its service request
and done primitives. The VB list supports service configuration and late
binding by enabling the retrieval of the VBs that fulfill specific
characteristics (e.g., location, supported functional, and nonfunctional
properties). This is performed by applying (semantic) match between the
characteristics of the requested VB and the characteristics of the objects
registered in the system. The list of selected VBs is constantly updated by
the PS by considering availability and state.
IMPLEMENTATION
4.1. Concurrency
The core of the AEP consists of an Orchestrator that interacts with a
set of VBs. The Orchestrator is implemented by a software component called
Orchestration manager (OM), whereas VBs are implemented by software
components called VB managers (VBM). While the OM and the VBMs
interact in a local environment where latencies are negligible, the VBMs
typically interact with real objects on wide area connections, often over the
Internet, where network latency is a critical issue. The presence of a huge
number of connections in a wait state forces the adoption of a concurrency
model based on asynchronous I/O which decouples network connections
from threads. VBM was so implemented using Java NIO technology (i.e.,
the Java library for asynchronous I/O management) and appears as a single
thread implementing a forever loop the iteration of which consists of the
nonblocking event handlers associated to the different network events such
as CONNECT (TCP connection established) and READ (new data
available on the socket). The Orchestrator manager (OM) never performs
blocking operations as it only has to select the next VBs to be activated at
the termination of each VB. As a consequence VBM does not need a
dedicated thread but, on the contrary, it can be implemented as a plain
software component, i.e., using Java terminology, as a plain old Java object
(POJO). The technical issues concerned with the development of the event-
4.2.Parallelization Models
Two alternative parallelization models to support executing an
increasing number of sessions and both exploit the replication of AEP
nodes . The first approach is to replicate the VBM and the OM components
separately on different physical nodes and to provide a message-based
interaction system supporting communication among components(see
Fig.4.2.1) . In such an environment, the VB_Request and the VB_Done
primitives travel in messages are queued at destination and are processed
one at a time, typically in a first-come-first-served order. As far as session
management is concerned, sessions might be tied statically to a specific OM
node (i.e., all the VB_Request/VB_Done messages are managed by the same
OM for the entire session execution), but such a choice might limit the
scalability of the system because it does not allow dynamic distribution of
the workload on all the available OM nodes. The time needed to perform
one orchestration step (i.e., the time spent between one VB_Done primitive
and the following VB_Request primitive) is:
TOTOT = TN + TFW + To (1)
where:
TN is the latency introduced by the network, as the OM and the VBM
components run on different nodes;
TFW is the time employed by the message oriented communication system
to manage message exchange. This value includes both a constant
component (e.g., the parsing of the incoming messages) and a variable
component (e.g., the time spent by the messages in the queue, which
depends on their number);
To is the time needed by OM to discover the next VB(s). As shown in [11],
TN + TFW >> To, which means that thetime spent for the actual
orchestration phase is much lower than the time spent for network
communication and framework management operations. It follows that
improved system performance requires a reduction of management
operations. The method described in the next paragraph solves this problem.
Fig. 4.2.1.Parallel session execution over a distributed memory computation
model
means that on each node both the OM and the VBM run together (e.g., in the
same JVM as POJOs in case of a Java-based solution) without relying on
any underlying framework. Each OM can interact only with the VBM
running on the same machine and vice-versa(see Fig.4.2.2.). In this case,
session execution can be parallelized at a coarser granularity level by
associating each session with a specific computational node and distributing
the sessions over the available computational nodes. A session starting its
execution on a specific machine is completely executed on that node, with
the consequence that load balancing must be applied at session start time. In
this latter approach, the fact that both the OM and the VBM run in the same
machine leads to the possibility for the VB_Request primitive and the
VB_Done primitive to be implemented as regular method invocations (i.e.,
they do not require distributed component interaction). In this case, the time
needed to perform an orchestration step is
TOTOT = TNIO + To (2)
where TNIO is the time needed to manage the nonblocking I/O, which is
constant and, thanks to its asynchronous nature, independent from the actual
duration of the connection-oriented interaction with the external service and
To is the time needed by OM to discover the next VB(s).
Session Properties
All the properties have a unique name given by the concatenation of a
VB unique name and a property unique name. For instance, in the property
ParkingService.0.userLongitude, ParkingService.0 is the VB unique name
(the number is needed to distinguish other ParkingService VBs in the same
CA), whereas userLongitude is the property unique name. The CAs logic
specifies how the properties are updated
EXPERIMENT
We now describe the experiments performed to analyze the
performances of the concurrency model described. In order to provide an
evaluation of the AEP, we developed two versions of a CA comprising a
chain of 5 and 10 VBs, which is the typical CA size. Each VB is a parking
service VB, which interacts with aWeb service simulating the real open data
API (i.e., we are simulating what we called the back-end service ). In
Fig. 6.3. Comparison event driven versus thread models when the CA has 10
VBs.
We measured the average execution time for the CA to see how the
threading model affects this important value. Figs. 6.2 and 6.3 show how the
event-driven model outperforms the thread-based model since the CA
execution time is always lower regardless the number of VBs belonging to
the CA. In particular, the benefit of the event-driven model increases with
the input rate. This is mainly due to the fact that the number of threads that
are active in the system concurrently increases considerably for the threadbased AEP, whereas the same parameter is constant (and low) for the eventdriven AEP. Figs. 6.4.6.6. show the empirical cumulative distribution
function (cdf) of the execution times of the 5 VB CA using an event driven
concurrency model (Fig. 6.4.) and a thread-based concurrency model (Fig.
6.5.).
Fig. 6.4. CDF for the event driven/async model.
Fig. 6.5. CDF for the thread model.
We observe that while in the event driven case the service execution
times follow a normal distribution, on the contrary in the thread-based model
CONCLUSION
AEP is a possible contribution to some of the research challenges in
the IoT domain. In particular, it proposes an open framework for the
definition, deployment, and execution of IoT applications. This propose a set
of requirements for software platforms that host CAs combining
heterogeneous SOs. The dynamicity of the IoT application scenario poses
many challenges: we describe an architecture and a related implementation
of an IoT service platform that addresses most of the identified
requirements. In particular, the VB concept cope with device heterogeneity
and to support the orchestration of smart objects in complex IoT
applications. A late binding mechanism, using a semantic description of
smart objects, is proposed as a basic mechanism for implementing a context
aware and self-adapting platform. Such a mechanism requires a universally
accepted ontology for smart object description. Finally focus on some
implementation details including concurrency and scalability, and describe
and compare two different deployment models, one based on smart object
distribution and one based on complex application distribution.
REFERENCES
[1]
[2]
[3]
[4]
[5]
http://www.slideshare.com
information
of Things,