Professional Documents
Culture Documents
Jian Zhu, PengHe Chen, HungKeng Pung, Mohammad Oliya, Shubhabrata Sen, and WaiChoong Wong
National University of Singapore, Singapore
{g0500652, g0901858, dcsphk, oliya, g0701139, elewwcl}@nus.edu.sg
ABSTRACT
Context-awareness, as one of the key concept to achieve ubiquitous computing,
has been widely applied in various mobile applications. The resulting adaptability,
along with the usage of ubiquitous technologies, makes IT invisible and yet ever
closer and seamless to people‟s daily living. However, context-aware computing
has not yet found large success in the commercial area so far, and existing context-
aware mobile applications are mostly sensor-based. We argue that a context
middleware is indeed necessary to help development and deployment of mobile
applications as well as managing the heterogeneous context data. In this paper, we
propose such a middleware named Coalition. More specifically, we demonstrate
how Coalition (i) facilitates mobility issues during mobile application execution;
(ii) manages large number of application services as utilized or developed by
mobile applications. The two features are explained through a case study – Sharing
Of Living Experience (SOLE). In the end of the paper, we show the experimental
results obtained from the prototype testing and simulation study.
3 COALITION OVERVIEW
fundamental operations.
2nd Tier (Local Area Service Organization).
Area A Area B Area C
After dealing with the area organization, the 0000 0100 1000
Area D
MSID information for each MPSG during Callback Table, Query Handler and Callback
registration, and manages it through the life Notifier. Callback Table records all application
cycle of the MPSG. This component contains callbacks issued by applications residing in
two sub-components: MSID Table and Query different MPSGs. A callback table contains
Handler. MSID Table records availability many named pairs: Callback Callee and
information of each MPSG with respect to Callback Caller. Similar with MSID Tables,
MSID. It contains two information fields: MSID many Callback Tables are distributed to
and Availability Information which contains the different CSGs to achieve scalability. Query
IP address and port number of a MPSG. To Handler processes callback queries from
increase the scalability, many MSID Tables are different MPSGs such as callback registration
created and distributed into different CSGs, and and deletion. Fired by AUS, Callback Notifier
each CSG maintains its own MSID table for the receives a callee MSID and searches callback
registered MPSGs. Query Handler handles callers with respect to this callee from
different kinds of MSID related queries from corresponding Callback Table. After obtaining
MPSGs including following operations: insert, the caller list, it retrieves availability
update, retrieve and delete. MSID can be information of all callers from middleware, and
utilized to identify its CSG information to route then generates and distributes application
its related queries to the correct place. callback notifications to all caller MPSGs.
Availability Updating Processor. It detects any Application Callback Handler. It issues callback
availability change of a MPSG, and updates it queries to Application Callback Processor as
with Middleware Session Processor. This well as processing received application callback
component contains two sub-components: notifications to resume previously halted
Network Monitor and Availability Updater. applications. This component contains three sub-
Network Monitor collects the availability components: Query Controller, Notification
information of a MPSG persistently. If a change Controller and Network Controller. Query
is detected, an availability updating alert is Controller receives a message from an arbitrary
generated and forwarded to Availability Updater application, generates and issues one callback
which contains the MSID information of this query to Application Callback Processor.
MPSG. Subsequently, Availability Updater Notification Controller receives and analyzes
communicates with middleware to update the each application callback notification on behalf
availability information. of the halted applications. Whenever receiving
an application callback notification, it parses the
4.1.2.2Application Callback Service (ACS) ASID, MSID and availability information of the
ACS resumes halted application sessions caused callee, and then interprets the ASID and passes
by any unforeseen availability problem of related the MSID and availability information to the
MPSGs. Based on the previous definition of callback, corresponding application to resume previously
we further define the MPSG requesting the callback affected session. Network Controller delivers
as a Callback Caller and the MPSG for which the each query to as well as receiving application
callback is issued upon as a Callback Callee. The callback notifications from Application Callback
entire ACS can be divided into two parts: Processor.
Application Callback Processor inside Coalition and
Application Callback Handler inside each MPSG or 4.1.3 APIs for Mobility Support
application server (Figure 7). To give a more concrete idea for application
Application Callback Processor. It manages developers to utilize the mobility support services of
application callbacks, handles callback queries Coalition, Figure 8 shows the APIs for mobility
and distributes application callback notifications. support and their usage flow.
This component contains three sub-components: During the normal operating of a MPSG (Figure
8 top), Network Monitor periodically collects the receive each application callback notification from
availability information with “getIP()”. Its middleware, and then leverages on Notification
“updatingAlert()” checks and detects any change of Controller to serve applications.
availability information, and then forwards an
updating message to Availability Updater in which 4.2 Mobile Service Provision
“availabilityUpdatingPSG()” activates ACS and 4.2.1 Three-tier Service Provision Architecture
AUS. Each new availability information with MSID LASOD is designed as a platform for any
is sent to both Application Callback Processor and application to leverage on so to publish and discover
Middleware Session Processor. Inside Middleware services. To utilize the functions of LASOD, three
Session Processor, “availabilityUpdate()” uses MSID logical software components are defined for the
Analyzer to get context domain information (namely application (as represented in the Application
CSG) by “analyzerCSG()”. Subsequently, new Components of Figure 9), which includes (1) user
availability information is updated with the interface specific which interacts with the user to
corresponding MSID table by “put(MSID, IPPort)”. allow functions of the application to be invoked; (2)
ACS is activated by receiving an updating application specific which performs application-
message from Availability Updater (Figure 8 specific logic; and (3) service management specific
bottom). Availability Updating Processor utilizes which interacts with the underlying service
“availabilityUpdating()” to send a message management functions of LASOD to complete tasks
containing MSID and new availability information to such as service registration and query routing. The
Callback Notifier in which “callbackNotification()” first two components should be designed by the
initializes the ACS and “validMSID()” checks the application itself; while the last component is created
validity of coming MSID. Only a valid MSID is by LASOD, which we name as Service Mediator
forwarded to Caller Searcher component in which (SM). More specifically, it mediates the application
“getCallers()” retrieves the caller list from Callback with the LASOD functions: on one hand, SM allows
Tables with respect to this MSID. Meanwhile, this applications to utilize the indexing and routing
component also gets availability information of all mechanisms of LASOD to publish their application
callers from the Netinfor Retriever by “getIPPort()”. services or discover available ones (e.g. for dynamic
Consequently, it sends a message to Notification service composition); on the other hand, SM keeps
Manager in which “notification()” and the service information of each application so that it
“notificationDistribution()” to generate and distribute helps LASOD to direct any application-specific
application callback notifications. Application query to the responsible application service. Indeed,
Callback Handler uses “notificationReceiver()” to the above three components defined may reside in
one or be distributed to more than one computing
devices. This allows applications to utilize the
functions of LASOD without actually deploying
LASOD components (e.g. indexing and routing). A
typical example is for mobile service provision,
where it may not be feasible for mobile devices to
perform the peer operations as expected in LASOD,
such as facilitating P2P connectivity and routing of
queries. By distributing the SM component to a more
capable machine (e.g. a desktop), this machine can
handle the communications between the mobile
service and LASOD. Besides, with the help of SM, it
maximizes the flexibility of LASOD, as the service
B C
Area B Area C
1st Tier
Hilbert Space Area
Filling Curve Subarea D2 Subarea D1 Organization
Superpeer A
Area D D
Application
Service Peer
Model Components
Area A Subarea D3 Unclassified
Other SOLE UI specific
App. App. Application
Superpeer
specific
LASOD
c d Components (e.g. Serivce
b
service indexing, management
query routing) specific
2nd Tier
e f
Local-Area Service
Service Peer Organization
a
Proxy Proxy
Proxy
3G
GPRS
1 +create
1..* +referencedBy
1..* +containedBy
ServiceMediator
Figure 10. Service peer functional components Figure 11. The interactions of software component
and its support for service provision. between the application and the service peer.
4.2.3 Mobile Service Provision the SOLE-AS is to maintain an index to the shared
As mentioned before, the application service is data of experiences. The index key represents the
not necessarily hosted on the same machine as where entity of interest (such as a shop), and the value
the service peer is running. When services are describes certain aspects of the experience, e.g. who
supposed to be provisioned on a separate machine shared it, when and where it was shared. SOLE
(e.g. for mobile service provision), the responsible facilitates sharing of experiences through distributed
service peer is acting as a proxy. In this case, two SOLE-ASs. Each SOLE-AS has an ID and is
issues must be resolved: (1) the discovery of the responsible for a part of the keyword space based on
proxy and (2) the communication method. For (1), the Distributed Hash Table (DHT) technique: for
we have designated a port for each service peer storing the index of the experience data, the name of
capable of being a proxy to listen on, so that if the the entity of interest is hashed to a key and is
MSP and the proxy are in close proximity, the proxy assigned to the first SOLE-AS whose ID is equal to
can be discovered via WiFi broadcast. In this case, or greater than the key value.
the MSP does not necessarily possess a public IP for Users use SOLE-ASP/ASC to share or retrieve
its service provision. Alternatively, a list identifying experience information. As SOLE allows the actual
the address of potential proxies can be retrieved from experience to be stored on the mobile device, when
our dedicated Web server. For (2), all kinds of retrieving data from the device, the respective
invocations are through the Web service mechanisms. SOLE-ASP is also considered as a Mobile Service
Therefore, the Web service URL of the mediator will Provider (MSP). In the current design of SOLE-ASP,
be returned when registering application services to the functions to support experience retrieval on the
the service peer. SOLE-ASP's mobile device are all exposed as Web
services, which is similar to the case for the SOLE-
5 CASE STUDY AS. The interactions among SOLE components for
experience retrieval are illustrated in Figure 12.
To demonstrate the design, integration and
deployment of mobile applications in the Coalition 5.2 SOLE Application Service in Coalition
environment, we have chosen Sharing Of Living With Coalition, SOLE can rely on the service
Experience (SOLE) as the case study because of its management layer (i.e. LASOD) for the organization
richness in application and user behaviors. Moreover, and discovery of its services. There are two major
we can easily extend SOLE to support other types of types of services in SOLE: (1) services provisioned
applications such as service recommendation based by SOLE-ASs; (2) services provisioned by SOLE-
on people‟s experience rating. Our SOLE application ASPs. The former represents the conventional client-
framework will be differentiated from the existing server model where SOLE-ASPs/ASCs share or
information sharing work (e.g. RevisiTour [22], retrieve experience through dedicated SOLE-ASs;
Sentient Graffiti [23], foursquare [24] and Gowalla while the latter considers peer-peer model and
[25]) in the following aspects: (1) it is generic and SOLE-ASC could directly retrieve data from SOLE-
scalable, by not assuming a specific application ASP. Figure 13 shows the two service provisioning
scenario, e.g. museum or tourism. It allows users to models for SOLE in LASOD. Sample service data
share and retrieve experiences about any entity at for SOLE-AS service is shown as follows:
anywhere, anytime (without requiring RFID tags); ServiceData service = new ServiceData(“SOLE-
(2) it is flexible, by allowing the user to choose AS”, “41.03497,29.03015”, “SOLE”,
where to store the experience data and to specify his “SOLE Application Server”,
audience. When the data is stored on mobile devices, “http://192.168.1.101:8080/services/sole.wsdl”);
it could be offered through mobile services from
these devices; (3) it is context-aware by considering
SOLE-ASC
the location, time, and preferences of the user in
discovery and delivery of experience information. In 1. Indicate entity of interest
this section we will briefly explain the design of 2. L
Coffee
3. oca Shop
SOLE, but with special emphasis on Coalition as a In t
ent e SOL
4. Invoke SOLE-ASP
vo ity
ke E
nam -AS
platform to help make SOLE development more
Web service
S
se OL e k usin
ey g
rv E
ic -A
efficient and effective. e S
W
eb