pervasive service bus: smart soa infrastructure for ambient intelligence

9
52 1541-1672/14/$31.00 © 2014 IEEE IEEE INTELLIGENT SYSTEMS Published by the IEEE Computer Society Pervasive Service Bus: Smart SOA Infrastructure for Ambient Intelligence Gang Pan, Li Zhang, Zhaohui Wu, and Shijian Li, Zhejiang University Laurence Yang and Man Lin, St. Francis Xavier University Yuanchun Shi, Tsinghua University Although ambient intelligence (AmI) aims to make environments sensitive, adaptive, and responsive to people, building efficient AmI infrastructures is challenging. The Pervasive Service Bus framework addresses these challenges by modeling computing activities as unified pervasive services. appliances (such as air conditioners and re- frigerators), ordinary physical objects (such as doors, windows, cups, and clothes) are be- coming computational and interactive. These devices can be connected to serve people in everyday life in an easy, natural way. As our living environment grows increasingly smart, it will be able to sense our behaviors and con- texts, and serve us adaptively and continu- ously via the environmental infrastructure. 3–5 However, it’s still highly challenging to build a general infrastructure for AmI, mainly due to issues related to system heterogeneity, en- vironmental dynamics, and human mobility: Interoperation. Heterogeneity in the net- work protocols and data formats that dif- ferent software and devices adopt makes their interaction difficult. Smartness. Systems must perceive user re- quirements and automate computing resources to serve them adaptively in a non- intrusive way. User experience. It’s challenging to keep services with low latency, high continuity, and reliability in a dynamic environment with frequent interactions. Scalability. The infrastructure must be scalable to deal with the growth of con- sumers, devices, applications, and space coverage. Here, we describe Pervasive Service Bus (PSB), a smart framework for building AmI systems based on service-oriented architecture (SOA). (For others’ work in this area, see the related sidebar.) In PSB, all the computing ac- tivities from hardware devices to software com- ponents are encapsulated as pervasive services defined by a uniform semantic model. Hetero- geneous pervasive services are connected with a software bus to achieve interoperation and R apid penetration of ambient intelligence (AmI) into human daily life has filled our living environments with visible and hidden digital devices, leading to a deep convergence of physical environments and cyberspace. 1,2 In addition to our personal devices (such as laptops and smart phones) and home SMART ARCHITECTURES

Upload: yuanchun

Post on 14-Apr-2017

219 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Pervasive Service Bus: Smart SOA Infrastructure for Ambient Intelligence

52 1541-1672/14/$31.00 © 2014 IEEE IEEE INTELLIGENT SYSTEMSPublished by the IEEE Computer Society

Pervasive Service Bus: Smart SOA Infrastructure for Ambient IntelligenceGang Pan, Li Zhang, Zhaohui Wu, and Shijian Li, Zhejiang University

Laurence Yang and Man Lin, St. Francis Xavier University

Yuanchun Shi, Tsinghua University

Although ambient

intelligence (AmI)

aims to make

environments

sensitive, adaptive,

and responsive to

people, building

efficient AmI

infrastructures is

challenging. The

Pervasive Service Bus

framework addresses

these challenges by

modeling computing

activities as unified

pervasive services.

appliances (such as air conditioners and re-frigerators), ordinary physical objects (such as doors, windows, cups, and clothes) are be-coming computational and interactive. These devices can be connected to serve people in everyday life in an easy, natural way. As our living environment grows increasingly smart, it will be able to sense our behaviors and con-texts, and serve us adaptively and continu-ously via the environmental infrastructure.3–5 However, it’s still highly challenging to build a general infrastructure for AmI, mainly due to issues related to system heterogeneity, en-vironmental dynamics, and human mobility:

• Interoperation. Heterogeneity in the net-work protocols and data formats that dif-ferent software and devices adopt makes their interaction difficult.

• Smartness. Systems must perceive user re-quirements and automate computing

resources to serve them adaptively in a non-intrusive way.

•User experience. It’s challenging to keep services with low latency, high continuity, and reliability in a dynamic environment with frequent interactions.

• Scalability. The infrastructure must be scalable to deal with the growth of con-sumers, devices, applications, and space coverage.

