[ieee 2007 2nd international conference on pervasive computing and applications - birmingham, uk...

5
Research on and Implementation of a real-time CORBA Middleware Prototype for Pervasive Computing Jian PENG', Liyun SU2, Jiaxin WUI 'School of Computer Science, Sichuan University, Chengdu, Sichuan, China, 610064 penguest@] 63. com 2School ofMathematics and Physics, Chongqing Institute of Technology, China, 400050 Abstract The system Architecture of the middleware, which is fit for the pervasive computing environment, is described, and the basic idea of how to design and implement the middleware for pervasive computing based on the CORBA is put forward. Then it discusses the particular design of the middleware according to the demands of real-time, embedded limited resource, mobile environment and the diversity of systems and networks. Finally, the validity of the design and implementation has been proven by the experiment system. Keywords: Pervasive Computing, Context-aware, Real-time, CORBA Middleware 1. Introduction The Pervasive Computing refers to a way of computing which can be made everywhere at any time. That is, if necessary, the information required can be accessed via any devices, anywhere and anytime. Pervasive computing is a research that involves a wide range of issues, it also integrates many technologies including distributed computing, mobile computing, human-computer interaction, artificial intelligence, embedded systems, the perception network and information fusion, and so on. The system software of pervasive computing forms the software part of the foundation of the pervasive computing, which manage plenty of online devices and the computer entities, and provide the system level support for the data exchange, message communication, service discovery, task scheduling, and task transplant between the devices and entities. The system software of pervasive computing provide the above functions and services for our daily life, then people can pay attention to collaborate the numerous computing entities with each other to provide services together. The main goal of middleware for the pervasive computing is to shield the details of the implementation by some computing entity, and to exhibit a uniform service interface. Specifically, the research in this area includes: service description, discovery and organization mechanisms, communication between the computing entities and concurrent model, interface development, and so on. In China, there are a few of related research on the topic. For instance, Qu Xinhang[ 1] discussed a network operation platform supporting context-aware application, and Li Jun[2] did the research on a lightweight middleware for pervasive computing, but they all seldom discuses the middleware performance for real-time applications. Presently, according to the middleware in the heterogeneous environment of pervasive computing, there exist some problems listed as followed: 1. The standardization of middleware. 2. To meet the growing demand for more applications, the performance of middleware and system becomes a research hotspot. CORBA now is a recognized middleware standard that is much better than the others, before the middleware specification of pervasive computing is published, to modify the CORBA middleware for the demands of pervasive computing is an eclectic choose. So, our research focuses on the real-time middleware for pervasive computing. 2. Architecture of the pervasive middleware The pervasive computing system shown in Fig. 1 is a distributed system. The middleware Layer provides the transparency of the heterogeneous devices and network environment, and also provides the mechanism of the communication and interoperation between the upper-layer modules. Then the connections, the communications and the cooperation between the distributed modules will be organized in a unified organic way. So the system can lay out a harmonious behavior and function. Discovery service: when a new device joins into the environment, or a new module is adopt on the existed device, how to find each other and how to interact between the new and the existed devices or modules, will be handled by the discovery service. 1-4244-0971-3/07/$25.00 ©)2007 IEEE.

Upload: jiaxin

Post on 06-Mar-2017

217 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: [IEEE 2007 2nd International Conference on Pervasive Computing and Applications - Birmingham, UK (2007.07.26-2007.07.27)] 2007 2nd International Conference on Pervasive Computing and

Research on and Implementation of a real-time CORBA MiddlewarePrototype for Pervasive Computing

Jian PENG', Liyun SU2, Jiaxin WUI'School ofComputer Science, Sichuan University, Chengdu, Sichuan, China, 610064

penguest@] 63. com2School ofMathematics and Physics, Chongqing Institute ofTechnology, China, 400050

Abstract

The system Architecture of the middleware, whichis fit for the pervasive computing environment, isdescribed, and the basic idea of how to design andimplement the middleware for pervasive computingbased on the CORBA is putforward. Then it discussesthe particular design of the middleware according tothe demands of real-time, embedded limited resource,mobile environment and the diversity of systems andnetworks. Finally, the validity of the design andimplementation has been proven by the experimentsystem.

Keywords: Pervasive Computing, Context-aware,Real-time, CORBA Middleware

1. Introduction