Here, we describe Pervasive Service Bus (PSB), a smart framework for building AmI systems based on service-oriented architecture (SOA). (For others’ work in this area, see the related sidebar.) In PSB, all the computing ac-tivities from hardware devices to software com-ponents are encapsulated as pervasive services defined by a uniform semantic model. Hetero-geneous pervasive services are connected with a software bus to achieve interoperation and

Rapid penetration of ambient intelligence (AmI) into human daily life has

filled our living environments with visible and hidden digital devices,

leading to a deep convergence of physical environments and cyberspace.1,2 In

addition to our personal devices (such as laptops and smart phones) and home

S m a r t a r c h i t e c t u r e S

IS-29-04-Pan.indd 52 01/09/14 6:19 PM

Page 2: Pervasive Service Bus: Smart SOA Infrastructure for Ambient Intelligence

JuLY/AuGuST 2014 www.computer.org/intelligent 53

The goal of a service-oriented architecture (SOA) is to achieve loose coupling among interacting software agents. SOA has proven efficient for software inte-

gration, which encapsulates software into loose-coupled services and enables dynamic service reuse and integration. Our work investigated some leading SOA frameworks as follows.

Component-based SOA frameworks wrap software into components that can easily interact. For example, Sun’s Java Business Integration1 holds Java components in acces-sible containers with actual protocols such as SOAP, Java Message Service, or Enterprise Java Beans. The Service Component Architecture2 lets components implemented under different programming languages and environments seamlessly collaborate via different communication pro-tocols. However, their architectures are somehow fixed at the deployment stage. The Open Service Gateway Initiative (OSGi)3 enables runtime component deployment without reboot; however, it focuses primarily on a local, rather than distributed, environment.

The Enterprise Service Bus (ESB) framework provides a standards-based integration system that serves as a global message medium that lets heterogeneous enterprise ser-vices interact. ESB can dynamically deploy services, guar-antee reliable service interactions and mediations, and orchestrate optimal services into transactional workflows for business. Many commercial ESB products exist, including IBM Websphere, Microsoft BizTalk, and Apache ServiceMix. However, ESP lacks intelligence and dynamic adaptability.

Dimka Karastoyanova and colleagues propose a semantic service bus that extends ESB with semantics. The semantic service bus adopts an ontology to describe Web services,

and employs intelligence to make tasks of service discovery, matching, composition, and mediation more automatic and convenient.4 However, their bus didn’t consider efficiency under ambient intelligence (AmI) spaces, which include many services and users.

Globus5 is a grid computing toolkit in which heterogeneous computing resources such as CPU cycles, data storage, and network bandwidth register themselves as grid services for use on demand. Globus aims to efficiently integrate system re-sources to achieve distributed service collaboration with high performance and reliability. It’s used primarily for scientific computing applications, but is difficult for personal tasks.

Table 1 compares our PSB framework with several exist-ing mainstream SOA technologies. As the table shows, tra-ditional SOA frameworks are weak for AmI environments in several aspects, including device accessibility, adaptation, and semantics.

References 1. S Vinoski, “Java Business Integration,” IEEE Internet Comput-

ing, vol. 9, no. 4, 2005, pp. 89–91. 2. J.L. Fiadeiro, A. Lopes, and L. Bocchi, “A Formal Approach

to Service Component Architecture,” Proc. Int’l Workshop on Web Services and Formal Methods, LNCS 4184, 2006, pp.193–213.

3. OSGi Alliance, “OSGi Service Platform Release 4,” 2007; www.osgi.org/Release4/HomePage.

4. D. Karastoyanova et al., “Semantic Service Bus: Architecture and Implementation of a Next Generation Middleware,” Proc. IEEE 23rd Int’l Conf. Data Eng. Workshop, 2007, pp. 347–354.

5. I. Foster, “Globus Toolkit Version 4: Software for Service- Oriented Systems,” Proc. Int’l Conf. Network and Parallel Computing, LNCS 3779, 2006, pp. 2–13.

related Work in Service-Oriented architecture

Table 1. Comparison of PSB with Mainstream Service-Oriented Architectures (SOAs).

Category

Java Business Integration (JBI)

Service Component Architecture (SCA)

Open Service Gateway Initiative (OSGi)

IBM WebSphere

Microsoft BizTalk

Semantic Service Bus Globus

Pervasive Service Bus (PSB)