The Pervasive Computing refers to a way ofcomputing which can be made everywhere at any time.That is, if necessary, the information required can beaccessed via any devices, anywhere and anytime.Pervasive computing is a research that involves a widerange of issues, it also integrates many technologiesincluding distributed computing, mobile computing,human-computer interaction, artificial intelligence,embedded systems, the perception network andinformation fusion, and so on.

The system software of pervasive computingforms the software part of the foundation of thepervasive computing, which manage plenty of onlinedevices and the computer entities, and provide thesystem level support for the data exchange, message

communication, service discovery, task scheduling,and task transplant between the devices and entities.The system software of pervasive computing providethe above functions and services for our daily life, thenpeople can pay attention to collaborate the numerous

computing entities with each other to provide servicestogether. The main goal of middleware for thepervasive computing is to shield the details of theimplementation by some computing entity, and to

exhibit a uniform service interface. Specifically, theresearch in this area includes: service description,discovery and organization mechanisms,communication between the computing entities andconcurrent model, interface development, and so on.

In China, there are a few of related research on thetopic. For instance, Qu Xinhang[ 1] discussed a

network operation platform supporting context-awareapplication, and Li Jun[2] did the research on a

lightweight middleware for pervasive computing, butthey all seldom discuses the middleware performancefor real-time applications.

Presently, according to the middleware in theheterogeneous environment of pervasive computing,there exist some problems listed as followed: 1. Thestandardization of middleware. 2. To meet the growingdemand for more applications, the performance ofmiddleware and system becomes a research hotspot.

CORBA now is a recognized middlewarestandard that is much better than the others, before themiddleware specification of pervasive computing ispublished, to modify the CORBA middleware for thedemands of pervasive computing is an eclectic choose.So, our research focuses on the real-time middlewarefor pervasive computing.

2. Architecture of the pervasivemiddleware

The pervasive computing system shown in Fig.1is a distributed system. The middleware Layerprovides the transparency of the heterogeneousdevices and network environment, and also providesthe mechanism of the communication andinteroperation between the upper-layer modules. Thenthe connections, the communications and thecooperation between the distributed modules will beorganized in a unified organic way. So the system can

lay out a harmonious behavior and function.Discovery service: when a new device joins into

the environment, or a new module is adopt on theexisted device, how to find each other and how tointeract between the new and the existed devices or

modules, will be handled by the discovery service.

1-4244-0971-3/07/$25.00 ©)2007 IEEE.

Page 2: [IEEE 2007 2nd International Conference on Pervasive Computing and Applications - Birmingham, UK (2007.07.26-2007.07.27)] 2007 2nd International Conference on Pervasive Computing and

1iscovery Context- aware Scheduling Otherservice service common

service Service

1\Middleware

OS and The Driver Layer

Hardware Layer Network Layer

Fig. 1 Architecture ofpervasive middleware

Context-aware service: The context means anyinformation that can be a token of the entity status; Itcan be used to give expression to the device and theability relating to the inspection, the awareness, theinterpretation, and the response to the user environment.It concerns problems about how to collect, express,model, deduce and serve the context information. Andthe context-aware is to accomplish the service byinvoking itself behaviors dynamically according to thecontext information.

Scheduling service: provide the requiredscheduling service for the real-time demand ofmiddleware.

Hardware layer: including the hardware resource,sensor and network, etc.

3. Research on and Implementation of thereal-time Middleware platform pcORB forPervasive Computing

The middleware platform should meet themulti-platform requirement of the pervasivecomputing environment, adapt to the limited resource,mobile environment, and it will guarantee the growingrequirements of the broadband applications in thefurther in real-time.

3.1 the design ofPDL

The CORBA decouples the applications fromtheir run-time environment. But the tight couplingrelation still exists in the whole system because theCORBA relies on its run-time environment. The ORBruns on the operating systems, so it depends deeply onthe operating systems.

The dependence on the OS has been abstracted as aPDL shown in Fig. 2, which decouples ORB from theoperating system, and then the ORB has goodportability (from the view of ORB, it is the PDL thatenables the ORB to be independent from the platform.).PDL is a thin layer and easy to port on differentoperating systems.

(ORB)

(PDL)(task and memory management, synchronization, mutex)

OS and Networks

Fig. 2 PDL

After further analysis, we find that the dependenceon the OS mainly includes the thread (task)management, memory management and thecommunication of threads (synchronization, mutex).The existing OSs, especially the embedded OSs, arecomprehensively different on these aspects. In themultithreads ORB system, the safety of operation mustbe guaranteed, which needs much more support of OScore (thread (task) management, memory managementand the communication among threads (mutex,synchronization)).