Heterogeneity JavaBeans Java, C++, BPEL*, Web services

JavaBeans, UPnP devices

Web services, adapted components

Webservices, adapted components and devices

Semantic Web services

Grid services Any resource as pervasive service

Communication Centralized Point-to-point Centralized Centralized Centralized Centralized Hybrid Hybrid

Service deployment

Hard-coded Hard-coded By registry By registry Active dis-covery

By registry By registry Active discovery

Device accessibility

No No Extensible (UPnP)

No DPWS No No UPnP, DPWS, IGRS, sensors

Orchestration No No No Configurable Configurable Automatic No Automatic

Adaptation No No No Throttling and load balancing

Throttling and load balancing

– Resource coordination

Migration, resource coordination, and replanning

Semantics No No No No No Yes Partial Yes

* BPEL = Business Process Execution Language; UPnP = Universal Plug and Play; DPWS = Devices Profile for Web Services; IGRS = Intelligent Grouping and Resource Sharing.

IS-29-04-Pan.indd 53 01/09/14 6:19 PM

Page 3: Pervasive Service Bus: Smart SOA Infrastructure for Ambient Intelligence

54 www.computer.org/intelligent IEEE INTELLIGENT SYSTEMS

S m a r t a r c h i t e c t u r e S

scalability. With the proposed sub-bus-based layout, we present two mecha-nisms—direct-link and distributed execution—that enable efficient access and interaction of dynamic services. The framework embeds sophisticated intel-ligence about users and environments, which can generate adaptive optimal service flows for user tasks.

PSB: An OverviewPSB aims to be a powerful and flexible infrastructure with intelligent mecha-nisms that can uniformly manage dis-tinct computing resources (softwares, appliances, sensors, and actuators); agilely integrate them for user per-sonal tasks; and dynamically provide effective interaction for distributed services.

To automatically manage heteroge-neous services, we use an ontology-based

model to depict heterogeneous services as uniformed pervasive services. Our model has five domains:

• Service profile outlines a service with its functional properties, such as preconditions and effects, and non-functional properties such as service quality.

• Stateful resources are a service’s com-putational resources (such as data, CPU, and network) that can share the execution state between services for higher system performance and seamless user experience.

•Context effect describes the con-text’s influence on service quality, which triggers service action adap-tation to maintain reliability.

• Service process describes the ser-vice’s access interfaces and control logic.

•Grounding describes the service’s concrete access protocols and mes-sage formats.

The semantic model can facilitate au-tomatic service discovery, integration, accession, and coordination.

As Figure 1 shows, the PSB archi-tecture consists of five layers, each of which has a bundle of protocols for spe-cific missions on service management:

•The world-model layer main-tains semantic models of contexts, services, and user tasks6; domain knowledge for context reasoning; heuristics and templates for service orchestration; and policies for ser-vice coordination.

•The intelligence layer contains three modules: a context-inference en-gine, which infers user context and

SSIP, SDI-12,Win Sensor API,

TinyOS

DPWS, UPnP,IGRS

...

Softwarecomponents

OSGi-MS.JMS, COM,

.NET,...

Web services

SOAP, RESTXML-RPC,

...

Cloud services

ATOMXMPP,OCCI

SOAP,...

Flow executionmanagementData management

Flowplanner

Interoperation

Intelligence

Pervasiveservices

Sensors Devices

Protocols

Deliverychannel

SemanticModels/Specifications

Generic/Domainknowledge

Workflowtemplates, heuristicsWorld model

Multimodecommunication link Addressing and routingCommunication

Active servicediscovery

Contextinference

数据据

Taskmonitoring

Adapter AdapterAdapter Adapter Adapter

据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据据

Figure 1. The Pervasive Service Bus (PSB) architecture. PSB has five layers: world model, intelligence, interoperation, communication, and adapter.

IS-29-04-Pan.indd 54 01/09/14 6:19 PM

Page 4: Pervasive Service Bus: Smart SOA Infrastructure for Ambient Intelligence

S m a r t a r c h i t e c t u r e S

JuLY/AuGuST 2014 www.computer.org/intelligent 55

tasks from sensor data; a flow plan-ner, which generates executable ser-vice flows for user tasks; and a task monitor to control the lifecycle of user tasks.