With PDL, ORB codes are not dependent on thespecific OS, so they have the good portability.Therefore, the development cost and time to market isreduced.

The PDL simplifies the thread (task) management,memory management and the communication amongthreads (mutex, synchronization) by providing thegeneral, strict primitives for synchronization, mutex andthread control. The PDL design adopts the threadmanagement style in JAVA and the object-orientedtechnology, ensuring its simple use and easymodification.

3.2 the design for real-time requirement

1) In application layer, we design the interfaces of thereal-time applications on the end system of real-timeORB.

The end system of real-time ORB is a principalpart of real-time CORBA system; it must be thefoundation to ensure the prediction of the behaviors ofvaried activities in the real-time applications from endto end. In real-time CORBA system, ORB takes theresponsibility for transporting messages transparentlybetween the client (real-time application) and objectimplementation (service program). Here every endsystem of real-time ORB should provide theappropriate application interface, and then if the client(real-time application) sends a request to ORB, thedemand for time limitation can be designated, like thedeadline, the cycle, the execute time, the importance,etc. That is a necessary function in real-time CORBAsystem.

Real-time CORBA system also provides themechanism, which can be used to make explicitbinding with servers by clients. Furthermore, it allowsthe client to appoint the appropriate network protocol.

Page 3: [IEEE 2007 2nd International Conference on Pervasive Computing and Applications - Birmingham, UK (2007.07.26-2007.07.27)] 2007 2nd International Conference on Pervasive Computing and

2) Build real-time scheduling mechanism for thereal-time CORBA system

The behaviors of real-time application(involving its series activities) in the real-timeCORBA system all obey the time limitation from endto end by depending on the support of real-timescheduling mechanism. The basis of real-timescheduling mechanism to control applications isreal-time scheduling strategy. The quality of strategywill decide the time-limit behavior of the real-timeapplication. Now there exists the static and dynamicscheduling mechanism already, and plenty ofscheduling algorithms.3) Real time optimizations of the ORB* Collocate the thread pool adapt to real-time

application in ORB* Build optional paths between C/S to choose

different measure for different scenario for ORB* Collocate the object adapter for real time

application4) The optimizations of the real-time implementation

The implementation of the real-time distributedsystem based on CORBA makes use ofCORBA to runon the heterogeneity platforms. However amiddleware is added, the performance of system willbe decreased. As known, in real-time system, time isan important resource, so the performance of thereal-time system needs to be optimized to reduce thedelay in the run-time. In reference [6], each part,which needed to be optimized to implement thereal-time CORBA, is described and a lot ofoptimization technologies are introduced in detail. Inour implementation of pcORB, we focus on two partsoptimizations:

I. presentation layer optimizationsIn the high performance communication system,

presentation layer is the main bottleneck. Theoperation parameter from the high layer is marshalledbefore being transferred to lower layer, or vs.demarshalled. In real-time CORBA, the process isdone by stub in the client and the skeleton in the server.Marshalling and demarshalling is a bottleneck becausethe process consumes a lot of CPU, memory, and I/0resources on operation accessing and copying data.Thus, for real-time need, an effective presentationlayer needs to be designed for the marshalling anddemarshalling process and to minimize the use of theoperations such as the dynamic memory assigning anddata copying etc. which will consume many resources.(a)Reduce the use of the dynamic memory: The

storage analysis for the information between client andserver is done by IDL compiler. So enough memorycan be assigned predictability to avoid the repeatedtest of space in the run-time. In addition, IDL complieruses the run-time stack for the demarshalledparameter.(b)Reduce the data coping: IDL compiler analyzes

then the excessive data copy can be reduced, so thenumber of the load and store instruction can beminimized.(c) Minimize the function call expense: IDL compiler

can select the optimized small stub. By using the inlinefunction, the expense of the call of small stub can bedecreased.

II. the optimization of the memory managementIn normal CORBA implementation, because the

call from the client to server needs pass throughmultiple layer (stub, I/0 system, net adaptor, objectadaptor, skeleton), there are a lot of dynamic memory

management and data copy, so a lot of resources such as

CPU, memory etc. will be usedE6].The dynamic memory management plays an

important role in hard real-time system because thefragments of stack maybe have different influence on

different sizes of message and different loads. In themulti threads ORB, to prevent the conflict among

stacks, the lock is used, but the chances of priorityinversion increase.

So the optimization of memory management isessential. In the real-time system, the zero copy

mechanism is used to minimize the dynamic memory

distributing and data copying. The ORB for real-time isdesigned to minimize or eliminate the data copying on

multi layer. Using the zero copying management systemcan permit client to receive or to send requests withoutany data copying. Moreover, the buffer can betransported and pre-assigned. We also can use some

thread storage modes to minimize the lock conflicts,which are caused by the memory conflict.

3.3 the design for embedded requirement

Modular customization: To make the middlewareadapt to not only the limited equipments of computingresource in pervasive environment, but also theadvanced equipments, the core function of themiddleware should be small enough to extend upwardseasily. This needs to adopt modular customizationdesign in order to meet the demand of differentequipment and application.

Comparing with normal CORBA, the embeddedCORBA doesn't need dynamic invocation, so it got ridof dynamic invocation interface (DII) and dynamicskeleton interface (DSI), and got rid of most of theinterface library. At the same time, according to theMinimumCORBA criterion, we customize the portableobject adaptor (POA). Of course the demand ofperformance sometimes will collide with the limitedresource, so we only can make the balance betweenthe customization of the embedded system andreal-time demand.

3.4 plug-in network protocol framework

when to copy block data or to copy single data, and

Page 4: [IEEE 2007 2nd International Conference on Pervasive Computing and Applications - Birmingham, UK (2007.07.26-2007.07.27)] 2007 2nd International Conference on Pervasive Computing and