•The interoperation layer establishes and facilitates service interactions and includes three modules: the active ser-vice discovery module automatically discovers services, registers them into registry, and periodically checks their availability; the data management module allocates data caches for data transportation; and the flow execu-tion module invokes services accord-ing to service flows.

•The communication layer dynami-cally and adaptively builds effi-cient communication connections between services for data transpor-tation. In addition to existing mes-saging standards for Web services, PSB supports various communication modes (for example, peer-to-peer and broadcasting).

•The adapter layer provides service adapters that shield services’ hetero-geneity in their protocols, platforms, and data formats, and provides uni-fied accession interfaces.

Smart Task AutomationIn AmI, pervasive services must be dynamically integrated to complete user tasks—that is, work assigned as a user’s duty or to meet a goal, such as through shopping, a meeting, and traveling. Service orchestration is a promising service-integration tech-nique widely used in ESBs for busi-ness tasks; however, it faces two challenges in AmI. First, services should serve users with less inter-vention. Second, service flows must change on the fly with environmental dynamicity. In PSB, a semantic task model guides an intelligent planner to autonomously orchestrate pervasive services.

Task ModelTo enable automatic service orches-tration for a task, a formal task model should include functional and non-functional requirements. Functional requirements define a task’s goal and flow model.

•Goal. A task’s goal is defined as the target world state—that is, the spe-cific status of a computing resource or a physical entity.

• Flow model. This model expresses a task as an execution sequence of virtual services. A virtual service is an atomic functional unit used to change the world state. A flow model is an acyclic AND/OR graph in which a node represents a virtual service and a directed edge links two successive services. A node’s direct successors can be either parallel sub-tasks (AND branches) or alternative execution paths (OR branches). A flow model can be manually defined or automatically deduced.

Nonfunctional requirements specify context and quality requirements on services. A context requirement speci-fies context constraints for task ex-ecution; examples include physical constraints (such as location and time), situational constraints (such as work-ing and relaxing), and security con-straints. Desired quality specifies user preferences and the evaluation crite-rion for service quality.

Online Planning of Service FlowWe propose a planning-based approach for the online orchestration of task-driven services. We can view planning as a path-search problem on an acyclic graph G = <V, E>, where a vertex Vi ∈ v is a pervasive service, and a directed edge (i, j) ∈ E represents an invocation of service vj after vi, whose weight w(i, j) is the invocation cost (such as latency or mediation time). Given a start vertex

and a goal vertex, our approach will find an optimal path with the lowest cost—that is, it will find a service flow. However, our acyclic graph isn’t static for service dynamicity and user mobil-ity, which might make current flows non-optimal or even invalid. Our ap-proach will revise service flows to cope with this issue. Our algorithm has three stages, as we now describe.

Building a search graph. Given a task, we build a search graph from its flow model. For a virtual service in the flow model, we select a set of perva-sive services as its candidates if they have the same functionality to change world state. Each candidate service forms a vertex in the search graph. To limit graph scale, we choose can-didates based on the task model’s con-text requirement and desired quality. We then link vertices with directed edges if two conditions are satisfied:

• their corresponding virtual services are successively connected in the model, and

• interaction is feasible between the services they represent.

We then add two super vertices in the graph as the “start point” and “goal point.” Figure 2 shows the flow model and the generated search graph for a movie-watching task.

Planning optimal service flow. Using the search graph, we find an optimal service flow with a variant of the D* algorithm.7 The algorithm traverses from the goal vertex backward; it always tries a node that appears in the “shortest path” and nearest to the state vertex. To apply D* in ser-vice planning, we first evaluate ser-vice latency as edge weight used to calculate distance between vertices, because it’s important for user ex-perience. We estimate service latency

IS-29-04-Pan.indd 55 01/09/14 6:19 PM

Page 5: Pervasive Service Bus: Smart SOA Infrastructure for Ambient Intelligence

56 www.computer.org/intelligent IEEE INTELLIGENT SYSTEMS

S m a r t a r c h i t e c t u r e S

based on their different types, and the network and data mediation be-tween successive services.8 We also must handle parallel paths that exist in flow models and search graphs as parallel subflows. For a vertex with parallel paths, we must calculate its distance to a goal vertex as the maxi-mum of all parallel paths.