SandardGCRBmnmngAl[P AhcafCmonet

OREBIVksage GOP a ite ESICP -

---------------------~ L -Pfotlwi

' i,, t ,0~~~+PIfotoc sLickrMVA ,xytr TCT

BR1VER AIMNklayer ip _O*A

Pttocd dqiiu *- l\ce

(a) pltig-nptoodawhtturetfTAO

FWg3 plting- tpouiai tedtt

The support of the real-time network protocol isnecessary to the real-time application end to end,whereas there're many real-time network protocols,but the TCP/IP protocol which is the mainstream thatdefinitely does not support the real-time transport, so

the current real-time system for end to end shouldthink of extending the real-time attributes of networkprotocol or using the plug-in method to plug-in theother real-time network protocol. Fig. 3 (a) shows theplug-in protocol framework of real-time CORBA TAO.In order to support the real-time application, thereal-time CORBA TAO needs to run upon thecommunication protocol which supports real-time justlike VME and ATM, but it can't modify the upper

layer application for adapting to the change ofcommunication protocol, so it designs an plug-inprotocol architecture. Thanks to the description of theprotocol model in reference [6], we can abstract andextend the protocol framework of TAO, to get thecommunication protocol model shown in Fig.3 (b)

3.5 The support to mobile environment

In the pervasive computing environment, themobile character brings some problems such as theconnection maintenance, the access to differentnetwork and the deal of network discontinuity. Themiddleware should provide the support to mobile, so

its responsibility is to work together with applicationin order to finish the mission related to the mobile ofequipment. Aim at the problems above, the OMGreleased the wireless CORBA specification.

While CORBA object is on the mobile ternal,the request to it should be routed to the currentaccess-bridge. But the traditional IORs can't finish themission distinctly. In the wireless CORBA, the mobileIORs are defined. The mobile IORs are special objectreferences, which hide the movement of terminal to theclient, which launches the request.

Mobile IORs are the base of the realization ofmobile transparence, and we must import the switchmechanism to keep the continuous network access inthe narrowband environment. The switch mechanismincludes 3 steps: information-collecting phase,decision-making phase and executing phase. There are

two types of switch mechanisms: normal switch (switch

from old access-bridge to new access-bridge, dividedinto switch launched by network and switch launchedby terminal) and access-recovery switch (launched byterminal to access the old).

The extension to ORB mostly relates to theextension to the support of mobile IORs, such as theimplementation of mobile terminal profile and homelocation component, extends POA to support thecreating and identifying of mobile IORs, and extendsIIOP Profile, etc.

4. The experiment of pervasive computingsystem based on middleware

4.1 System hardware

The whole demo system as shown in Fig.4includes two Unix host computers (SUN ULTRA-10,Operating System Solaris 2.7), two pcs (OperatingSystem windows 2000), two multimedia boxes, twomatrix switchers, pairs of infrared probes, oneembedded computer (Operating System VxWorks5.4),a toy tank and a robot dolly controlled by RCX1.0.The pc uses wireless LAN equipment to connect withthe system, other computers use wire Ethernet toconnect.

4.2 the Experiment system

The system consists of four parts, they are:Central process system: All the computers install

the pervasive middleware pcORB that is adapting totheir operating systems.

Context-aware system It gets the contextinformation like the size and the position of the objectby collection unit. The collection unit includes sensormatrix (four pairs), which are used to acquire positionand collection equipment (includes matrix switcher,multimedia box and collection pc), the matrix switcherand the multimedia box transform the analog sensorsignals and input them to the data collection computer.The four pairs of probes are located separately by acertain distance to get the position of the movingobject, and two pairs of them are superposition, so thebig object can block the two pairs of sensors at thesame time while the small can't, then the size of theobject can be estimated.

Context illation system: Unix host computercompares the acquired information of position and thesize of the toy tank to the data in the database, andshow the information on the map, based on the result,it decides whether to send control command to theembedded computer to control the robot dolly or not.

Control System: the embedded computer withinfrared equipment receives the command from theillation system and controls the execute unit (the robotdolly) to carry out the command.

(b)AstuAwi= iprd"ol

Page 5: [IEEE 2007 2nd International Conference on Pervasive Computing and Applications - Birmingham, UK (2007.07.26-2007.07.27)] 2007 2nd International Conference on Pervasive Computing and

4.3 The experiment process and results

In the validation system, we mostly implementthe programmable robot to receive the differentcommands in order to head off the mobile tank. Everyinfrared probe connects to a port of the matrix switcher.When the infrared probe is blocked, it produces a levelsignal of detecting object and sends it to the matrixswitcher. According to the number of the port whichoccurs the level change, the matrix switcher acquiresthe serial number of the infrared probe, and sends theinfornation to the multimedia box in RS485 fornat.The multimedia box transforns the signal and sends itto the COM port of the data collection computer forcollecting data.

Data collection computer uses the infornation ofprobe serial number----position to transforn the serialnumber of the probe to the position, then estimates thecurrent position of the dolly, produces the requiredprocessing event through the pcORB to require thedata analyze computer to process.

matrixs icher

matrixswitcher

tank

multimedia

multimediabox

_ detctive

data collectioncomputer

data collectioncomputer

controlrobot dolly cOMMand

IA

data analyze andimage simulate

computer

data analyze andimage simulate

computer

Embeddedcomputer forcontrolling

Fig. 4 The experiment system, all computers are based on

Pervasive middleware

According to the result of the computing, thedata-analyze computer can produce the control signalneeded by the dolly to start-up and speed-up, andoutput it to the embedded computer through pcORB,the embedded computer sends the control commandvia the infrared equipment connected in the serial portto the robot dolly to strike the tank.

In the experiment, all computers are based on themiddleware, pcORB, in different operating systems.The whole system has been operated nornally, theworking process and result all tally with designassumption. It reflects this middleware system canacquire and control system correctly by context-aware,and proves the middleware platform can be used in thepervasive computing environment.

5. Summary

The structure and design of real-time middlewareused for the pervasive computing environment isdiscussed in the paper, and the validity of theimplementation is proved by an experiment system.But this is only the tentative step, there are also manyquestions in the field of pervasive computing, such asthe expression and identification of the context, aseamless movement and so on.

Supported by the Key Technology Foundation of ChengduScience and Technology Bureau: (06GGYB 173GX-034).

Reference

[I]Qu Xinhang, Zheng Kougen, Wang Yingwu, Researchon the Middleware of the Network OperationPlatform Supporting, Computer Engineering andApplications, 2006(20), 119-125[2]L I J un, TAO Xian Ping, BU Ying2Yi, el., FollowMeLite:A Lightweight Middleware for Pervasive Computing,Computer Science, 2007(11)34, 17-20[3]Shi Yuanchun, Pervasive Computing, the Report ofDevelopment of Computer Science and Technology in China,The TsingHua University Press, 2004[4]Zhu Hongjun, Study on Embedded Middleware,Application Research ofComputers, 2004.7,61-63[5] A. Gokhale and D. C. Schmidt. Measuring andOptimizing CORBA Latency and Scalability OverHigh-speed Networks[J]. IEEE Transactions on Computers,1998,47(4)[6]J. Crane. "Dynamic Binding for Distributed Systems"Ph.D thesis, University ofLondon, 1997.5