For Figure 2’s movie-watching task, we generate a “service flow” (the bold red lines), in which light controlling and stream processing are parallel paths. For optimal latency, the flow chooses the local hard disk as a media

source, the hardware player as a de-coder, and the home theater system as the player.

Online flow adaptation. During execu-tion, the search graph might be affected by space dynamics—that is, if a service leaves, it might make a flow invalid or the growth of edge weight might in-crease the flow latency. Our algorithm revises the flow to solve such cases as follows. For any changed edge (u, v) in the graph, the vertex u is marked incon-sistent, and the D* search is taken again from inconsistent vertices to current

vertices (services). As in Figure 2, a new flow uses a TV instead of the invalid home theater.

Sub-Bus: Enabling Effective Service CooperationAmbient intelligence typically in-volves real-time and large-volume data exchange among numerous per-vasive services—such as audio, image, and video streams9—which require ef-fective interaction and rapid response. Traditional SOA frameworks often use a common bus to dispatch all communication messages, but this has two shortcomings:

• the centralized topology will bot-tleneck interaction messages in large-scale, end-to-end communi-cations10; and

• adapting heterogeneous services onto a central system will make it too complicated to compute and scale efficiently.

Instead, PSB exploits the sub-bus mechanism to achieve effective inter-action while preserving convenient ser-vice management.

Sub-BusesA sub-bus is a lightweight bus de-signed for services with similar protocols, or those that frequently co-operate for specific missions. Figure 3 shows a PSB, or main bus, that man-ages a group of sub-buses. A main bus manages service registration, context inference, and flow planning in the space. Sub-buses, which can easily be deployed with high scalability, actively detect available services, plug them for instant access, and allocate re-sources to support their interactions.

•Active service discovery and plug-and-play. Sub-buses support standard discovery protocols for devices and custom discovery protocols for

Start

ANDbranch

Goal:Watched (over)

Tune light

Start Goal:Watched (over)

Local HD source Hardware playerHome theater

TV

Read stream

Light controller

Decode stream

Remote site: rmvb Software player

Play stream

Remote site: flv

ANDjoin

12

3

4

5

6

7

Virtual service

ServiceInvocation

optimal path

1 Search orderRevised path

Candidateservice

Search graph

Flow model

Keep streamuntil

Figure 2. Flow model, searching graph, and generated service flow. The search graph is composed with space services subject to the flow model, and the generated service flow is the best composition of the services.

Sub-busessensors

Space bus

Active access

Distributedevents

Direct link

Devices Softwares

GeckoCNN.com

Web services

Resourceallocation

CacheLink Direct link

Contextdata

Servicedescription

Flowcontrol

Figure 3. Illustration of main bus and sub-buses. Sub-buses pursue fast discovering and accessing of services, and the main bus manages the cooperation of them.

IS-29-04-Pan.indd 56 01/09/14 6:19 PM

Page 6: Pervasive Service Bus: Smart SOA Infrastructure for Ambient Intelligence

S m a r t a r c h i t e c t u r e S

JuLY/AuGuST 2014 www.computer.org/intelligent 57

software components. A service is automatically registered to (or un-registered from) the main bus ac-cording to its availability.

•Uniform access to pervasive ser-vices. Sub-buses give services uni-fied access interfaces by adapting and shielding protocol heterogeneity. Sub-buses also manage service ad-dressing across networks.

• Support for efficient service collabo-ration. Sub-buses allocate resources for service interaction, including data cache and network links; they also support a distributed event mechanism to coordinate large-scale parallel collaboration of distributed services.

Sub-buses have three benefits. First, as “leaves” of a main bus, sub-buses manage only a few protocols or tasks, with tailored light-weighted func-tions to achieve higher performance. Second, separating the communica-tion functionality from the main bus to sub-buses can make data transmis-sion more direct, independent, and efficient. Finally, with sub-buses, col-laboration of services can be coor-dinated in a highly distributed and parallel manner.

Direct LinkDirect link is a protocol for peer-to-peer service communications across IP-based networks that avoids ex-changing data via a common bus and improves interaction efficiency. As

Figure 4 shows, direct link helps ser-vices directly transmit data using the following three mechanisms.

•Messaging orientation. To avoid centralized communication, di-rect link orients messages directly to the addresses of their actual re-ceiver endpoints using a network between sub-buses.

•Cache-based delivery. In direct link, data cache is essential for services to store received data before using it. The cache is provided by service holders and sub-buses, and indexed with a distributed directory that as-signs a URI key to a data block. PSB supports two data delivery modes: active mode, in which real-time data is immediately sent to its receiver; and passive mode, in which the sender stores the data and receivers access it using a key.

•Dynamic mediation. Heterogeneous services need data mediation (trans-lation) to solve data incompatibility during interaction.11 In direct link—where service interaction is unpre-dictable—PSB dynamically loads mediation components to service adapters or sub-buses to translate their input and output data.

In order to achieve maximal effi-ciency of service cooperation, we use direct link to decentralize their data flow. We’ll provide a scheme, called “distributed execution,” to decentral-ize their control logic.

Distributed ExecutionDistributed execution helps services in a service flow control their interac-tions individually, which makes flow execution distributed and parallelized. Distributed execution includes two schemes. In the flow partition scheme, PSB divides a service flow into individ-ual subflows, each of which controls a single service. A subflow is a state machine controlling two orthogonal states of the service (“running” and “stop”). Conditions to switch service states are derived from executing states of other services.

In distributed synchronization, sub-buses synchronize services’ states via distributed events, which are built on connection-based transportation pro-tocols to guarantee message reliability and consistency. To avoid frequent un-necessary synchronizations, which re-strict execution parallelization, states are managed with critical sections and sent with the “publish–subscribe” pattern.

Evaluation and ApplicationWe built the PSB prototype based on our previous work (a commercial SOA platform called JTangSynergy12) and deployed the prototype in a real house for the Smart Home testbed.

Performance EvaluationWe conducted three experiments—in service access, distributed layout, and direct link—to verify PSB benefits. We deployed PSB and the services on a

Bus-based

Direct link

Figure 4. Bus-based interaction compared to direct link. Instead of a centralized data dispatcher, the data are sent from its producer directly to its consumer.

IS-29-04-Pan.indd 57 01/09/14 6:19 PM

Page 7: Pervasive Service Bus: Smart SOA Infrastructure for Ambient Intelligence

58 www.computer.org/intelligent IEEE INTELLIGENT SYSTEMS

S m a r t a r c h i t e c t u r e S

desktop (Intel Duo 2 GHz, 2 Gbytes RAM, 100 Mbytes bandwidth, and Windows 7) and clients on a laptop (Intel Duo 2.26 GHz, 2 Gbytes RAM, 100 Mbytes bandwidth, and Win-dows 7). Services in the experiment transmit data blocks with distinct

access protocols. We assume the ser-vice execution time is zero for simplic-ity; our focus is on interaction latency caused by the framework.

The first experiment compares PSB’s service-access efficiency with that of a traditional central- broker-

based mechanism. Figure 5a shows the average response time of the two approaches when the services send 2 Kbytes and 200 Kbytes of data, re-spectively. When the data size grows to 200 Kbytes, the sub-bus layout of PSB remarkably reduces the response time (by 43–58 percent) compared with the central broker. The result shows that the advantage of our mechanism will become significant when transmitting large data, mainly because it avoids protocol transformation.

The second experiment shows the effect of PSB’s distributed layout. We simulated 100 concurrent requests per second across a PSB with two sub-buses. As Figure 5b shows, the average response time decreases mo-notonously as the percentage of local messages (within a sub-bus) grows; thus, rational service deployment that improves service locality will increase interaction efficiency.

The third experiment compares execution time of service flows with and without direct link. For simplic-ity, we tested two kinds of flows: se-quential flow, which invokes services sequentially, and parallel flow, which forks two parallel paths at the begin-ning and converges at the end. Fig-ure 5c shows that average execution time for sequential flows: direct link takes nearly half the execution time, because it avoids communications between services and a flow engine. For parallel flows, direct link can re-duce execution time further because paths in the flow can be executed in parallel.

Smart Home TestbedWe applied PSB to Smart Home, a typ-ical smart space project13 supported by the National High Technology Re-search and Development Program of China. The Smart Home prototype consists of a living room, a bedroom, a study, a kitchen, and a bathroom

100

200

300

400

500

100 200 400 500 1,000 2,000

Concurrent requests presecond

Aver

age

resp

onse

tim

e (m

s)

200k-central200k-sub-bus2k-central2k-sub-bus

(a)

0

50

100

150

200

250

Sequential Parallel

Exec

utio

n tim

e (m

s)

w/ Direct link

w/o Direct link

(c)

00 10 20 30 40 50 60 70 80 90 10

0

200

400

600

800

1,000

1,200

Requests within a sub-bus (%)

Aver

age

resp

onse

tim

e (m

s) 5 Kbyte 500 Kbyte

(b)

Figure 5. Performance evaluation. (a) Service-access efficiency. (b) The impact of PSB’s distributed layout on response time. (c) Execution time of service flows with and without direct link.

IS-29-04-Pan.indd 58 01/09/14 6:19 PM

Page 8: Pervasive Service Bus: Smart SOA Infrastructure for Ambient Intelligence

S m a r t a r c h i t e c t u r e S

JuLY/AuGuST 2014 www.computer.org/intelligent 59

(see Figure 6). In each room, various pervasive services are deployed, in-cluding devices for protocols such as Universal Plug and Play (UPnP), Intel-ligent Grouping and Resource Sharing (IGRS), and Devices Profile for Web Services (DPWS), along with Open Service Gateway initiative (OSGi) and .NET software components, environ-mental sensors, and actuators (such as door and curtain motors).

The space offers 116 services in all, and each protocol’s services are man-aged by a sub-bus. We studied nine typical scenarios in the Smart Home: ambient control, access control, home office, communication, smart multi-media sharing, multimedia entertain-ment, task migration across rooms, smart food management, and in-home healthcare.

In the Smart Home, the inhabit-ants’ personal devices can automati-cally join PSB (with an average time of 4,447.5 ms for DPWS devices and 753 ms for UPnP devices), which lets them use services to carry out their tasks in the space, such as playing a movie with home devices. When a de-vice becomes unavailable, PSB will se-lect and migrate to an alternative one by matching ontology descriptions of more than 100 candidate services from the registry, in an average time of 1,537.1 ms. In evaluating PSB’s service orchestration with 31 tasks—given a task-time-out threshold of three seconds—we found that 23 tasks succeeded, three failed the matching service, four failed due to execution time-out, and one dropped due to a context condition.

A mbient intelligence (AmI) aims to facilitate devices and

software in environments working together to assist its users. The com-plexity of AmI constrains its rapid prototyping and development. The

pervasive service bus (PSB) attempts to tackle it from a new perspective. With standard service specifications, different devices and software can have a same language to interact; With web service protocols, services can collaborate across large physical spaces; with standards of service or-chestration and communication, the services are promised to cooperate on demand. With PSB, a developer can more focus on intelligence of the AmI system.

AcknowledgmentsThis work is supported in part by the National 973 Program (2013CB329504), the National High-Tech Research and Development Pro-gram of China (2009AA011903), and the Program for New Century Excellent Talents in University (NCET-13-0521). The authors would like to thank the IGRS Alliance for its warm help to build the smart home testbed.

References1. D.J. Cook, J.C. Augusto, and V.R. Jakkula,

“Ambient Intelligence: Technologies,

Applications, and Opportunities,” Pervasive

and Mobile Computing, vol. 5, no. 4, 2009,

pp. 277–298.

2. F.Y. Wang, “The Emergence of Intelligent

Enterprises: From CPS to CPSS,” IEEE

Intelligent Systems, vol. 25, no. 4, 2010,

pp. 85–88.

3. H.R. Arabnia et al., “Context-Aware

Middleware and Intelligent Agents

for Smart Environments,” IEEE Intel-

ligent Systems, vol. 25, no. 2, 2010,

pp. 10–11.

4. G. Pan et al., “GeeAir: A Universal

Multimodal Remote Control Device

for Home Appliances,” Personal and

Ubiquitous Computing, vol. 14, no. 8,

2010, pp. 723–735.

5. H. Zhang, F.Y. Wang, and Y. Ai, “An

OSGi and Agent-Based Control System

Architecture for Smart Home,” IEEE

Conf. Networking, Sensing and Control,

2005, pp. 13–18.

6. G. Pan et al., “TaskShadow: Toward

Seamless Task Migration across Smart

Environments,” IEEE Intelligent Sys-

tems, vol. 26, no. 3, 2011, pp. 50–57.

(a) (b)

(c) (d)

Figure 6. The Smart Home testbed. The smart space is augmented by more than 100 pervasive services (devices and software services with different protocols).

IS-29-04-Pan.indd 59 01/09/14 6:20 PM

Page 9: Pervasive Service Bus: Smart SOA Infrastructure for Ambient Intelligence

60 www.computer.org/intelligent IEEE INTELLIGENT SYSTEMS

S m a r t a r c h i t e c t u r e S

7. M. Likhachev et al., “Anytime Search

in Dynamic Graphs,” Artificial

Intelligence, vol. 172, no. 14, 2008,

pp. 1613–1643.

8. L. Zeng and B. Benatallah, “QoS-Aware

Middleware for Web Services Com-

position,” IEEE Trans. Software Eng.,

vol. 30, no. 5, 2004, pp. 311–327.

9. M Weiser, “Some Computer Science

Issues in Ubiquitous Computing,”

Comm. ACM, vol. 36, no. 7, 1993,

pp. 75–84.

10. W. Binder, I. Constantinescu, and B.

Faltings, “Decentralized Orchestra-

tion of Composite Web Services,”

Proc. Int’l Conf. Web Services, 2006,

pp. 869–876.

11. D. Fensela and C. Busslerb, “The Web

Service Modeling Framework WSMF,”

Electronic Commerce Research and

Applications, vol. 1, no. 2, 2002,

pp. 113–137.

12. J. Yin et al., “A Dependable ESB

Framework for Service Integration,”

IEEE Internet Computing, vol. 13,

no. 2, 2009, pp. 26–34.

13. D.J. Cook, “Learning Setting-General-

ized Activity Models for Smart Spaces,”

IEEE Intelligent Systems, vol. 27, no. 2,

2012, pp. 32–38.

Selected CS articles and columns are also available for free at

http://ComputingNow.computer.org.

t h e a u t h O r SGang Pan is a professor in the Department of Computer Science at Zhejiang University. His research interests include pervasive computing, computer vision, and pattern recogni-tion. Pan has a PhD in computer science from Zhejiang University. Contact him at [email protected].

Li Zhang is a PhD candidate in the Department of Computer Science at Zhejiang Uni-versity. His research interests include service-oriented architecture, artificial intelligence, and ubiquitous computing. Zhang has a BS in computer science from Zhejiang University. Contact him at [email protected].

Zhaohui Wu is a professor in the Department of Computer Science, Zhejiang University. His research interests include distributed artificial intelligence, semantic grid, and per-vasive computing. Wu has a PhD in computer science from Zhejiang University. Contact him at [email protected].

Shijian Li is an associate professor in the Department of Computer Science at Zhejiang University. His research interests include sensor networks, ubiquitous computing, and so-cial computing. Li has a PhD in computer science from Zhejiang University. He’s the cor-responding author. Contact him at [email protected].

Laurence Yang is a professor in the Department of Computer Science at St. Francis Xavier University. His research interests include high-performance computing and networking, em-bedded systems, pervasive computing, and intelligent systems. Yang has a PhD in computer science from the University of Victoria, Canada. Contact him at [email protected].

Man Lin is an associate professor in the Department of Computer Science at St. Francis Xavier University. Her research interests include pervasive computing, real-time and embed-ded system design and analysis, and optimization algorithms. Lin has a PhD in computer science and information from Linkoping University, Sweden. Contact her at [email protected].

Yuanchun Shi is a professor in the Department of Computer Science at Tsinghua Univer-sity, where she’s the director of the Institute of Human-Computer Interaction & Media Integration; she also directs the Pervasive Computing Division of Tsinghua National Lab of Information Science and Technology. Her research interests include human-computer interaction, pervasive computing, and multimedia communication. Shi has a PhD in com-puter science from Tsinghua University. Contact her at [email protected].

IEEE Internet Computing reports emerging tools, technologies, and applications implemented through the Internet to support a worldwide computing environment.

For submission information and author guidelines, please visit www.computer.org/internet/author.htm

Engineering and Applying the Internet

IS-29-04-Pan.indd 60 01/09/14 6:20 PM